The subscription controller helps you to manage your subscription to events.
Reference
Find subscriptions
GET/v5/subscriptions
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| condition | object | ✗ | |
| └ path | string | ✓ | |
| └ value | integer | string | ✓ | |
| flags | base64 | ✗ | Base64 encoded array of flags |
| id | integer | ✗ | Id of the subscription event |
| name | string | ✗ | Name of the subscription event allowed values: event:s3successevent:uploadCompleteevent:dropsiteUploadCompleteevent:releaseRequestevent:transcoderJobCompleteevent:dropsiteToPublicAreaevent:dropsiteUploadStarted |
Response
| Field | Type | Description |
|---|---|---|
| conditions | object | Conditions which must match for this subscription |
| └ methods | array | Methods for this subscription allowed values: createupdatedestroy |
| └ payload | object | Payload to listen to |
| flag | integer | Flag for this subscription allowed values: 02 |
| id | integer | Id of the subscription |
| instructions | array | Instructions for this subscription |
| lastExecutedStatus | integer | Status code of the last execution of subscription |
| logs | array | logs for this subscription |
| └ type | string | allowed values: apiemailhttps |
| └ payload | json | |
| └ statusCode | integer | |
| name | string | Name of the subscription allowed values: event:s3successevent:uploadCompleteevent:dropsiteUploadCompleteevent:releaseRequestevent:transcoderJobCompleteevent:dropsiteToPublicAreaevent:dropsiteUploadStarted |
| notes | string | Notes for this subscription |
Create subscriptions
POST/v5/subscriptions
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| conditions | object | ✗ | Conditions which must match for this subscription |
| └ methods | array | ✗ | Methods for this subscription allowed values: createupdatedestroy |
| └ payload | object | ✗ | Payload to listen to |
| flag | integer | ✓ | Flag for this subscription allowed values: 02 |
| instructions | array | ✓ | Instructions for this subscription |
| name | string | ✓ | Name of the event to subscribe to allowed values: event:s3successevent:uploadCompleteevent:dropsiteUploadCompleteevent:releaseRequestevent:transcoderJobCompleteevent:dropsiteToPublicAreaevent:dropsiteUploadStarted |
| notes | string | ✗ | Notes for this subscription |
Response
| Field | Type | Description |
|---|---|---|
| conditions | object | Conditions which must match for this subscription |
| └ methods | array | Methods for this subscription allowed values: createupdatedestroy |
| └ payload | object | Payload to listen to |
| flag | integer | Flag for this subscription allowed values: 02 |
| id | integer | Id of the subscription |
| instructions | array | Instructions for this subscription |
| lastExecutedStatus | integer | Status code of the last execution of subscription |
| logs | array | logs for this subscription |
| └ type | string | allowed values: apiemailhttps |
| └ payload | json | |
| └ statusCode | integer | |
| name | string | Name of the subscription allowed values: event:s3successevent:uploadCompleteevent:dropsiteUploadCompleteevent:releaseRequestevent:transcoderJobCompleteevent:dropsiteToPublicAreaevent:dropsiteUploadStarted |
| notes | string | Notes for this subscription |
Create Subscription from template
For some functions an event can be created from template. This makes development a lot easier.
An example is the creation of a downloadlink (with optional notification) for a newly uploaded mediaContainer:
// POST /subscriptions/createDownloadLink
{
"payload": {
"mediaContainerId": 123456,
"templateId": 8,
"formatIds": [2,3],
"receiver": [{ "recipient": "doe@admiralcloud.com"}]
}
}
POST/v5/subscriptions/:template
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| payload | object | ✗ | |
| template | string | ✗ | allowed values: createDownloadLinkdropsiteUploadStarted |
Response
| Field | Type | Description |
|---|---|---|
| conditions | object | Conditions which must match for this subscription |
| └ methods | array | Methods for this subscription allowed values: createupdatedestroy |
| └ payload | object | Payload to listen to |
| flag | integer | Flag for this subscription allowed values: 02 |
| id | integer | Id of the subscription |
| instructions | array | Instructions for this subscription |
| lastExecutedStatus | integer | Status code of the last execution of subscription |
| logs | array | logs for this subscription |
| └ type | string | allowed values: apiemailhttps |
| └ payload | json | |
| └ statusCode | integer | |
| name | string | Name of the subscription allowed values: event:s3successevent:uploadCompleteevent:dropsiteUploadCompleteevent:releaseRequestevent:transcoderJobCompleteevent:dropsiteToPublicAreaevent:dropsiteUploadStarted |
| notes | string | Notes for this subscription |