Update a webhook subscription
const url = 'http://localhost:8000/webhooks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';
const options = {
method: 'PATCH',
headers: {'API-Key': '<API-Key>', 'Content-Type': 'application/json'},
body: '{"name":"example","url":"https://example.com","enabled":true,"source":"keycloak","event_types":["example"],"signing_secret":"example","cluster_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","realm_id":"123e4567-e89b-12d3-a456-426614174000","authorization_header":"example"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}curl --request PATCH \
--url http://localhost:8000/webhooks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'API-Key: <API-Key>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "url": "https://example.com", "enabled": true, "source": "keycloak", "event_types": [ "example" ], "signing_secret": "example", "cluster_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "realm_id": "123e4567-e89b-12d3-a456-426614174000", "authorization_header": "example" }'Partially updates a subscription. Omitted secrets retain their stored values.
A supplied url must include an endpoint path; the rule applies to the URL being saved, so a subscription stored with a bare URL keeps working until its URL is changed.
Required scope: webhooks:write
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Patch request for updating a webhook subscription. At least one field should be provided.
object
Delivery endpoint. Must be an http or https URL that includes an endpoint path, for example https://api.example.com/webhooks/events. A bare origin with no path (or a path of just /) is rejected.
Responses
Section titled “Responses”The request has succeeded.
Saved webhook subscription for the authenticated workspace.
object
Example
{
"source": "keycloak"
}The server could not understand the request due to invalid syntax.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Access is unauthorized.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Client error
Returned when a workspace plan quota would be exceeded. required_plan indicates the minimum plan needed to complete the request.
object
Machine-readable identifier of the quota that was hit, so a client can tell
quotas apart without parsing detail. Known values include cluster_limit
(the workspace’s total cluster allowance), cluster_size_quota (the
allowance for the requested cluster size) and cluster_size (the requested
size is not offered on the plan at all). New values may be added.
How many of the resource the workspace currently has.
Maximum allowed by the current plan. 0 means the plan does not include the resource at all.
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"current_plan": "example",
"required_plan": "example",
"code": "example",
"current_usage": 1,
"current_limit": 1
}Access is forbidden.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}The server cannot find the requested resource.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Client error
object
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"errors": [
{
"field": "example",
"detail": "example",
"code": "example",
"value": "example"
}
]
}Client error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Headers
Section titled “Headers”Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}