Collections API
Overview
Interaction Designer collections API provides access to collections, eg. groups of interactions.
List collections
With this endpoint you are able to list all of your organizations collections.
Endpoint:
GET https://interactionbuilder.giosg.com/api/v1/collections
Response
Response is a Array of following objects:
Attribute
Type
Description
id
integer
Collection ID
name
string
Name of the collection
dataRetentionDays
integer
How many days form submission data is retained before automatically removed, null
if automatic data disposal is disabled.
dataDisposalEnabled
boolean
Is automatic data disposal enabled
organizationUid
string
UUID string of the collection owner organization
sharedWithPartnerOrganizationUid
string
UUID string of the organization which the collection is shared with, null
if not shared.
sharedWithPartnerReadwrite
boolean
If true
, share receiver is able to modify interactions in this collection.
sharedWithSupport
boolean
Giosg internal attribute. true
if this collection is shared to Giosg support team.
Get single collection
With this endpoint you are able to get details of single collection.
Endpoint:
GET https://interactionbuilder.giosg.com/api/v1/collections/<collection_id>
Response
Attribute
Type
Description
id
integer
Collection ID
name
string
Name of the collection
dataRetentionDays
integer
How many days form submission data is retained before automatically removed, null
if automatic data disposal is disabled.
dataDisposalEnabled
boolean
Is automatic data disposal enabled
organizationUid
string
UUID string of the collection owner organization
sharedWithPartnerOrganizationUid
string
UUID string of the organization which the collection is shared with, null
if not shared.
sharedWithPartnerReadwrite
boolean
If true
, share receiver is able to modify interactions in this collection.
sharedWithSupport
boolean
Giosg internal attribute. true
if this collection is shared to Giosg support team.
Delete collection
With this endpoint it is possible to delete a collection. Note that deleting collection is not possible if it contains any interactions or themes. To delete collection, first delete or move all interactions from it and delete all themes in the collection.
Endpoint:
DELETE https://interactionbuilder.giosg.com/api/v1/collections/<collection_id>
Create a new collection
With this endpoint you are able to create new collections for your interactions.
Endpoint:
POST https://interactionbuilder.giosg.com/api/v1/collections/
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14 import requests
import json
API_TOKEN = "<api token>"
url = "https://interactionbuilder.giosg.com/api/v1/collections"
payload = {
"name" : "My new collection"
}
response = requests . post ( url , data = json . dumps ( payload ), headers = {
'Authorization' : 'Token {} ' . format ( API_TOKEN ),
'Content-Type' : 'application/json' ,
})
response . raise_for_status ()
print ( response . json ())
Javascript
1
2
3
4
5
6
7
8
9
10
11
12
13
14 const API_TOKEN = "<api token>" ;
const url = `https://interactionbuilder.giosg.com/api/v1/collections` ;
const payload = {
name : "My new collection"
};
const response = await fetch ( url , {
method : "POST" ,
body : JSON . stringify ( payload ),
headers : {
"Content-Type" : "application/json" ,
Authorization : `Token ${ API_TOKEN } ` ,
},
});
console . log ( await response . json ());
Request parameters
Parameter
Type
Required
Description
name
string
Required
Name of the collection to create
dataRetentionDays
integer
Optional
How many days form submission data is retained before automatically removed, null
if automatic data disposal is disabled.
dataDisposalEnabled
boolean
Optional
Is automatic data disposal enabled
organizationUid
string
Optional
UUID string of the collection owner organization
sharedWithPartnerOrganizationUid
string
Optional
UUID string of the organization which the collection is shared with, null
if not shared.
sharedWithPartnerReadwrite
boolean
Optional
If true
, share receiver is able to modify interactions in this collection.
sharedWithSupport
boolean
Optional
Giosg internal attribute. true
if this collection is shared to Giosg support team.
Response
Attribute
Type
Description
id
integer
Collection ID
name
string
Name of the collection
dataRetentionDays
integer
How many days form submission data is retained before automatically removed, null
if automatic data disposal is disabled.
dataDisposalEnabled
boolean
Is automatic data disposal enabled
organizationUid
string
UUID string of the collection owner organization
sharedWithPartnerOrganizationUid
string
UUID string of the organization which the collection is shared with, null
if not shared.
sharedWithPartnerReadwrite
boolean
If true
, share receiver is able to modify interactions in this collection.
sharedWithSupport
boolean
Giosg internal attribute. true
if this collection is shared to Giosg support team.
Update a collection
With this endpoint you are able to update existing collections.
Endpoint:
POST https://interactionbuilder.giosg.com/api/v1/collections/<collection_id>
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 import requests
import json
API_TOKEN = "<api token>"
COLLECTION_ID = "<collection id>"
url = "https://interactionbuilder.giosg.com/api/v1/collections/ {} " . format ( COLLECTION_ID )
payload = {
"name" : "My updated collection name" ,
"dataRetentionDays" : 100 ,
"dataDisposalEnabled" : True
}
response = requests . post ( url , data = json . dumps ( payload ), headers = {
'Authorization' : 'Token {} ' . format ( API_TOKEN ),
'Content-Type' : 'application/json' ,
})
response . raise_for_status ()
print ( response . json ())
Javascript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 const API_TOKEN = "<api token>" ;
const COLLECTION_ID = "<collection id>" ;
const url = `https://interactionbuilder.giosg.com/api/v1/collections/ ${ COLLECTION_ID } ` ;
const payload = {
name : "My updated collection name" ,
dataRetentionDays : 100 ,
dataDisposalEnabled : True
};
const response = await fetch ( url , {
method : "POST" ,
body : JSON . stringify ( payload ),
headers : {
"Content-Type" : "application/json" ,
Authorization : `Token ${ API_TOKEN } ` ,
},
});
console . log ( await response . json ());
Request parameters
Parameter
Type
Required
Description
name
string
Required
Name of the collection to create
dataRetentionDays
integer
Optional
How many days form submission data is retained before automatically removed, null
if automatic data disposal is disabled.
dataDisposalEnabled
boolean
Optional
Is automatic data disposal enabled
organizationUid
string
Optional
UUID string of the collection owner organization
sharedWithPartnerOrganizationUid
string
Optional
UUID string of the organization which the collection is shared with, null
if not shared.
sharedWithPartnerReadwrite
boolean
Optional
If true
, share receiver is able to modify interactions in this collection.
sharedWithSupport
boolean
Optional
Giosg internal attribute. true
if this collection is shared to Giosg support team.
Response
Attribute
Type
Description
id
integer
Collection ID
name
string
Name of the collection
dataRetentionDays
integer
How many days form submission data is retained before automatically removed, null
if automatic data disposal is disabled.
dataDisposalEnabled
boolean
Is automatic data disposal enabled
organizationUid
string
UUID string of the collection owner organization
sharedWithPartnerOrganizationUid
string
UUID string of the organization which the collection is shared with, null
if not shared.
sharedWithPartnerReadwrite
boolean
If true
, share receiver is able to modify interactions in this collection.
sharedWithSupport
boolean
Giosg internal attribute. true
if this collection is shared to Giosg support team.