Vidispine
Callback location resources [VC 21.3.1 GEN]
Currently, this feature only works together with ANALYZE jobs
A callback location resource points to a location where VidiCore can expect to find callback documents which contain scripts that should be executed as part of a job.
Scripts are JavaScripts and are executed by the built in JavaScript engine. See JavaScript.
Currently only S3-buckets are supported as callback locations.
Adding a callback location resource
Add a callback location resource using POST /resource
.
POST /resource Content-Type: application/xml <?xml version="1.0"?> <ResourceDocument xmlns="http://xml.vidispine.com/schema/vidispine"> <callback> <uri>s3://name:pass@example-bucket/folder1</uri> </callback> </ResourceDocument>
Callback Document format
Callback documents should be placed in the location indicated by the callback location resource you wish to use. They are formatted as such:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <CallbackDocument version="2" xmlns="http://xml.vidispine.com/schema/vidispine"> <name>Name of callback script</name> <description>Description of callback script.</description> <script> JavaScript here.... </script> </CallbackDocument>
Note that they must be saved as .xml-files for the callback executor to recognize them.