Skip to main content

Webhooks

Base URL: https://api.amplience.net/v2/content

Authorization and status codes

For authorization and status codes see the API Reference overview.

Webhooks
Link copied!

MethodEndpointSummary
GET/hubs/{hubId}/webhooksList webhooks for a hub
POST/hubs/{hubId}/webhooksCreate webhooks
GET/hubs/{hubId}/webhooks/{webhookId}Get a webhook
PATCH/hubs/{hubId}/webhooks/{webhookId}Update a webhook
DELETE/hubs/{hubId}/webhooks/{webhookId}Delete a webhook
GET/hubs/{hubId}/webhooks/{webhookId}/requestsList requests for a webhook
GET/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}Get a webhook request
POST/hubs/{hubId}
/webhooks/{webhookId}/requests/{requestId}/preview
Preview webhook request
POST/hubs/{hubId}
/webhooks/{webhookId}/requests/{requestId}/resend
Resend a webhook request

List webhooks for a hub
Link copied!

GET /hubs/{hubId}/webhooks

https://api.amplience.net/v2/content/hubs/{hubId}/webhooks

List all of the Webhooks created for a hub

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
pagequeryintegerPage number
Example: 0
sizequeryintegerPage size
Example: 20
sortquerystringSort paramter
Example: createdDate,asc

Responses

StatusDescription
200Paginated Webhook List
Response Example (200)
{
"_embedded": {
"webhooks": [
{
"id": "00112233445566778899aabb",
"label": "Snapshot Updated Webhook",
"events": [
"dynamic-content.snapshot.published"
],
"handlers": [],
"active": true,
"notifications": [
{
"email": "test@example.com"
}
],
"secret": "my-subscription-secret",
"createdDate": "2019-01-01T00:00:00.000Z",
"lastModifiedDate": "2019-01-01T00:00:00.000Z",
"headers": [],
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"method": "POST",
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
},
"hub": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
},
"requests": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit}",
"templated": true
},
"event-types": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/event-types"
},
"update": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
}
}
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks?page=0&size=20"
},
"first": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks?page=0&size=20"
},
"next": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks?page=1&size=20"
},
"last": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks?page=2&size=20"
},
"event-types": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/event-types"
}
},
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}

Create webhooks
Link copied!

POST /hubs/{hubId}/webhooks

https://api.amplience.net/v2/content/hubs/{hubId}/webhooks

Create a new Webhook for a Hub

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
labelstringLabel for the Webhook
eventsarrayList of events to register the Webhook against
handlersarrayList of URLs to receive the Webhook
activebooleanIndicates if the Webhook should be fired
notificationsarrayList of notifications
secretstringShared secret between the handler and DC
headersarrayList of additional headers. Each header object has key, value, and an optional secret boolean. When secret: true, the value is masked and returned as null in all subsequent API responses. Store the value securely at creation time.
filtersarray
methodstring (POST, PUT, PATCH, DELETE)Webhook HTTP method
customPayloadobjectCustom Payload
Request example
{
"label": "Snapshot Updated Webhook",
"events": [
"dynamic-content.snapshot.published"
],
"handlers": [
"http://example.com/webhook"
],
"active": true,
"notifications": [
{
"email": "test@example.com"
}
],
"secret": "my-subscription-secret",
"headers": [
{
"key": "X-Additional-Header",
"value": "abc123",
"secret": true
}
],
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"method": "POST",
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
}
}

Responses

StatusDescription
201Created Webhook
Response Example (201)
{
"id": "00112233445566778899aabb",
"label": "Snapshot Updated Webhook",
"events": [
"dynamic-content.snapshot.published"
],
"handlers": [
"http://example.com/webhook"
],
"active": true,
"notifications": [
{
"email": "test@example.com"
}
],
"secret": "my-subscription-secret",
"createdDate": "2019-01-01T00:00:00.000Z",
"lastModifiedDate": "2019-01-01T00:00:00.000Z",
"headers": [
{
"key": "X-Additional-Header",
"value": null,
"secret": true
}
],
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"method": "POST",
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
},
"hub": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
},
"requests": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit}",
"templated": true
},
"event-types": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/event-types"
},
"update": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
}
}
}

Get a webhook
Link copied!

GET /hubs/{hubId}/webhooks/{webhookId}

https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}

Get a specified webhook

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
webhookIdpathstringWebhook ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Webhook Request List
Response Example (200)
{
"id": "00112233445566778899aabb",
"label": "Snapshot Updated Webhook",
"events": [
"dynamic-content.snapshot.published"
],
"handlers": [
"http://example.com/webhook"
],
"active": true,
"notifications": [
{
"email": "test@example.com"
}
],
"secret": "my-subscription-secret",
"createdDate": "2019-01-01T00:00:00.000Z",
"lastModifiedDate": "2019-01-01T00:00:00.000Z",
"headers": [
{
"key": "X-Additional-Header",
"value": null,
"secret": true
}
],
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"method": "POST",
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
},
"hub": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
},
"requests": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit}",
"templated": true
},
"event-types": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/event-types"
},
"update": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
}
}
}

Update a webhook
Link copied!

