AdmiralCloud Developer Platform
API v5

Introduction

Upload-related events are triggered by AdmiralCloud during the file ingestion process. You can subscribe to these events to automate actions that should happen immediately after a file is uploaded — for example, releasing a media container, notifying a user, or triggering a transcoding workflow.

Each event subscription specifies the event name, optional conditions to filter which uploads should trigger it, and one or more instructions to execute in response. Use the Subscription Controller to create and manage your event subscriptions.

event:s3success

This event is triggered once for each uploaded file after the upload is completed.

Available payload properties:

`{ customerId: 12345, mediaContainerId: 135790
}`

Examples

Release mediacontainer after upload

Usage: Your account sets newly uploaded mediacontainers to "not released" by default, but for a specific securitygroup you want newly uploaded mediacontainers to be automatically released.

Event structure

`{ "name": "event:s3success", "flag": 0, "conditions": { "customerId": 12345 // add your customerId here }, "instructions": [ { "type":"api", "method":"post", "path":"v5/search", "controller":"search", "action":"search", "payload":{ "searchTerm":":mediaContainerId", "field": "id", "controlGroupIds": [1234] // add the securityGroupId here }, "expected":[{"path":"hits.total.value","value":1}] }, { "type":"api", "method":"put", "path":"v5/mediacontainer/:mediaContainerId", "controller":"mediacontainer", "action":"update", "payload":{ "flag":0 } } ], "notes": "Update flag after update"
}`

event:uploadComplete

This event is triggered once after an upload batch (which can contain one or more files) is completed. Every upload batch has a unique uploadId.

Available payload properties:

`{ "uploadId": "abc123", "mediaContainerIds": [123456, 234567, ...] "mediaContainerId": 999 // only available for dropsite uploads
}`

Examples

Inform after upload is complete

Usage: You can listen to the event “event:uploadComplete” to inform users about a completed (batch) upload.

Event structure

`{ "name": "event:uploadComplete", "flag": 2, "conditions": { "payload": { "uploadId": "abc-123-def" } }, "instructions": [ { "type": "email", "template": "uploadComplete", "subject": "Upload complete", "to": [ { "recipient": "jane@admiralcloud.com", "language": "en" } ], "mediaContainerIds": ":mediaContainerIds" } ]
}`