Test webhook
POST/v2/webhooks/:webhookId/test
Tests a webhook. Creates a webhook dispatch with a dummy payload.
Request
Path Parameters
Webhook ID.
Example:pVJtoTelgYUq4qJOtStatus 201
Response Headers
{
"data": {
"id": "asdLZtadYvn4mBZmm",
"userId": "wRsJZtadYvn4mBZmm",
"webhookId": "asdLZtadYvn4mBZmm",
"createdAt": "2019-12-12T07:34:14.202Z",
"status": "ACTIVE",
"eventType": "ACTOR.BUILD.ABORTED",
"eventData": "Unknown Type: object,null",
"calls": [
{
"startedAt": "2019-12-12T07:34:14.202Z",
"finishedAt": "2019-12-12T07:34:14.202Z",
"errorMessage": "Cannot send request",
"responseStatus": 200,
"responseBody": "{\"foo\": \"bar\"}"
}
]
}
}
Schema
data 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 string requiredExample:
JgwXN9BdwxGcu9MMF
- actorId string requiredExample:
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"}
- startedAt string,null<date-time> nullableExample:
- id string requiredExample:
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-processable error type identifier.
Possible values: [
actor-memory-limit-exceeded,actor-not-found,invalid-input,method-not-allowed,permission-denied,rate-limit-exceeded,record-not-found,record-not-unique,record-or-token-not-found,request-id-invalid,request-too-large,run-failed,run-timeout-exceeded,token-not-valid,unknown-build-tag,unsupported-content-encoding] - message string
Human-readable error message describing what went wrong.
- type ErrorType (string)
Status 401
Unauthorized - authentication required or invalid token.
{
"error": {
"type": "token-not-valid",
"message": "Authentication token is not valid."
}
}
Schema
error object required
- type ErrorType (string)
Machine-processable error type identifier.
Possible values: [
actor-memory-limit-exceeded,actor-not-found,invalid-input,method-not-allowed,permission-denied,rate-limit-exceeded,record-not-found,record-not-unique,record-or-token-not-found,request-id-invalid,request-too-large,run-failed,run-timeout-exceeded,token-not-valid,unknown-build-tag,unsupported-content-encoding] - message string
Human-readable error message describing what went wrong.
- type ErrorType (string)
Status 403
Forbidden - insufficient permissions to perform this action.
{
"error": {
"type": "permission-denied",
"message": "You do not have permission to perform this action."
}
}
Schema
error object required
- type ErrorType (string)
Machine-processable error type identifier.
Possible values: [
actor-memory-limit-exceeded,actor-not-found,invalid-input,method-not-allowed,permission-denied,rate-limit-exceeded,record-not-found,record-not-unique,record-or-token-not-found,request-id-invalid,request-too-large,run-failed,run-timeout-exceeded,token-not-valid,unknown-build-tag,unsupported-content-encoding] - message string
Human-readable error message describing what went wrong.
- type ErrorType (string)
Status 404
Not found - the requested resource does not exist.
{
"error": {
"type": "record-not-found",
"message": "The requested resource was not found."
}
}
Schema
error object required
- type ErrorType (string)
Machine-processable error type identifier.
Possible values: [
actor-memory-limit-exceeded,actor-not-found,invalid-input,method-not-allowed,permission-denied,rate-limit-exceeded,record-not-found,record-not-unique,record-or-token-not-found,request-id-invalid,request-too-large,run-failed,run-timeout-exceeded,token-not-valid,unknown-build-tag,unsupported-content-encoding] - message string
Human-readable error message describing what went wrong.
- 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-processable error type identifier.
Possible values: [
actor-memory-limit-exceeded,actor-not-found,invalid-input,method-not-allowed,permission-denied,rate-limit-exceeded,record-not-found,record-not-unique,record-or-token-not-found,request-id-invalid,request-too-large,run-failed,run-timeout-exceeded,token-not-valid,unknown-build-tag,unsupported-content-encoding] - message string
Human-readable error message describing what went wrong.
- 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-processable error type identifier.
Possible values: [
actor-memory-limit-exceeded,actor-not-found,invalid-input,method-not-allowed,permission-denied,rate-limit-exceeded,record-not-found,record-not-unique,record-or-token-not-found,request-id-invalid,request-too-large,run-failed,run-timeout-exceeded,token-not-valid,unknown-build-tag,unsupported-content-encoding] - message string
Human-readable error message describing what went wrong.
- type ErrorType (string)