Skip to content

Interactions API

Overview

Interaction Designer interactions API provides access to list of interactions and details of invidual interactions.

List interactions

With this endpoint you are able to list all of your organizations interactions. If you want to list interactions from a particular collection, you can pass workspaceUid query parameter (ID of a collection).

Endpoint:

1
GET https://interactionbuilder.giosg.com/api/orgs/<organization_id>/interactions

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import requests

API_TOKEN = "<api token>"
ORGANIZATION_ID = "<organization id>"
url = "https://interactionbuilder.giosg.com/api/orgs/{}/interactions".format(ORGANIZATION_ID)
response = requests.get(url, headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.json())
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
const API_TOKEN = "<api token>";
const ORGANIZATION_ID = "<organization id>";
const url = `https://interactionbuilder.giosg.com/api/orgs/${ORGANIZATION_ID}/interactions`;
const response = await fetch(url, {
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.json());

Request parameters

Parameter Type Required Description
json boolean optional Set to true to return full project information. When listing interactions it is usually better to omit this to keep the response size smaller.
workspaceUid integer optional Set to a collection ID to return interactions only from given collection.
published string optional Set to yes to return only published interactions or no to return only non-published interactions. If left unspecified, will return all interactions.

Example:

1
GET https://interactionbuilder.giosg.com/api/orgs/60b05ad6-9676-4827-a3a4-1dafaaa442d4/interactions?json=true&workspaceUid=<group id>

Response

Response is a list of following resources.

Attribute Type Description
uid integer Interaction integer ID
name string Name of the interaction
notes string Interaction description or notes text
organizationUid string UUID string of the interaction owner organization
workspaceUid integer ID of the collection this interaction belongs to
creatorUserId string UUID string of the user whom created this interaction
creatorUserOrganizationUid string UUID string of the interaction creator organization.
createdDate date/time Time when the interaction was created in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
updatedDate date/time Time when the interaction was last updated in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
updatedUserId string UUID string of the user who last updated the interaction
updatedUserOrganizationUid string UUID string of the interaction updater organization.
themeId integer ID of the theme object used
templateName string Name of the template used in this interaction, can be null if no template used.
publishedAssetUid string Deprecated, do not use!
publishedDate date/time Time when the interaction was last time published in ISO-8601 format, eg. 2021-02-18T10:10:57. Can be null if the interaction was not yet published.
isPublished boolean Is the interaction published.
interactionUuid string UUID of the interaction. This is used to identify interaction in many API's
tag date/time Tag timestamp of interaction. This is used internally to track versions and make sure that multiple users don't override each others changes when saving.
project object Interaction definition. Only available when using json=true.
jsonVersion integer Giosg internal version of the interaction definition JSON. Only available when using json=true.
editorCanvasSizeType string Describes which editor canvas type was selected previously. One of "mobile1", "mobile2", "desktop1", "desktop2". Only available when using json=true.
previewUrl string Previously used URL to preview the interaction, can be null if preview url is not set. Only available when using json=true.
previewCanvasSizeType string Describes which preview canvas type was selected previously. One of "mobile1", "mobile2", "desktop1", "desktop2". Only available when using json=true.
previewCanvasRotated boolean If preview canvas is rotated to portrait mode. Only available when using json=true.

Get single interaction

With this endpoint you are able to get details of single interaction.

Endpoint:

1
GET https://interactionbuilder.giosg.com/api/interactions/<interaction_id>

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import requests

API_TOKEN = "<api token>"
INTERACTION_ID = "<interaction id>"
url = "https://interactionbuilder.giosg.com/api/interactions/{}".format(INTERACTION_ID)
response = requests.get(url, headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.json())
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
const API_TOKEN = "<api token>";
const INTERACTION_ID = "<interaction id>";
const url = `https://interactionbuilder.giosg.com/api/interactions/${INTERACTION_ID}`;
const response = await fetch(url, {
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.json());

Request parameters

Parameter Type Required Description
tag string optional Tag to fetch. Tag is the same as interactions last updated at time from updatedDate field. If this field is specified and interaction has not been updated, then null will be returned. This is used to minimize data transmission if the client already has the correct interaction version. If interaction has been updated (tag does not match) then a full response will be returned.

Example:

1
GET https://interactionbuilder.giosg.com/api/interactions/e0976394-0781-4795-b052-bc8f66f149f8?tag=2021-03-15T10:34:28.819Z

Response

Attribute Type Description
uid integer Interaction integer ID
name string Name of the interaction
notes string Interaction description or notes text
organizationUid string UUID string of the interaction owner organization
workspaceUid integer ID of the collection this interaction belongs to
creatorUserId string UUID string of the user whom created this interaction
creatorUserOrganizationUid string UUID string of the interaction creator organization.
createdDate date/time Time when the interaction was created in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
updatedDate date/time Time when the interaction was last updated in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
updatedUserId string UUID string of the user who last updated the interaction
updatedUserOrganizationUid string UUID string of the interaction updater organization.
themeId integer ID of the theme object used
templateName string Name of the template used in this interaction, can be null if no template used.
publishedAssetUid string Deprecated, do not use!
publishedDate date/time Time when the interaction was last time published in ISO-8601 format, eg. 2021-02-18T10:10:57. Can be null if the interaction was not yet published.
isPublished boolean Is the interaction published.
interactionUuid string UUID of the interaction. This is used to identify interaction in many API's
tag date/time Tag timestamp of interaction. This is used internally to track versions and make sure that multiple users don't override each others changes when saving.
project object Interaction definition.
jsonVersion integer Giosg internal version of the interaction definition JSON.
editorCanvasSizeType string Describes which editor canvas type was selected previously. One of "mobile1", "mobile2", "desktop1", "desktop2".
previewUrl string Previously used URL to preview the interaction, can be null if preview url is not set.
previewCanvasSizeType string Describes which preview canvas type was selected previously. One of "mobile1", "mobile2", "desktop1", "desktop2".
previewCanvasRotated boolean If preview canvas is rotated to portrait mode.

Update a single interaction

With this endpoint you are able to update existing interaction.

Endpoint:

1
POST https://interactionbuilder.giosg.com/api/interactions/<interaction_id>

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
import requests
import json

# Get existing interaction
API_TOKEN = "<api token>"
INTERACTION_ID = "<interaction id>"
url = "https://interactionbuilder.giosg.com/api/interactions/{}".format(INTERACTION_ID)
response = requests.get(url, headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
interaction = response.json()

# Update name of the interaction
interaction["name"] = "Updated interaction name"
update_response = requests.post(url, json.dumps(interaction), headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
update_response.raise_for_status()
print(update_response.json())
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Get existing interaction
const API_TOKEN = "<api token>";
const INTERACTION_ID = "<interaction id>";
const url = `https://interactionbuilder.giosg.com/api/interactions/${INTERACTION_ID}`;
const response = await fetch(url, {
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
const interaction = await response.json();

// Update interaction name
interaction.name = "Updated interaction name";
const updateResponse = await fetch(url, {
    method: "POST",
    body: JSON.stringify(interaction),
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await updateResponse.json());

Response

Attribute Type Description
uid integer Interaction integer ID
name string Name of the interaction
notes string Interaction description or notes text
organizationUid string UUID string of the interaction owner organization
workspaceUid integer ID of the collection this interaction belongs to
creatorUserId string UUID string of the user whom created this interaction
creatorUserOrganizationUid string UUID string of the interaction creator organization.
createdDate date/time Time when the interaction was created in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
updatedDate date/time Time when the interaction was last updated in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
updatedUserId string UUID string of the user who last updated the interaction
updatedUserOrganizationUid string UUID string of the interaction updater organization.
themeId integer ID of the theme object used
templateName string Name of the template used in this interaction, can be null if no template used.
publishedAssetUid string Deprecated, do not use!
publishedDate date/time Time when the interaction was last time published in ISO-8601 format, eg. 2021-02-18T10:10:57. Can be null if the interaction was not yet published.
isPublished boolean Is the interaction published.
interactionUuid string UUID of the interaction. This is used to identify interaction in many API's
tag date/time Tag timestamp of interaction. This is used internally to track versions and make sure that multiple users don't override each others changes when saving.
project object Interaction definition.
jsonVersion integer Giosg internal version of the interaction definition JSON.
editorCanvasSizeType string Describes which editor canvas type was selected previously. One of "mobile1", "mobile2", "desktop1", "desktop2".
previewUrl string Previously used URL to preview the interaction, can be null if preview url is not set.
previewCanvasSizeType string Describes which preview canvas type was selected previously. One of "mobile1", "mobile2", "desktop1", "desktop2".
previewCanvasRotated boolean If preview canvas is rotated to portrait mode.

Delete interaction

With this endpoint it is possible to delete an interaction.

Endpoint:

1
DELETE https://interactionbuilder.giosg.com/api/interactions/<interaction_id>

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import requests

API_TOKEN = "<api token>"
INTERACTION_ID = "<interaction id>"
url = "https://interactionbuilder.giosg.com/api/interactions/{}".format(INTERACTION_ID)
response = requests.delete(url, headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.status_code)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
const API_TOKEN = "<api token>";
const INTERACTION_ID = "<interaction id>";
const url = `https://interactionbuilder.giosg.com/api/interactions/${INTERACTION_ID}`;
const response = await fetch(url, {
    method: "DELETE",
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.status);

API will respond with HTTP 200 OK if deletion was succesfull.

Copy an interaction

With this endpoint it is possible to copy an interaction to same or to some other collection.

Endpoint:

1
POST https://interactionbuilder.giosg.com/api/interactions/<interaction_id>/copy

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import requests

API_TOKEN = "<api token>"
INTERACTION_ID = "<interaction id>"
GROUP_ID = "<group id>"
url = "https://interactionbuilder.giosg.com/api/interactions/{}/copy".format(INTERACTION_ID)
payload = {
    "groupId": GROUP_ID,
    "name": "My interaction copy"
}
response = requests.post(url, data=json.dumps(payload), headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.status_code)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
const API_TOKEN = "<api token>";
const INTERACTION_ID = "<interaction id>";
const GROUP_ID = "<group id>";
const url = `https://interactionbuilder.giosg.com/api/interactions/${INTERACTION_ID}/copy`;
const payload = {
    groupId: GROUP_ID,
    name: "My interaction copy"
}
const response = await fetch(url, {
    method: "POST",
    body: JSON.stringify(payload),
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.status);

Request parameters

Parameter Type Required Description
name string optional Name for new interaction. If not set, name will be automatically generated from the copied interaction.
groupId integer optional Target collection ID. If not set, will use same collection as the copied interaction.
forceUniqueName boolean optional If set to true, a serial number will be added to copied interaction name if it is not unique otherwise. For example "Test" could become "Test 2". If not set or set to false, number will not be added.

Response

If the copying is successful, API will respond with the same data that would be available from Get single interaction API endpoint.

Create a new interaction

With this endpoint you are able to create a new interaction. Creating a new interaction requires complex payload so it is highly recommended to fetch Interaction templates first and use one of those as payload.

If you want to create an empty interaction with this API, it is easiest to first fetch initial request payload using Interaction default project template API. It is recommended to always fetch default project for a base for the payload as the initial project payload may change over time.

Response of that endpoint then can be modified as user likes. API user also needs to add Collection ID to workspaceUid attribute and Theme ID to themeId attribute in order for the request to be successful.

Endpoint:

1
POST https://interactionbuilder.giosg.com/api/interactions/

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import requests
import json

API_TOKEN = "<api token>"
GROUP_ID = "<group id>"
THEME_ID = "<theme id>"
# Fetch default project template, this is optional but recommended.
default_template_url = "https://interactionbuilder.giosg.com/api/templates/default"
template_response = requests.get(default_template_url, headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
payload = template_response.json()
# Modify template name to liking and set collection and theme id's
payload["name"] = "My awesome new interaction"
payload["workspaceUid"] = GROUP_ID
payload["themeId"] = THEME_ID

url = "https://interactionbuilder.giosg.com/api/interactions"
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())
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const API_TOKEN = "<api token>";
const GROUP_ID = "<group id>";
const THEME_ID = "<theme id>";
// Fetch default project template, this is optional but recommended.
const defaultTemplateUrl = `https://interactionbuilder.giosg.com/api/templates/default`;
const templateResponse = await fetch(defaultTemplateUrl, {
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
const url = `https://interactionbuilder.giosg.com/api/interactions`;
// Modify template name to liking and set collection and theme id's
const payload = {
    ...await templateResponse.json(),
    name: "My awesome new interaction",
    workspaceUid: GROUP_ID,
    themeId: THEME_ID,
};
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 interaction to create
editorCanvasSizeType string Required Describes which editor canvas type should be set as default for interactions created using this template. One of "mobile1", "mobile2", "desktop1", "desktop2".
jsonVersion integer Required Giosg internal version of the interaction template definition JSON.
templateName string Required Name of the template that was used.
themeId integer Optional ID of the theme object to be used. If no id is provided, then we'll use any theme we'll find in the collection or create a default theme if collection has no themes.
workspaceUid integer Required ID of the collection this interaction should be placed to
project object Required Interaction JSON definition.

Response

If creation of interaction was successful, API will respond with same data that would be available from Get single interaction API endpoint.

Publish a interaction

With this endpoint you are able to publish interaction.

Publishing interaction always publishes latest version of interaction. For this reason there is optional query parameter called tag that can be used to prevent accidentally publishing other users changes. Tag is basically a value from projects updatedDate field and when this value is provided, interaction will not be published if this value has changed. This is used to prevent accidentally publishing changes that other users may have made to interaction at the same time.

Endpoint:

1
POST https://interactionbuilder.giosg.com/api/interactions/<interaction_id>/publish?tag=2021-03-01T14:20:46.970Z

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import requests
import json

API_TOKEN = "<api token>"
INTERACTION_ID = "<interaction id>"
TAG = "<tag to publish>"
url = "https://interactionbuilder.giosg.com/api/interactions/{}/publish?tag={}".format(INTERACTION_ID, TAG)
response = requests.post(url, data=json.dumps({}), headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.json())
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
const API_TOKEN = "<api token>";
const INTERACTION_ID = "<interaction id>";
const TAG = "<tag to publish>";
const url = `https://interactionbuilder.giosg.com/api/interactions/${INTERACTION_ID}/publish?tag=${TAG}`;
const response = await fetch(url, {
    method: "POST",
    body: JSON.stringify({}),
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.json());

Response

If the publishing is successful, the API will respond with the same data that would be available from the Get single interaction API endpoint.

If the tag parameter was used and the publishing fails because to interaction was changed, the API will respond with null.

Request parameters

Parameter Type Required Description
tag string optional Tag to publish. If this is omitted, then latest interaction version is published without any additional checks. Tag is same as interactions last updated at time from updatedDate field.

Unpublish a interaction

With this endpoint you are able to unpublish an interaction. This won't delete any rules that might have been setup to show the interaction, but does prevent the interaction to be loaded by the rules.

Unpublishing an interaction will always unpublish the latest published version of an interaction. For this reason there is optional query parameter called tag that can be used to prevent accidentally unpublishing version that other user has published simultaneously. Tag is basically a value from projects updatedDate field and when this value is provided, interaction will not be unpublished if this value has changed.

Endpoint:

1
POST https://interactionbuilder.giosg.com/api/interactions/<interaction_id>/unpublish?tag=2021-03-01T14:20:46.970Z

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import requests
import json

API_TOKEN = "<api token>"
INTERACTION_ID = "<interaction id>"
TAG = "<tag to publish>"
url = "https://interactionbuilder.giosg.com/api/interactions/{}/unpublish?tag={}".format(INTERACTION_ID, TAG)
response = requests.post(url, data=json.dumps({}), headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.json())
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
const API_TOKEN = "<api token>";
const INTERACTION_ID = "<interaction id>";
const TAG = "<tag to publish>";
const url = `https://interactionbuilder.giosg.com/api/interactions/${INTERACTION_ID}/unpublish?tag=${TAG}`;
const response = await fetch(url, {
    method: "POST",
    body: JSON.stringify({}),
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.json());

Response

If the unpublishing is successful, the API will respond with the same data that would be available from the Get single interaction API endpoint.

If the tag parameter was used and the unpublishing fails because to interaction was changed, the API will respond with null.

Request parameters

Parameter Type Required Description
tag string optional Tag to unpublish. If this is omitted, then latest published version of interaction gets unpublished without any additional checks. Tag is same as interactions last updated at time from updatedDate field.

Revert an interaction to previously published state

With this endpoint you are able to revert the changes of an interaction to the previously published state. Reverting is not possible if the interaction has not been published yet.

Reverting interaction always reverts it to latest published version of interaction.

Endpoint:

1
POST https://interactionbuilder.giosg.com/api/interactions/<interaction_id>/revert

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
import requests
import json

API_TOKEN = "<api token>"
INTERACTION_ID = "<interaction id>"
url = "https://interactionbuilder.giosg.com/api/interactions/{}/revert".format(INTERACTION_ID)
response = requests.post(url, data=json.dumps({}), headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.json())
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
const API_TOKEN = "<api token>";
const INTERACTION_ID = "<interaction id>";
const url = `https://interactionbuilder.giosg.com/api/interactions/${INTERACTION_ID}/revert`;
const response = await fetch(url, {
    method: "POST",
    body: JSON.stringify({}),
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.json());

Response

If the reverting is successful, the API will respond with the same data that would be available from the Get single interaction API endpoint.

Note that if interaction has not been published yet, API will respond with HTTP 400 Bad Request as there isn't a version to revert to.

Interaction publish log

With this endpoint you are able to list the published history of a specific interactions.

Endpoint:

1
GET https://interactionbuilder.giosg.com/api/interactions/<interaction_id>/publishlog

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
import requests
import json

API_TOKEN = "<api token>"
INTERACTION_ID = "<interaction id>"
url = "https://interactionbuilder.giosg.com/api/interactions/{}/publishlog".format(INTERACTION_ID)
response = requests.get(url, headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.json())
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
const API_TOKEN = "<api token>";
const INTERACTION_ID = "<interaction id>";
const url = `https://interactionbuilder.giosg.com/api/interactions/${INTERACTION_ID}/publishlog`;
const response = await fetch(url, {
    method: "GET",
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.json());

Response

Attribute Type Description
interactionPublishedLogItemUid string UUID of log item
publishedName string Name of the interaction at the time of publishing
interactionUid string UUID of interaction
orgId string UUID of the organization
publishedJsonVersion integer JSON version at the time of publishing
publishedByUserId string UUID string of the user who published the interaction
publishedDate date/time Time when the interaction was published in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
publishedProject object Full JSON representation of the interaction

Interaction templates

With this endpoint you are able to list interaction templates. Templates can help you while creating a new interaction. It is recommended to use templates with the Create a new interaction API to make it easier to build the correct payload.

Endpoint:

1
GET https://interactionbuilder.giosg.com/api/templates

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import requests
import json

API_TOKEN = "<api token>"
url = "https://interactionbuilder.giosg.com/api/templates"
response = requests.get(url, headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.json())
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
const API_TOKEN = "<api token>";
const url = `https://interactionbuilder.giosg.com/api/templates`;
const response = await fetch(url, {
    method: "GET",
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.json());

Response

Response will be a array of following resources.

Attribute Type Description
uid integer Integer ID of the template
name string Name of the interaction template
notes string Notes or description
organizationUid string UUID string of the organization
creatorUserId string UUID string of the user who created this interaction template
creatorUserOrganizationUid string UUID string of the organization where creatorUserId belongs to
createdDate date/time Time when the interaction template was created in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
updatedDate date/time Time when the interaction template was last updated in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
updatedUserId string UUID string of the user who last updated the interaction template
updatedUserOrganizationUid string UUID string of the interaction template updater organization.
themeId integer ID of the theme object used
templateName string Name of the template used, null always for template interactions.
publishedAssetUid string Deprecated, do not use!
publishedDate date/time Time when the interaction template was published in ISO-8601 format, eg. 2021-02-18T10:10:57.242Z
isPublished boolean Is the interaction template published.
interactionUuid string UUID of the interaction template. This is used to identify interaction in many API's
tag date/time Tag timestamp of interaction template. This is used internally to track versions and make sure that multiple users don't override each others changes when saving.
project object Interaction template definition. This is the payload that can be used to create new interaction from.
jsonVersion integer Giosg internal version of the interaction template definition JSON.
editorCanvasSizeType string Describes which editor canvas type should be set as default for interactions created using this template. One of "mobile1", "mobile2", "desktop1", "desktop2".
previewUrl string Preview url is null for interaction templates
previewCanvasSizeType string Preview canvas type is null for interaction templates
previewCanvasRotated boolean false for interaction templates
workspaceUid integer ID of the collection this interaction template belongs to

Interaction default project template

With this endpoint you are able to get default interaction project template. This can be used to create a new interactions with the Create a new interaction API.

This is different from a template since a template is already filled with a basic layout, while this endpoint will return an empty interaction.

Endpoint:

1
GET https://interactionbuilder.giosg.com/api/templates/default

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
import requests
import json

API_TOKEN = "<api token>"
url = "https://interactionbuilder.giosg.com/api/templates/default"
response = requests.get(url, headers={
    'Authorization': 'Token {}'.format(API_TOKEN),
    'Content-Type': 'application/json',
})
response.raise_for_status()
print(response.json())
1
2
3
4
5
6
7
8
9
const API_TOKEN = "<api token>";
const url = `https://interactionbuilder.giosg.com/api/templates/default`;
const response = await fetch(url, {
    headers: {
        "Content-Type": "application/json",
        Authorization: `Token ${API_TOKEN}`,
    },
});
console.log(await response.json());

Response

Response will be a object with following attributes:

Attribute Type Description
name string Name of the interaction template
templateName string Name of the template used, null always for template interactions.
project object Interaction template definition. This is the payload that can be used to create new interaction from.
jsonVersion integer Giosg internal version of the interaction template definition JSON.
editorCanvasSizeType string Describes which editor canvas type should be set as default for interactions created using this template. One of "mobile1", "mobile2", "desktop1", "desktop2".