Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/admin/webhooks 200 { "webhooks": null }
// Successful request GET /api/v2/admin/webhooks 200 { "webhooks": [] }
// Not admin user GET /api/v2/admin/webhooks 401
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/admin/webhooks/1/success 200 { "success_log": null }
// Successful request GET /api/v2/admin/webhooks/2/success 200 { "success_log": [] }
// Not admin user GET /api/v2/admin/webhooks/:webhook_id/success 401
// Webhook not found GET /api/v2/admin/webhooks/-1/success 404 { "error": "Couldn't find Webhook with 'id'=-1" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request GET /api/v2/admin/webhooks/3/failed 200 { "failed_log": null }
// Successful request GET /api/v2/admin/webhooks/4/failed 200 { "failed_log": [] }
// Not admin user GET /api/v2/admin/webhooks/:webhook_id/failed 401
// Webhook not found GET /api/v2/admin/webhooks/-1/failed 404 { "error": "Couldn't find Webhook with 'id'=-1" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
name required |
Webhook name Validations:
|
http_url required |
Webhook URL Validations:
|
http_method required |
Webhook Method Validations:
|
trigger_events required |
Webhook trigger events Validations:
|
project_id optional |
Id of the webhook project Validations:
|
// Successful request POST /api/v2/admin/webhooks { "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ], "project_id": "GsrwPNm6nJ7CKRYnQZl6" } 200 { "webhook": { "id": 5, "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ], "created_at": "2023-11-27T09:42:39.937Z", "updated_at": "2023-11-27T09:42:39.937Z", "disabled": false, "project_id": "GsrwPNm6nJ7CKRYnQZl6", "queue_length": 0, "retry_queue_length": 0, "latest_run": null, "webhook_users": [], "webhook_headers": [] } }
// Successful request POST /api/v2/admin/webhooks { "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ] } 200 { "webhook": { "id": 6, "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ], "created_at": "2023-11-27T09:42:40.100Z", "updated_at": "2023-11-27T09:42:40.100Z", "disabled": false, "project_id": null, "queue_length": 0, "retry_queue_length": 0, "latest_run": null, "webhook_users": [], "webhook_headers": [] } }
// Not admin user POST /api/v2/admin/webhooks 401
// Missing parameters POST /api/v2/admin/webhooks { "name": "Sample Webhook", "http_url": null, "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ] } 422 { "error": "Invalid parameter 'http_url' value nil: Must be a String" }
// Project not found POST /api/v2/admin/webhooks { "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ], "project_id": "test_id" } 404 { "error": "project not found" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
name optional |
Webhook name Validations:
|
http_url optional |
Webhook URL Validations:
|
http_method optional |
Webhook Method Validations:
|
trigger_events optional |
Webhook trigger events Validations:
|
disabled optional |
Determines whether webhook is active or not Validations:
|
project_id optional |
Id of the webhook project Validations:
|
// Successful request POST /api/v2/admin/webhooks/7 { "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ], "project_id": "dh2NNcH3slJtkJqnfCD2" } 200 { "webhook": { "id": 7, "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ], "created_at": "2023-11-27T09:42:40.460Z", "updated_at": "2023-11-27T09:42:40.608Z", "disabled": false, "project_id": "dh2NNcH3slJtkJqnfCD2", "queue_length": 0, "retry_queue_length": 0, "latest_run": null, "webhook_users": [], "webhook_headers": [] } }
// Successful request POST /api/v2/admin/webhooks/8 { "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ] } 200 { "webhook": { "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ], "project_id": null, "id": 8, "created_at": "2023-11-27T09:42:40.684Z", "updated_at": "2023-11-27T09:42:40.780Z", "disabled": false, "queue_length": 0, "retry_queue_length": 0, "latest_run": null, "webhook_users": [], "webhook_headers": [] } }
// Not admin user POST /api/v2/admin/webhooks/:webhook_id 401
// Webhook not found POST /api/v2/admin/webhooks/-1 { "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ] } 404 { "error": "Couldn't find Webhook with 'id'=-1" }
// Project not found POST /api/v2/admin/webhooks/9 { "name": "Sample Webhook", "http_url": "https://example.website.com", "http_method": "POST", "trigger_events": [ "ASSET_ADDED" ], "project_id": "test_id" } 404 { "error": "project not found" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request DELETE /api/v2/admin/webhooks/10 200 { "ok": "Webhook deleted" }
// Successful request DELETE /api/v2/admin/webhooks/11 200 { "ok": "Webhook deleted" }
// Not admin user DELETE /api/v2/admin/webhooks/:webhook_id 401
// Webhook not found DELETE /api/v2/admin/webhooks/:webhook_id 404 { "error": "Couldn't find Webhook with 'id'=:webhook_id" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
header_key required |
Header Key Validations:
|
header_value required |
Header value, or HMAC secret used to generate signature value Validations:
|
hidden optional |
Determines should the header_value be returned when the webhook is queried Validations:
|
is_hmac optional |
Determines should the header_value be used as a secret to generate a HMAC signature Validations:
|
// Successful request POST /api/v2/admin/webhooks/12/webhook_headers { "header_key": "test-key", "header_value": "test-value", "hidden": false, "is_hmac": false } 200 { "webhook_header": null }
// Successful request POST /api/v2/admin/webhooks/13/webhook_headers { "header_key": "test-key", "header_value": "test-value", "hidden": false, "is_hmac": false } 200 { "webhook_header": { "id": 1, "webhook_id": 13, "header_key": "test-key", "header_value": "test-value", "hidden": false, "is_hmac": false, "created_at": "2023-11-27T09:42:41.749Z", "updated_at": "2023-11-27T09:42:41.749Z" } }
// Not admin user POST /api/v2/admin/webhooks/:webhook_id/webhook_headers 401
// Missing parameters POST /api/v2/admin/webhooks/14/webhook_headers { "header_key": "test-key" } 422 { "error": "Missing parameter header_value" }
// Webhook not found POST /api/v2/admin/webhooks/-1/webhook_headers { "header_key": "test-key", "header_value": "test-value", "hidden": false, "is_hmac": false } 404 { "error": "Couldn't find Webhook with 'id'=-1" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request DELETE /api/v2/admin/webhooks/15/webhook_headers/2 200 { "ok": "Webhook header deleted" }
// Successful request DELETE /api/v2/admin/webhooks/16/webhook_headers/3 200 { "ok": "Webhook header deleted" }
// Not admin user DELETE /api/v2/admin/webhooks/:webhook_id/webhook_headers/:webhook_header_id 401
// Webhook header not found DELETE /api/v2/admin/webhooks/17/webhook_headers/-1 404 { "error": "Couldn't find WebhookHeader with 'id'=-1 [WHERE \"webhook_headers\".\"webhook_id\" = $1]" }
// Webhook not found DELETE /api/v2/admin/webhooks/-1/webhook_headers/4 404 { "error": "Couldn't find Webhook with 'id'=-1" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
user_id required |
ID of the selected user Validations:
|
// Successful request POST /api/v2/admin/webhooks/19/webhook_users { "webhook_id": 19, "user_id": 44 } 200 { "webhook_user": null }
// Successful request POST /api/v2/admin/webhooks/20/webhook_users { "webhook_id": 20, "user_id": 45 } 200 { "webhook_user": { "id": 1, "webhook_id": 20, "user_id": 45, "created_at": "2023-11-27T09:42:42.764Z", "updated_at": "2023-11-27T09:42:42.764Z" } }
// Not admin user POST /api/v2/admin/webhooks/:webhook_id/webhook_users 401
// Missing parameters POST /api/v2/admin/webhooks/21/webhook_users { "webhook_id": 21 } 422 { "error": "Missing parameter user_id" }
// Webhook not found POST /api/v2/admin/webhooks/-1/webhook_users { "webhook_id": 22, "user_id": 48 } 404 { "error": "Couldn't find Webhook with 'id'=-1" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |
Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
// Successful request DELETE /api/v2/admin/webhooks/23/webhook_users/2 200 { "ok": "Webhook user deleted" }
// Successful request DELETE /api/v2/admin/webhooks/24/webhook_users/3 200 { "ok": "Webhook user deleted" }
// Not admin user DELETE /api/v2/admin/webhooks/:webhook_id/webhook_users/:webhook_user_id 401
// Webhook user not found DELETE /api/v2/admin/webhooks/25/webhook_users/-1 404 { "error": "Couldn't find WebhookUser with 'id'=-1 [WHERE \"webhook_users\".\"webhook_id\" = $1]" }
// Webhook not found DELETE /api/v2/admin/webhooks/26/webhook_users/-1 404 { "error": "Couldn't find WebhookUser with 'id'=-1 [WHERE \"webhook_users\".\"webhook_id\" = $1]" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |