asset_added
An asset (article
, image
, video
, raw file
, or structured content
) was added to the library for reasons including, but not limited to, uploading assets, completing a task, and so on.
Payload
Key | Type | Description |
---|---|---|
event_name | string | Name of the event. The value is asset_added . |
data | object | Data of the event. |
data[asset] | object | Data of the asset associated with the event. |
data[asset][id] | string | Unique identifier of the asset. |
data[asset][owner_organization_id] | string | Owner organization ID of the asset. |
data[asset][type] | string | Type of the asset. Value can be article , image , video , raw_file , or structured_content . |
data[asset][source] | object | Source of the asset. |
data[asset][source][id] | string or null | Identifier of the source. Sends the ID of a task if the asset is added by completing the task. |
data[asset][source][type] | string or null | Type of the source. Sends task as the value, if the asset is added by completing the task. |
data[asset][source][links] | object | Links related to the asset source. |
data[asset][source][links][self] | string or null | URL to fetch the source details through the CMP Open API. Sends the URL of the task API if the asset is added by completing the task. |
data[asset][links] | object | Links related to the asset. |
data[asset][links][self] | string | URL to fetch the asset's details through the CMP Open API. |
Example
{
"event_name": "asset_added",
"data": {
"asset": {
"id": "019a86405de737b4ec3e616a4aeff981",
"owner_organization_id": "5108c3a9becac35915111191",
"type": "image",
"source": {
"id": "656893caea057917c5796f2e",
"type": "task",
"links": {
"self": "https://api.cmp.optimizely.com/v3/tasks/656893caea057917c5796f2e"
}
},
"links": {
"self": "https://api.cmp.optimizely.com/v3/images/019a86405de737b4ec3e616a4aeff981"
}
}
}
}
asset_removed
An asset (article
, image
, video
, raw file
, or structured content
) was removed from the library for reasons including, but not limited to, deleting assets.
Payload
Key | Type | Description |
---|---|---|
event_name | string | Name of the event. The value is asset_removed . |
data | object | Data of the event. |
data[asset] | object | Data of the asset associated with the event. |
data[asset][id] | string | Unique identifier of the asset. |
data[asset][owner_organization_id] | string | Owner organization ID of the asset. |
data[asset][type] | string | Type of the asset. Value can be article , image , video , raw_file , or structured_content . |
Example
{
"event_name": "asset_removed",
"data": {
"asset": {
"id": "870825113a12950a7eeeb64a64236d49",
"owner_organization_id": "5108c3a9becac35915111191",
"type": "article"
}
}
}
asset_modified
An asset (article
, image
, video
, raw file
, or structured content
) was modified in the library.
The event is triggered when specific attributes of a file type change, as listed below.
article
– title, fields, file location, expires_at, tags, owner_id, url, is_archivedimage
&video
– title, description, fields, file location, versions, alt_text, expires_at, tags, attribution_text, owner_id, url, is_archivedraw file
– title, description, fields, file location, versions, expires_at, tags, attribution_text, owner_id, url, is_archivedstructured content
– file location, fields, tags, owner_id, is_archived
Payload
Key | Type | Description |
---|---|---|
event_name | string | Name of the event. The value is asset_modified . |
data | object | Data of the event. |
data[asset] | object | Data of the asset associated with the event. |
data[asset][id] | string | Unique identifier of the asset. |
data[asset][owner_organization_id] | string | Owner organization ID of the asset. |
data[asset][type] | string | Type of the asset. Value can be article , image , video , raw_file , or structured_content . |
data[asset][source] | object | Source of the asset. |
data[asset][source][id] | string or null | Identifier of the source. Sends the ID of a task if the asset is modified by completing the task. |
data[asset][source][type] | string or null | Type of the source. Sends task as the value, if the asset is modified by completing the task. |
data[asset][source][links] | object | Links related to the asset source. |
data[asset][source][links][self] | string or null | URL to fetch the source details through the CMP Open API. Sends the URL of the task API if the asset is added by completing the task. |
data[asset][links] | object | Links related to the asset. |
data[asset][links][self] | string | URL to fetch the asset's details through the CMP Open API. |
data[attributes_changed] | array | List of attributes that trigger the webhook |
Example
{
"event_name": "asset_modified",
"data": {
"asset": {
"id": "019a86405de737b4ec3e616a4aeff951",
"owner_organization_id": "5108c3a9becac35915111191",
"type": "image",
"source": {
"id": "656893caea057917c5796f2e",
"type": "task",
"links": {
"self": "https://api.cmp.optimizely.com/v3/tasks/656893caea057917c5796f2e"
}
},
"links": {
"self": "https://api.cmp.optimizely.com/v3/images/019a86405de737b4ec3e616a4aeff951"
}
},
"attributes_changed": ["title", "description", "expires_at"]
}
}
asset_renditions_created
An asset's renditions are created.
Payload
Key | Type | Description |
---|---|---|
event_name | string | Name of the event. The value is asset_renditions_created . |
data | object | Data of the event. |
data[asset] | object | Data of the asset associated with the event. |
data[asset][id] | string | Unique identifier of the asset. |
data[asset][owner_organization_id] | string | Owner organization ID of the asset. |
data[asset][type] | string | Type of the asset. |
data[asset][links] | object | Links related to the asset. |
data[asset][links][self] | string | URL to fetch the asset's details through the CMP Open API. |
data[asset][links][renditions] | string | URL to fetch the asset's renditions through the CMP Open API. |
Example
{
"event_name": "asset_renditions_created",
"data": {
"asset": {
"id": "019a86405de737b4ec3e616a4aeff951",
"owner_organization_id": "5108c3a9becac35915111191",
"type": "image",
"links": {
"self": "https://api.cmp.optimizely.com/v3/images/019a86405de737b4ec3e616a4aeff951",
"renditions": "https://api.cmp.optimizely.com/v3/assets/019a86405de737b4ec3e616a4aeff951/renditions"
}
}
}
}