Skip to main content

Webhook Actions

https://api.app.wnology.io/applications/APPLICATION_ID/webhooks/WEBHOOK_ID

Below are the various requests that can be performed against the Webhook resource, as well as the expected parameters and the potential responses.

Delete​

Deletes a webhook

Method And Url​

DELETE https://api.app.wnology.io/applications/APPLICATION_ID/webhooks/WEBHOOK_ID

Authentication​

A valid API access token is required to access this endpoint. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, webhook.*, or webhook.delete.

Request Path Components​

Path ComponentDescriptionExample
APPLICATION_IDID associated with the application575ec8687ae143cd83dc4a97
WEBHOOK_IDID associated with the webhook575ed78e7ae143cd83dc4aab

Request Query Parameters​

NameRequiredDescriptionDefaultExample
includeWorkflowsNIf the workflows that utilize this webhook should also be deleted.includeWorkflows=true

Request Headers​

NameRequiredDescriptionDefault
AuthorizationYThe token for authenticating the request, prepended with Bearer

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X DELETE \
https://api.app.wnology.io/applications/APPLICATION_ID/webhooks/WEBHOOK_ID

Successful Responses​

CodeTypeDescription
200SuccessIf webhook was successfully deleted

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if webhook was not found

Get​

Retrieves information on a webhook

Method And Url​

GET https://api.app.wnology.io/applications/APPLICATION_ID/webhooks/WEBHOOK_ID

Authentication​

A valid API access token is required to access this endpoint. The token must include at least one of the following scopes: all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, webhook.*, or webhook.get.

Request Path Components​

Path ComponentDescriptionExample
APPLICATION_IDID associated with the application575ec8687ae143cd83dc4a97
WEBHOOK_IDID associated with the webhook575ed78e7ae143cd83dc4aab

Request Headers​

NameRequiredDescriptionDefault
AuthorizationYThe token for authenticating the request, prepended with Bearer

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X GET \
https://api.app.wnology.io/applications/APPLICATION_ID/webhooks/WEBHOOK_ID

Successful Responses​

CodeTypeDescription
200WebhookWebhook information

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if webhook was not found

Patch​

Updates information about a webhook

Method And Url​

PATCH https://api.app.wnology.io/applications/APPLICATION_ID/webhooks/WEBHOOK_ID

Authentication​

A valid API access token is required to access this endpoint. The token must include at least one of the following scopes: all.Application, all.Organization, all.User, webhook.*, or webhook.patch.

Request Path Components​

Path ComponentDescriptionExample
APPLICATION_IDID associated with the application575ec8687ae143cd83dc4a97
WEBHOOK_IDID associated with the webhook575ed78e7ae143cd83dc4aab

Request Headers​

NameRequiredDescriptionDefault
AuthorizationYThe token for authenticating the request, prepended with Bearer

Request Body​

The body of the request should be serialized JSON that validates against the Webhook Patch schema. For example, the following would be a valid body for this request:

{
"name": "My Updated Webhook",
"responseCode": 201
}

Curl Example​

curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_API_ACCESS_TOKEN' \
-X PATCH \
-d '{"name":"My Updated Webhook","responseCode":201}' \
https://api.app.wnology.io/applications/APPLICATION_ID/webhooks/WEBHOOK_ID

Successful Responses​

CodeTypeDescription
200WebhookUpdated webhook information

Error Responses​

CodeTypeDescription
400ErrorError if malformed request
404ErrorError if webhook was not found

Schemas​

Error​

Schema for errors returned by the API

Error Schema​

  • ▶
    {} 3 keys
    • "http://json-schema.org/draft-07/schema#"
    • "object"
    • ▶
      {} 2 keys
      • ▶
        {} 1 key
        • ▶
          {} 1 key

      Error Example​

      • ▶
        {} 2 keys
        • "NotFound"
        • "Application was not found"

      Success​

      Schema for reporting a successful operation

      Success Schema​

      • ▶
        {} 3 keys
        • "http://json-schema.org/draft-07/schema#"
        • "object"
        • ▶
          {} 1 key
          • ▶
            {} 2 keys

        Success Example​

        • ▶
          {} 1 key
          • true

        Webhook​

        Schema for a single Webhook

        Webhook Schema​

        • ▶
          {} 3 keys
          • "http://json-schema.org/draft-07/schema#"
          • "object"
          • ▶
            {} 18 keys
            • ▶
              {} 2 keys
              • ▶
                {} 2 keys
                • ▶
                  {} 2 keys
                  • ▶
                    {} 2 keys
                    • ▶
                      {} 2 keys
                      • ▶
                        {} 3 keys
                        • ▶
                          {} 2 keys
                          • ▶
                            {} 2 keys
                            • ▶
                              {} 3 keys
                              • ▶
                                {} 2 keys
                                • ▶
                                  {} 2 keys
                                  • ▶
                                    {} 1 key
                                    • ▶
                                      {} 2 keys
                                      • ▶
                                        {} 2 keys
                                        • ▶
                                          {} 1 key
                                          • ▶
                                            {} 2 keys
                                            • ▶
                                              {} 1 key
                                              • ▶
                                                {} 1 key

                                            Webhook Example​

                                            • ▶
                                              {} 9 keys
                                              • "575ed78e7ae143cd83dc4aab"
                                              • "575ed78e7ae143cd83dc4aab"
                                              • "575ec8687ae143cd83dc4a97"
                                              • "2016-06-13T04:00:00.000Z"
                                              • "2016-06-13T04:00:00.000Z"
                                              • "My Webhook"
                                              • "the_webhook_token"
                                              • 200
                                              • false

                                            Webhook Patch​

                                            Schema for the body of a Webhook modification request

                                            Webhook Patch Schema​

                                            • ▶
                                              {} 4 keys
                                              • "http://json-schema.org/draft-07/schema#"
                                              • "object"
                                              • ▶
                                                {} 12 keys
                                                • ▶
                                                  {} 3 keys
                                                  • ▶
                                                    {} 2 keys
                                                    • ▶
                                                      {} 3 keys
                                                      • ▶
                                                        {} 2 keys
                                                        • ▶
                                                          {} 2 keys
                                                          • ▶
                                                            {} 1 key
                                                            • ▶
                                                              {} 2 keys
                                                              • ▶
                                                                {} 2 keys
                                                                • ▶
                                                                  {} 1 key
                                                                  • ▶
                                                                    {} 2 keys
                                                                    • ▶
                                                                      {} 1 key
                                                                      • ▶
                                                                        {} 1 key
                                                                      • false

                                                                    Webhook Patch Example​

                                                                    • ▶
                                                                      {} 2 keys
                                                                      • "My Updated Webhook"
                                                                      • 201

                                                                    Was this page helpful?


                                                                    Still looking for help? You can also search the WEGnology Forums or submit your question there.