Get list of webhook dispatches
GET/v2/webhook-dispatches
Gets the list of webhook dispatches that the user have.
The endpoint supports pagination using the limit and offset parameters
and it will not return more than 1000 records.
By default, the records are sorted by the createdAt field in ascending
order. To sort the records in descending order, use the desc=1
parameter.
Request
Query Parameters
Number of items that should be skipped at the start. The default value is 0.
0Maximum number of items to return. The default value as well as the maximum is 1000.
1000If true or 1 then the objects are sorted by the createdAt field in
descending order. By default, they are sorted in ascending order.
trueStatus 200
Response Headers
- X-Apify-Pagination-Offset
The offset of the first item in the current page.
- X-Apify-Pagination-Limit
The maximum number of items returned per page.
- X-Apify-Pagination-Count
The number of items returned in the current page.
- X-Apify-Pagination-Total
The total number of items available.
- X-Apify-Pagination-Desc
Whether the items are sorted in descending order.
{
"data": {
"total": 1,
"offset": 0,
"limit": 1000,
"desc": false,
"count": 1,
"items": [
{
"id": "asdLZtadYvn4mBZmm",
"userId": "wRsJZtadYvn4mBZmm",
"webhookId": "asdLZtadYvn4mBZmm",
"createdAt": "2019-12-12T07:34:14.202Z",
"status": "ACTIVE",
"eventType": "ACTOR.BUILD.ABORTED",
"eventData": "Unknown Type: object,null",
"webhook": {
"_id": "YiKoxjkaS9gjGTqhF",
"actionType": "HTTP_REQUEST",
"condition": {
"actorId": "hksJZtadYvn4mBuin",
"actorTaskId": "asdLZtadYvn4mBZmm",
"actorRunId": "hgdKZtadYvn4mBpoi"
},
"requestUrl": "https://example.com/webhook",
"isAdHoc": false,
"isApifyIntegration": false,
"slackMessage": {
"userIntegrationId": "kLcd8Z4dzXN1z3QzS",
"channelId": "C01234ABCDE",
"messageTemplate": "Actor run {{resource.id}} finished."
},
"googleMail": {
"userIntegrationId": "kLcd8Z4dzXN1z3QzS",
"emailTo": [
"bob@example.com"
],
"subject": "Actor run finished",
"body": "Actor run {{resource.id}} finished.",
"attachmentFormat": "csv",
"attachmentTransformation": {
"fields": [
"title",
"url"
],
"omit": [
"html"
]
}
},
"googleDrive": {
"userIntegrationId": "kLcd8Z4dzXN1z3QzS",
"filename": "results",
"format": "json",
"transformation": {
"fields": [
"title",
"url"
],
"omit": [
"html"
]
}
},
"githubIssue": {
"userIntegrationId": "kLcd8Z4dzXN1z3QzS",
"repository": "apify/apify-docs",
"title": "Actor run failed",
"body": "Actor run {{resource.id}} failed."
}
},
"calls": [
{
"startedAt": "2019-12-12T07:34:14.202Z",
"finishedAt": "2019-12-12T07:34:14.202Z",
"errorMessage": "Cannot send request",
"responseStatus": 200,
"responseBody": "{\"foo\": \"bar\"}",
"debugPostMessage": {}
}
]
}
]
}
}
Schema
data object required
Common pagination fields for list responses.
- total integer required
The total number of items available across all pages.
Possible values:
Example:>= 01 - offset integer required
The starting position for this page of results.
Possible values:
Example:>= 00 - limit integer required
The maximum number of items returned per page.
Possible values:
Example:>= 11000 - desc boolean required
Whether the results are sorted in descending order.
Example:false - count integer required
The number of items returned in this response.
Possible values:
Example:>= 01 items object[] required
- id string requiredExample:
asdLZtadYvn4mBZmm - userId string requiredExample:
wRsJZtadYvn4mBZmm - webhookId string requiredExample:
asdLZtadYvn4mBZmm - createdAt string<date-time> requiredExample:
2019-12-12T07:34:14.202Z - status WebhookDispatchStatus (string) required
Status of the webhook dispatch indicating whether the HTTP request was successful.
Possible values: [
ACTIVE,SUCCEEDED,FAILED] - eventType WebhookEventType (string) required
Type of event that triggers the webhook.
Possible values: [
ACTOR.BUILD.ABORTED,ACTOR.BUILD.CREATED,ACTOR.BUILD.FAILED,ACTOR.BUILD.SUCCEEDED,ACTOR.BUILD.TIMED_OUT,ACTOR.RUN.ABORTED,ACTOR.RUN.CREATED,ACTOR.RUN.FAILED,ACTOR.RUN.RESURRECTED,ACTOR.RUN.SUCCEEDED,ACTOR.RUN.TIMED_OUT,TEST] eventData eventData (object,null)
- actorId string requiredExample:
vvE7iMKuMc5qTHHsR - actorRunId stringExample:
JgwXN9BdwxGcu9MMF - actorBuildId stringExample:
HG7ML7M8z78YcAPEB - actorTaskId string | null nullableExample:
zRLp8SDOZz2NyLg7K
- actorId string requiredExample:
webhook object
- anyOf
- WebhookDispatchWebhookSummary
- null
- _id string
ID of the webhook. The API returns it under
Example:_id, notid.YiKoxjkaS9gjGTqhF - actionType stringExample:
HTTP_REQUEST condition object
- actorId string | null nullableExample:
hksJZtadYvn4mBuin - actorTaskId string | null nullableExample:
asdLZtadYvn4mBZmm - actorRunId string | null nullableExample:
hgdKZtadYvn4mBpoi
- actorId string | null nullableExample:
- requestUrl string,null<uri> nullable
URL of the HTTP request sent by the webhook. It is
Example:nullfor hook actions other than the conventional HTTP case (e.g. Slack or email notifications).https://example.com/webhook - isAdHoc booleanExample:
false - isApifyIntegration boolean | null nullableExample:
false slackMessage object
Slack message configuration. Present only when
actionTypeisSLACK_MESSAGE.- userIntegrationId stringExample:
kLcd8Z4dzXN1z3QzS - channelId stringExample:
C01234ABCDE - messageTemplate stringExample:
Actor run {{resource.id}} finished.
- userIntegrationId stringExample:
googleMail object
Gmail email configuration. Present only when
actionTypeisGOOGLE_MAIL.- userIntegrationId stringExample:
kLcd8Z4dzXN1z3QzS - emailTo string[]Example:
["bob@example.com"] - subject stringExample:
Actor run finished - body stringExample:
Actor run {{resource.id}} finished. - attachmentFormat string | null nullableExample:
csv attachmentTransformation object
Selects which dataset item fields are included in the output.
- fields string[]Example:
["title","url"] - omit string[]Example:
["html"]
- fields string[]Example:
- userIntegrationId stringExample:
googleDrive object
Google Drive upload configuration. Present only when
actionTypeisGOOGLE_DRIVE.- userIntegrationId stringExample:
kLcd8Z4dzXN1z3QzS - filename stringExample:
results - format string | null nullableExample:
json transformation object
Selects which dataset item fields are included in the output.
- fields string[]Example:
["title","url"] - omit string[]Example:
["html"]
- fields string[]Example:
- userIntegrationId stringExample:
githubIssue object
GitHub issue configuration. Present only when
actionTypeisGITHUB_ISSUE.- userIntegrationId stringExample:
kLcd8Z4dzXN1z3QzS - repository stringExample:
apify/apify-docs - title stringExample:
Actor run failed - body stringExample:
Actor run {{resource.id}} failed.
- userIntegrationId stringExample:
calls object[]
- startedAt string,null<date-time> nullableExample:
2019-12-12T07:34:14.202Z - finishedAt string,null<date-time> nullableExample:
2019-12-12T07:34:14.202Z - errorMessage string | null nullableExample:
Cannot send request - responseStatus integer | null nullableExample:
200 - responseBody string | null nullableExample:
{"foo": "bar"} debugPostMessage object
Response of the Slack
chat.postMessagecall. Present only for successful calls ofSLACK_MESSAGEwebhooks.- property name* any
Response of the Slack
chat.postMessagecall. Present only for successful calls ofSLACK_MESSAGEwebhooks.
- property name* any
- startedAt string,null<date-time> nullableExample:
- id string requiredExample:
- total integer required
Status 400
Bad request - invalid input parameters or request body.
{
"error": {
"type": "invalid-input",
"message": "Invalid input: The request body contains invalid data."
}
}
Schema
error object required
- type ErrorType (string)
Machine-readable error type, for example
record-not-found. Use it to handle specific errors in your code. For common error types, see Errors. - message string
Human-readable error message describing what went wrong.
- data object
Additional machine-readable details about the error. Present only for some error types.
- type ErrorType (string)
Status 401
Unauthorized - the authentication token is missing or not valid.
The request doesn't include an API token.
{
"error": {
"type": "token-not-provided",
"message": "Authentication token was not provided"
}
}
The API token isn't valid, or its user no longer exists.
{
"error": {
"type": "user-or-token-not-found",
"message": "User was not found or authentication token is not valid"
}
}
Schema
error object required
- type ErrorType (string)
Machine-readable error type, for example
record-not-found. Use it to handle specific errors in your code. For common error types, see Errors. - message string
Human-readable error message describing what went wrong.
- data object
Additional machine-readable details about the error. Present only for some error types.
- type ErrorType (string)
Status 403
Forbidden - insufficient permissions to perform this action.
{
"error": {
"type": "insufficient-permissions",
"message": "You do not have permission to perform this action."
}
}
Schema
error object required
- type ErrorType (string)
Machine-readable error type, for example
record-not-found. Use it to handle specific errors in your code. For common error types, see Errors. - message string
Human-readable error message describing what went wrong.
- data object
Additional machine-readable details about the error. Present only for some error types.
- type ErrorType (string)
Status 405
Method not allowed.
{
"error": {
"type": "method-not-allowed",
"message": "This API end-point can only be accessed using the following HTTP methods: OPTIONS,GET"
}
}
Schema
error object required
- type ErrorType (string)
Machine-readable error type, for example
record-not-found. Use it to handle specific errors in your code. For common error types, see Errors. - message string
Human-readable error message describing what went wrong.
- data object
Additional machine-readable details about the error. Present only for some error types.
- type ErrorType (string)
Status 429
Too many requests - rate limit exceeded.
{
"error": {
"type": "rate-limit-exceeded",
"message": "You have exceeded the rate limit. Please try again later."
}
}
Schema
error object required
- type ErrorType (string)
Machine-readable error type, for example
record-not-found. Use it to handle specific errors in your code. For common error types, see Errors. - message string
Human-readable error message describing what went wrong.
- data object
Additional machine-readable details about the error. Present only for some error types.
- type ErrorType (string)