Api session event editor overlay set overlay source

From Tygron Support wiki
Jump to navigation Jump to search

API Endpoint: api/session/event/editoroverlay/set_overlay_source/

Description: Add or remove specified Sources to or from a specified Source Overlay. Unincluded Sources which are already related to the Overlay will remain related. Unincluded Sources which are not related to the Overlay will remain unrelated.

Name Importance Type Description Values
0 REQUIRED (OVERLAY Integer ID) Overlay ID (must relate to a Sources Overlay)
1 REQUIRED (SOURCE Integer ID or multiple values in array [1, 2, 3]) Array of Source IDs
2 REQUIRED (true, false) Should be added to the Overlay (false removes the Sources from the Overlay) true or false

Response Codes

Response Code: Description
204 No Content
300-600 Codes Overview

Example POST

Curl example POST:

curl 'https://engine.tygron.com/api/session/event/editoroverlay/set_overlay_source/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, 1, true ]'

Curl example multi item POST:

curl 'https://engine.tygron.com/api/session/event/editoroverlay/set_overlay_source/' -H 'Content-Type: application/json' -H 'Authorization: Bearer API_TOKEN' -d '[ 1, [ 1, 2, 3 ], true ]'

JavaScript example POST:

var options = {
 method: "POST",
 headers: { "Content-Type": "application/json", "Authorization": "Bearer API_TOKEN" },
 body: '[ 1, 1, true ]'
};
fetch("https://engine.tygron.com/api/session/event/editoroverlay/set_overlay_source/", options)
 .then(response => response.text())
 .then(result => console.log(result))
 .catch(error => console.log('error', error));