Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 11 Next »

For sending this request, you have to be authorized. See the Authorization page for more details.

Use this request to list all your active webhook configurations.

Request

curl -X GET https://rest.doo.net/v1/team/<team_id>/webhooks \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' \
-H 'Authorization: Bearer <access_token>'

Parameters

Parameter

Required

Description

<team_id>

Yes

Team ID for which you want to list the webhooks.

See Get all organizations and teams to figure out the Team ID.

<api_key>

Yes

See Authorization

<access_token>

Yes

See Authorization

Response examples

Example 1 - standard webhook

{
    "_links": {
        "self": {
            "href": "https://rest.doo.net/team/<team_id>/webhooks?page=1"
        },
        "first": {
            "href": "https://rest.doo.net/team/<team_id>/webhooks"
        },
        "last": {
            "href": "https://rest.doo.net/team/<team_id>/webhooks?page=1"
        }
    },
    "_embedded": {
        "webhooks": [
            {
                "id": "<webhook_configuration_id>",
                "name": "<webhook_configuration_name>",
                "description": "<webhook_configuration_description>",
                "hooks": [
                    {
                        "type": "event_created",
                        "method": "POST",
                        "endpoint": "https://company.com/receive-doo-webhooks"
                    },
                    {
                        "type": "event_removed",
                        "method": "POST",
                        "endpoint": "https://company.com/receive-doo-webhooks"
                    },
                    {
                        "type": "event_updated",
                        "method": "POST",
                        "endpoint": "https://company.com/receive-doo-webhooks"
                    },
                    {
                        "type": "order_created",
                        "method": "POST",
                        "endpoint": "https://company.com/receive-doo-webhooks"
                    },
                    {
                        "type": "order_removed",
                        "method": "POST",
                        "endpoint": "https://company.com/receive-doo-webhooks"
                    },
                    {
                        "type": "order_updated",
                        "method": "POST",
                        "endpoint": "https://company.com/receive-doo-webhooks"
                    },
                    {
                        "type": "order_cancelled",
                        "method": "POST",
                        "endpoint": "https://company.com/receive-doo-webhooks"
                    }
                ],
                "authentication": {
                    "grant_type": "client_credentials",
                    "endpoint": "https://company.com/authorize-doo-webhooks",
                    "credentials": {
                        "client_id": "doo",
                        "client_secret": "super-strong-secret"
                    },
                    "header_format": "Authorization",
                    "header_value_format": "Bearer %ACCESS_TOKEN%"
                },
                "_links": {
                    "self": {
                        "href": "https://rest.doo.net/v1/webhooks/38cc7e8d-d107-11e7-bde8-0206116776d1"
                    }
                }
            }
        ]
    },
    "page_count": 1,
    "page_size": 25,
    "total_items": 5,
    "page": 1
}

Example 2 - GraphQL webhook

{
  "_links": {
    "self": {
      "href": "https://rest.doo.net/v1/team/<team_id>/webhooks?page=1"
    },
    "first": {
      "href": "https://rest.doo.net/v1/team/<team_id>/webhooks"
    },
    "last": {
      "href": "https://rest.doo.net/v1/team/<team_id>/webhooks?page=1"
    }
  },
  "_embedded": {
    "webhooks": [
      {
        "id": "<webhook_configuration_id>",
        "name": "<webhook_configuration_name>",
        "description": "<webhook_configuration_description>",
        "hooks": [
          {
            "type": "event_created_92bd9a53281981160c955e339304b3e5",
            "method": "POST",
            "endpoint": "https://company.com/receive-doo-webhooks",
            "origin": {
              "method": "POST",
              "endpoint": "https://graphql.doo.net",
              "body": "{\"operationName\":\"EventCreatedShort\",\"variables\":{\"id\":\"%EVENT_ID%\"},\"query\":\"query EventCreatedShort($id: ID!) {\\n event(id: $id) {\\n title\\n }\\n}\\n\"}"
            }
          },
          {
            "type": "event_updated_2104384af7e8434f0058ed57163b6f33",
            "method": "POST",
            "endpoint": "https://company.com/receive-doo-webhooks",
            "origin": {
              "method": "POST",
              "endpoint": "https://graphql.doo.net",
              "body": "{\"operationName\":\"EventUpdatedShort\",\"variables\":{\"id\":\"%EVENT_ID%\"},\"query\":\"query EventUpdatedShort($id: ID!) {\\n event(id: $id) {\\n title\\n }\\n}\\n\"}"
            }
          }
        ],
        "authentication": {
          "grant_type": "client_credentials",
          "endpoint": "https://company.com/authorize-doo-webhooks",
          "credentials": {
            "client_id": "doo",
            "client_secret": "super-strong-secret"
          },
          "header_format": "Authorization",
          "header_value_format": "Bearer %ACCESS_TOKEN%"
        },
        "_links": {
          "self": {
            "href": "https://api.staging1.doo.net/v1/team/<team_id>/webhooks"
          }
        }
      }
    ]
  },
  "page_count": 1,
  "page_size": 7,
  "total_items": 1,
  "page": 1
}
  • No labels