Overview
Monterosa / Interaction Cloud™ was previously known as LViS. As such, you will find API documentation using the term.
Note that this documentation refers to Control API v2 and Control API v1 is no longer supported.
Control API is a server-side REST API which provides programmatic interface to the platform content management functions. Using this API a server-side script can interact with the the platform in order to manage content. For example, one can write a script which monitors content creation in an external CMS and automatically re-publishes articles via the platform.
Here is an example of Control API request which returns a list of events:
This responds with:
Data format
Control API adheres to JSONAPI specification.
Authentication
Authentication is done via a bearer token. Each request must include a header with a valid token like in the example below. Technical details about authentication can be found in The OAuth 2.0 Bearer token usage specification.
Request header example
Generating your API token
To generate an API token, login to Monterosa / Interaction Cloud™.
Hover your mouse over your username in the top right corner. From the dropdown menu choose Account Settings.
In the API Credentials tab you will see options to generate and revoke your token.
Access level
Every token has the same permissions as the user who generated this token, i.e. if the user has access to 3 Projects then the token will have access only to the same 3 Projects. In order to obtain a token with different permissions from your user, for example a token for read-only access, then a new user with desired access level needs to be created and then a token for this user can be generated.
Rate limit
A rate limit is applied to every API request. It is scoped to the authentication token, which means that every API client has an independent request count calculation.
The platform allocates a bucket of 15 requests for each authentication token. These requests can all be made within the same second or spread over time. Every second when there is no request made, 2 requests are added to the bucket, up to a maximum of 15.
Please note, current configuration values of the rate limit are provided only for a reference, and can change over time.
Proper error handling and backoff strategies should be implemented on the consumer side instead of relying on these values.
Response
If the rate limit level is exceeded, HTTP code 429 Too Many Requests is returned. This response should be handled by implementing API requests throttling and backoff strategies.
Error response
Resource limits
Events creation limit
Default value: 7. Can be increased by request.
When this number of current and future scheduled Events is created within the project the Control API cannot be used to create new Events. Note that Events can still be created manually via Studio.
Error response
Elements creation limit
Default value: 100. Can be increased by request.
When this number of elements is created within an event the Control API cannot be used to create more elements within the event. Note that elements can still be created manually via Studio.
Error response
Capabilities
Below is the list of functions supported by the Control API:
Project | View | ✔ |
Create, Update and Delete | ✔ | |
Event | View | ✔ |
Update | ✔ | |
Create | ✔ | |
Start | ✔ | |
Stop | ✔ | |
Delete | ✘ | |
Create from a template | ✘ | |
Clone | ✘ | |
Element | View | ✔ |
Create | ✔ | |
Update | ✔ | |
Stop | ✔ | |
Reveal results | ✔ | |
Publish | ✔ | |
Revoke | ✔ | |
Reveal answer | ✔ | |
Delete | ✘ |
Pagination
The Control API supports pagination for GET events
requests.
The response body for such request contains links
object with next and previous pages URLs.
The response without the next
or prev
means that the last page in corresponding direction is reached.
To get the first page the request URL must omit page[cursor]
parameter.
To change the maximum records count on page use page[count]
parameter. Values between 1 and 20 are allowed. Default value is 20.
File and image URLs validation
The Control API validates the format of provided URLs and returns a validation error for invalid URLs.
Example of valid urls:
https://bucket.io/image.png
http://images.com/images/123
//d3mss.cloudfront.net/assets/1c/logo.jpeg
The Control API allows URLs with leading and trailing whitespace. Whitespace is ignored during validation and removed before saving.
Validation of images
The Control API supports pixel size, aspect ratio and file size validation of images.
Parameters and limits for validation must be defined in the app spec.
During the validation, Studio fetches the image's properties by the provided image URL and validates them according to the app spec.
In the cases where Studio is not able to fetch an image's properties by the provided URL, the API returns the following error:
Error response
All possible errors in cases when an uploaded image does not meet the app spec: