Update webhook
import requests
url = "https://api.datagrid.com/v1/webhooks/{webhook_id}"
payload = {
"url": "<string>",
"events": [],
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: [], enabled: true})
};
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 PATCH \
--url https://api.datagrid.com/v1/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"enabled": true
}
'{
"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
Update webhook
Update webhook configuration. You can modify the URL, subscribed events, and enabled status.
PATCH
/
webhooks
/
{webhook_id}
Update webhook
import requests
url = "https://api.datagrid.com/v1/webhooks/{webhook_id}"
payload = {
"url": "<string>",
"events": [],
"enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', events: [], enabled: true})
};
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 PATCH \
--url https://api.datagrid.com/v1/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"events": [],
"enabled": true
}
'{
"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
Body
application/json
Updated set of event type subscriptions. Currently delivered events include knowledge.processing.completed, batch_prediction.completed, batch_prediction.failed, batch_prediction.expired, and batch_prediction.cancelled.
Minimum array length:
1Available options:
knowledge.processing.completed, batch_prediction.completed, batch_prediction.failed, batch_prediction.expired, batch_prediction.cancelled Response
Successfully updated webhook
The webhook object represents an outbound webhook subscription.
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