PATCH /hubs/{hubId}/webhooks/{webhookId}

https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}

Update a specified webhook

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
webhookIdpathstringWebhook ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
labelstringLabel for the Webhook
eventsarrayList of events to register the Webhook against
handlersarrayList of URLs to receive the Webhook
activebooleanIndicates if the Webhook should be fired
notificationsarrayList of notifications
secretstringShared secret between the handler and DC
headersarrayList of additional headers
filtersarray
methodstring (POST, PUT, PATCH, DELETE)Webhook HTTP method
customPayloadobjectCustom Payload
Request example
{
"label": "Snapshot Updated Webhook",
"events": [
"dynamic-content.snapshot.published"
],
"handlers": [
"http://example.com/webhook"
],
"active": true,
"notifications": [
{
"email": "test@example.com"
}
],
"secret": "my-subscription-secret",
"headers": [
{
"key": "X-Additional-Header",
"value": "abc123",
"secret": true
}
],
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"method": "POST",
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
}
}

Responses

StatusDescription
200Webhook Request List
Response Example (200)
{
"id": "00112233445566778899aabb",
"label": "Snapshot Updated Webhook",
"events": [
"dynamic-content.snapshot.published"
],
"handlers": [
"http://example.com/webhook"
],
"active": true,
"notifications": [
{
"email": "test@example.com"
}
],
"secret": "my-subscription-secret",
"createdDate": "2019-01-01T00:00:00.000Z",
"lastModifiedDate": "2019-01-01T00:00:00.000Z",
"headers": [
{
"key": "X-Additional-Header",
"value": null,
"secret": true
}
],
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"method": "POST",
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
},
"hub": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb"
},
"requests": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit}",
"templated": true
},
"event-types": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/event-types"
},
"update": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
},
"delete": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb"
}
}
}

Delete a webhook
Link copied!

DELETE /hubs/{hubId}/webhooks/{webhookId}

https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}

Delete a specified webhook

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
webhookIdpathstringWebhook ID
Example: 00112233445566778899aabb

Responses

StatusDescription
204No content

List requests for a webhook
Link copied!

GET /hubs/{hubId}/webhooks/{webhookId}/requests

https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests

List all of the requests created for a webhook

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
webhookIdpathstringWebhook ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Webhook Request List
Response Example (200)
{
"_embedded": {
"requests": [
{
"id": "00112233445566778899aabb",
"eventId": "00112233445566778899aabb",
"eventName": [
"dynamic-content.snapshot.published"
],
"requestState": "SUCCESS",
"attempts": 1,
"request": {
"customHeaders": []
},
"invocations": [],
"evaluatedFilters": {
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"results": [
{
"status": "UNMATCHED"
},
{
"status": "MATCHED",
"index": 1
},
{
"status": "IGNORED"
}
]
},
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
},
"createdTimestamp": "2019-01-01T00:00:00.000Z",
"scheduledTimestamp": "2019-01-01T00:00:00.000Z",
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb"
},
"request": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/{id}",
"templated": true
},
"resend": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/resend"
},
"preview": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/preview"
}
}
}
]
},
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests?limit=20"
},
"request": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests{?cursor,limit,excludeStatus}",
"templated": true
},
"next": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests?cursor=CURSOR&limit=20"
}
},
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"number": 0
}
}

Get a webhook request
Link copied!

GET /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}

https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}

Get a single webhook request

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
webhookIdpathstringWebhook ID
Example: 00112233445566778899aabb
requestIdpathstringWebhook Request ID
Example: 00112233445566778899aabb

Responses

StatusDescription
200Webhook Request Response
Response Example (200)
{
"id": "00112233445566778899aabb",
"eventId": "00112233445566778899aabb",
"eventName": [
"dynamic-content.snapshot.published"
],
"requestState": "SUCCESS",
"attempts": 1,
"request": {
"customHeaders": [
{
"key": "X-Custom-Header",
"value": "123",
"secret": false
}
]
},
"invocations": [
{
"invocationTimestamp": "2019-01-01T00:00:00.000Z",
"request": {
"url": "http://example.com",
"headers": {
"X-Amplience-Hmac-Sha256": "1VVTWEZPxOGIkTL9b5V6rEjiiP46N2yHg/pYpLmcaKA=",
"User-Agent": "Amplience-Webhook/0.1",
"Content-Length": 171,
"Content-Type": "application/json"
},
"body": "{\"sequenceId\":1,\"eventId\":\"8e5b697d-7c32-4e30-8ddd-2601808131d9\",\"eventName\":\"dynamic-content.edition.scheduled\",\"system\":\"dynamic-content\",\"resource\":\"0001\",\"payload\":{}}",
"response": {
"statusCode": 200,
"headers": [
"Connection: close",
"Server: gunicorn/19.8.1",
"Date: Tue, 15 May 2018 12:07:13 GMT",
"Content-Type: application/json",
"Content-Length: 3",
"Access-Control-Allow-Origin: *",
"Access-Control-Allow-Credentials: true",
"Via: 1.1 vegur"
],
"body": "..."
}
}
}
],
"evaluatedFilters": {
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"results": [
{
"status": "UNMATCHED"
},
{
"status": "MATCHED",
"index": 1
},
{
"status": "IGNORED"
}
]
},
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
},
"createdTimestamp": "2019-01-01T00:00:00.000Z",
"scheduledTimestamp": "2019-01-01T00:00:00.000Z",
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb"
},
"request": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/{id}",
"templated": true
},
"resend": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/resend"
},
"preview": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/preview"
}
}
}

Preview webhook request
Link copied!

POST /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/preview

https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/preview

You can test your unsaved Webhook Subscription against an already sent Webhook Request

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
webhookIdpathstringWebhook ID
Example: 00112233445566778899aabb
requestIdpathstringWebhook Request ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

FieldTypeRequiredDescription
urlstringWebhook handler URL
methodstring (POST, PUT, PATCH, DELETE)Webhook HTTP method
secretstringShared secret between the handler and DC
filtersarray
headersarrayList of additional headers
customPayloadobjectCustom Payload
Request example
{
"url": "http://example.com/webhook",
"method": "POST",
"secret": "my-subscription-secret",
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"headers": [
{
"key": "X-Additional-Header",
"value": "abc123",
"secret": true
}
],
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
}
}

Responses

StatusDescription
200Webhook Request Response
Response Example (200)
{
"previewState": "SUCCESS",
"request": {
"customHeaders": [
{
"key": "X-Custom-Header",
"value": "123",
"secret": false
}
]
},
"evaluatedFilters": {
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"results": [
{
"status": "UNMATCHED"
},
{
"status": "MATCHED",
"index": 1
},
{
"status": "IGNORED"
}
]
},
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
},
"_links": {
"request": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb"
}
}
}

Resend a webhook request
Link copied!

POST /hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/resend

https://api.amplience.net/v2/content/hubs/{hubId}/webhooks/{webhookId}/requests/{requestId}/resend

Only available for Webhook Requests that have a requestState that is either "SUCCESS", "FAILED" or "PROCESSING_FAILED"

Parameters

NameInTypeRequiredDescription
hubIdpathstringHub ID
Example: 00112233445566778899aabb
webhookIdpathstringWebhook ID
Example: 00112233445566778899aabb
requestIdpathstringWebhook Request ID
Example: 00112233445566778899aabb

Request Body

Content-Type: application/json

Responses

StatusDescription
200Webhook Request Response
Response Example (200)
{
"id": "00112233445566778899aabb",
"eventId": "00112233445566778899aabb",
"eventName": [
"dynamic-content.snapshot.published"
],
"requestState": "SUCCESS",
"attempts": 1,
"request": {
"customHeaders": [
{
"key": "X-Custom-Header",
"value": "123",
"secret": false
}
]
},
"invocations": [
{
"invocationTimestamp": "2019-01-01T00:00:00.000Z",
"request": {
"url": "http://example.com",
"headers": {
"X-Amplience-Hmac-Sha256": "1VVTWEZPxOGIkTL9b5V6rEjiiP46N2yHg/pYpLmcaKA=",
"User-Agent": "Amplience-Webhook/0.1",
"Content-Length": 171,
"Content-Type": "application/json"
},
"body": "{\"sequenceId\":1,\"eventId\":\"8e5b697d-7c32-4e30-8ddd-2601808131d9\",\"eventName\":\"dynamic-content.edition.scheduled\",\"system\":\"dynamic-content\",\"resource\":\"0001\",\"payload\":{}}",
"response": {
"statusCode": 200,
"headers": [
"Connection: close",
"Server: gunicorn/19.8.1",
"Date: Tue, 15 May 2018 12:07:13 GMT",
"Content-Type: application/json",
"Content-Length: 3",
"Access-Control-Allow-Origin: *",
"Access-Control-Allow-Credentials: true",
"Via: 1.1 vegur"
],
"body": "..."
}
}
}
],
"evaluatedFilters": {
"filters": [
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": "abc"
}
]
},
{
"type": "in",
"arguments": [
{
"jsonPath": "$.payload.id"
},
{
"value": [
"abc",
"def"
]
}
]
},
{
"type": "equal",
"arguments": [
{
"jsonPath": "$.payload.not_present"
},
{
"value": "123"
}
]
}
],
"results": [
{
"status": "UNMATCHED"
},
{
"status": "MATCHED",
"index": 1
},
{
"status": "IGNORED"
}
]
},
"customPayload": {
"type": "text/x-handlebars-template",
"value": "{{#withDeliveryContentItem contentItemId=payload.rootContentItem.id account=\"account-name\" stagingEnvironment=\"staging-environment-url\"}} ... {/withDeliveryContentItem}}"
},
"createdTimestamp": "2019-01-01T00:00:00.000Z",
"scheduledTimestamp": "2019-01-01T00:00:00.000Z",
"_links": {
"self": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb"
},
"request": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/{id}",
"templated": true
},
"resend": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/resend"
},
"preview": {
"href": "https://api.amplience.net/v2/content/hubs/00112233445566778899aabb/webhooks/00112233445566778899aabb/requests/00112233445566778899aabb/preview"
}
}
}