Migration guidelines for legacy webhooks
Is this page helpful?
system
properties.
type
and operation
properties to specify what entity changed and how. Default webhook notifications use the object_type
and action
properties for these purposes.
The following table describes how the legacy type
and operation
values map to the new object_type
and action
values.
Legacy type | Legacy operation | object_type | action |
asset | upsert | asset | changed and metadata_changed |
content_item | upsert | content_item | metadata_changed |
content_item_variant | archive | content_item | deleted |
content_item_variant | change_workflow_step | content_item | workflow_step_changed |
content_item_variant | restore | content_item | created |
content_item_variant | publish | content_item | published |
content_item_variant | upsert | content_item | created and changed |
content_item_variant | unpublish | content_item | unpublished |
content_type | upsert | content_type | changed |
language_settings | upsert | language | changed |
project | archive | Not applicable | Not applicable |
project | restore | Not applicable | Not applicable |
project_settings | upsert | Not applicable | Not applicable |
taxonomy | archive | taxonomy | deleted |
taxonomy | restore | taxonomy | created |
taxonomy | upsert | taxonomy | metadata_changed , term_changed , term_deleted |
workflow | upsert | Not applicable | Not applicable |
{
"data": {
"items": [
{
"id": "f1e95fb5-6501-5cd3-b183-f330804d3aa6",
"codename": "article_1",
"language": "default",
"type": "article",
"collection": "default"
},
{
"id": "ab6d9b32-087d-5586-ac83-d97398bb4ec3",
"codename": "article_2",
"language": "default",
"type": "article",
"collection": "default"
},
{
"id": "7012ecdf-52af-5be0-8f25-14a1b0667aae",
"codename": "article_3",
"language": "default",
"type": "article",
"collection": "default"
}
],
"taxonomies": []
},
"message": {
"id": "c8a41abb-e3a2-4c7e-9248-415c48dc4e6c",
"project_id": "195a50c1-f1b8-0066-9eb4-83f7246d5459",
"type": "content_type",
"operation": "upsert",
"api_name": "delivery_production",
"created_timestamp": "2024-07-11T07:10:50.1911420Z",
"webhook_url": "https://example.com/your-webhook-endpoint"
}
}
{
"data": {
"items": [
{
"id": "e5d575fe-9608-4523-a07d-e32d780bf92a",
"codename": "published_article",
"collection": "default",
"language": "en-US",
"type": "article"
}
],
"taxonomies": []
},
"message": {
"id": "e1b372a2-1186-4929-b370-904c59f060b7",
"project_id": "bf32e7ab-85c3-0073-47b9-90838a8462de",
"type": "content_item_variant",
"operation": "publish",
"api_name": "delivery_production",
"created_timestamp": "2020-05-18T10:52:33.1059256Z",
"webhook_url": "https://example.com/cache-invalidate"
}
}
{
"notifications": [
{
"data": {
"system": {
"id": "5568750a-d7fd-51fa-a8bb-a08940ac5395",
"name": "Article",
"codename": "article",
"last_modified": "2024-07-11T07:10:48.5582695Z"
}
},
"message": {
"environment_id": "195a50c1-f1b8-0066-9eb4-83f7246d5459",
"object_type": "content_type",
"action": "changed",
"delivery_slot": "published"
}
}
]
}
{
"notifications": [
{
"data": {
"system": {
"id": "32022d85-ee58-4655-9016-e130c375820a",
"name": "This changes everything!",
"codename": "this_changes_everything",
"collection": "marketing",
"workflow": "default",
"workflow_step": "published",
"language": "english",
"type": "product_update",
"last_modified": "2024-01-08T13:54:54.3153716Z"
}
},
"message": {
"environment_id": "5f313984-9216-0158-9068-1d194f578bce",
"object_type": "content_item",
"action": "published",
"delivery_slot": "published"
}
}
]
}