Webhook
Webhook
A webhook is a user-defined HTTP callback. It is a mechanism that sends real-time information to any third-party app or service.
Create
The Create a webhook request allows you to create a new webhook in a specific stack.
| Name | Type | Description |
|---|---|---|
| model (required) | WebhookModel | Webhook Model for creating Webhook. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Create(model);CreateAsync
The Create a webhook request allows you to create a new webhook in a specific stack.
| Name | Type | Description |
|---|---|---|
| model (required) | WebhookModel | Webhook Model for creating Webhook. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").CreateAsync(model);Delete
The Delete webhook call deletes an existing webhook from a stack.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Delete();DeleteAsync
The Delete webhook call deletes an existing webhook from a stack.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").DeleteAsync();Executions
The Get executions of a webhook request allows you to fetch the execution details of a specific webhook, which includes the execution UID.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Executions();ExecutionsAsync
The Get executions of a webhook request allows you to fetch the execution details of a specific webhook, which includes the execution UID.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").ExecutionsAsync();Fetch
The Fetch webhook request returns comprehensive information on a specific webhook.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Fetch();FetchAsync
The Fetch webhook request returns comprehensive information on a specific webhook.
| Name | Type | Description |
|---|---|---|
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").FetchAsync();Logs
This call will return a comprehensive detail of all the webhooks that were executed at a particular execution cycle.
| Name | Type | Description |
|---|---|---|
| executionUid | string | Execution UID that you receive when you execute the 'Get executions of webhooks' call. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Logs("<EXECUTION_UID>");LogsAsync
This call will return a comprehensive detail of all the webhooks that were executed at a particular execution cycle.
| Name | Type | Description |
|---|---|---|
| executionUid | string | Execution UID that you receive when you execute the 'Get executions of webhooks' call. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").LogsAsync("<EXECUTION_UID>");Query
The Query Webhooks request returns comprehensive information on all the available webhooks in the specified stack.
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Webhook().Query();Retry
This call makes a manual attempt to execute a webhook after the webhook has finished executing its automatic attempts.
| Name | Type | Description |
|---|---|---|
| executionUid | string | Execution UID that you receive when you execute the 'Get executions of webhooks' call. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Retry("<EXECUTION_UID>");RetryAsync
This call makes a manual attempt to execute a webhook after the webhook has finished executing its automatic attempts.
| Name | Type | Description |
|---|---|---|
| executionUid | string | Execution UID that you receive when you execute the 'Get executions of webhooks' call. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").RetryAsync("<EXECUTION_UID>");Update
The Update webhook request allows you to update the details of an existing webhook in the stack.
| Name | Type | Description |
|---|---|---|
| model (required) | WebhookModel | Webhook Model for creating Webhook. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel();
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").Update(model);UpdateAsync
The Update webhook request allows you to update the details of an existing webhook in the stack.
| Name | Type | Description |
|---|---|---|
| model (required) | WebhookModel | Webhook Model for creating Webhook. |
| collection | ParameterCollection | Query parameter collection. |
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
WebhookModel model = new WebhookModel();
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Webhook("<WEBHOOK_UID>").UpdateAsync(model);