Retrieve webhook
import requests
url = "https://api.datagrid.com/v1/webhooks/{webhook_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/webhooks/{webhook_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>'{
"object": "webhook",
"id": "<string>",
"url": "<string>",
"events": [
"knowledge.processing.completed"
],
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Webhooks
Retrieve webhook
Retrieve a specific webhook subscription by ID.
GET
/
webhooks
/
{webhook_id}
Retrieve webhook
import requests
url = "https://api.datagrid.com/v1/webhooks/{webhook_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/webhooks/{webhook_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>'{
"object": "webhook",
"id": "<string>",
"url": "<string>",
"events": [
"knowledge.processing.completed"
],
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the webhook to retrieve.
Response
Successfully retrieved webhook
The webhook object represents an outbound webhook subscription.
The object type, which is always webhook.
Available options:
webhook The webhook identifier.
The destination URL for webhook deliveries.
The subscribed event types. Currently delivered events include knowledge.processing.completed, batch_prediction.completed, batch_prediction.failed, batch_prediction.expired, and batch_prediction.cancelled.
Available options:
knowledge.processing.completed, batch_prediction.completed, batch_prediction.failed, batch_prediction.expired, batch_prediction.cancelled Whether delivery is enabled for this webhook.
The ISO string for when the webhook was created.
The ISO string for when the webhook was last updated.