Retrieves the specified webhook.
Authentication
The Webhooks API V2 can only be called by Service Applications. This request requires an Authorization
header with a valid Bearer token with the webhooks:read
scope. For more information on Service Applications and how to obtain an access token can be found here. A list of your Service Applications can be found here.
Authorization
The Service Application must have the webhooks_maintainer
permission assigned at the iTwin level or be an Organization Administrator for the Organization that owns a given iTwin.
An Organization Administrator must have at least one of the following roles assigned in User Management: Account Administrator, Co-Administrator, or CONNECT Services Administrator. For more information about User Management please visit our Bentley Communities Licensing, Cloud, and Web Services wiki page.
Request parameters
Request headers
OAuth access token with itwin-platform
scope
Setting to application/vnd.bentley.itwin-platform.v2+json
is recommended.
Response 200 OK
OK
{ "id": "e6989b43-53ab-45e2-a610-560c6f7e879e", "scope": "Account", "scopeId": "5c9d64cf-d22f-4149-ad08-c24ff395c3a0", "active": false, "callbackUrl": "https://some-callback.example.com", "eventTypes": ["iModels.iModelDeleted.v1"], "created": "2023-10-02T14:55:00.463Z", "modified": "2023-10-06T20:03:15.562Z" }
Response 401 Unauthorized
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 404 Not Found
Specified webhook was not found.
{ "error": { "code": "WebhookNotFound", "message": "Requested webhook is not available." } }
Response 429 Too many requests
This response indicates that the client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
webhook-scope
Scope of the webhook. Possible values: 'Account', 'iTwin'.
{ "type": "string", "description": "Scope of the webhook. Possible values: 'Account', 'iTwin'.", "enum": [ "Account", "iTwin" ] }
Webhook
Common property representation of a webhook.
Globally unique identifier of the webhook.
Globally unique identifier of the acount of the webhook.
An indicator showing webhook activity. If true, webhook is actively forwarding the events. If false, webhook events are stopped.
URL where webhook events are sent.
List of event types the webhook is subscribed to.
When the webhook was created.
When the webhook was modified.
{ "type": "object", "title": "Webhook", "description": "Common property representation of a webhook.", "properties": { "id": { "type": "string", "description": "Globally unique identifier of the webhook." }, "scope": { "$ref": "#/components/schemas/webhook-scope" }, "scopeId": { "type": "string", "description": "Globally unique identifier of the acount of the webhook." }, "active": { "type": "boolean", "description": "An indicator showing webhook activity. If true, webhook is actively forwarding the events. If false, webhook events are stopped." }, "callbackUrl": { "type": "string", "description": "URL where webhook events are sent." }, "eventTypes": { "type": "array", "description": "List of event types the webhook is subscribed to.", "items": { "type": "string" } }, "created": { "type": "string", "description": "When the webhook was created." }, "modified": { "type": "string", "description": "When the webhook was modified." } }, "additionalProperties": false }
Error
Contains error information.
One of a server-defined set of error codes.
A human-readable representation of the error.
The target of the error.
{ "type": "object", "description": "Contains error information.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error.", "nullable": true } }, "required": [ "code", "message" ], "additionalProperties": true }
Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Error Response", "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "properties": { "error": { "description": "Error information.", "$ref": "#/components/schemas/Error" } }, "required": [ "error" ], "additionalProperties": false }
Was this page helpful?