Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Webhook filters #6

Open
alexandradeas opened this issue Oct 26, 2021 · 1 comment
Open

Webhook filters #6

alexandradeas opened this issue Oct 26, 2021 · 1 comment

Comments

@alexandradeas
Copy link
Member

Contentful's webhook API supports filtering based on Environment, Entity, and Content Type however the provider does not currently support filtering of the contentful_webhook resource in contentful besides space_id. The contentful_webhook resource should be updated to include an optional filter field that accepts a list of Environment, Entity, or Content Type IDs to be applied to the webhook.

As the handling of environments differs from the majority of other resources specific mention should be made of this in the documentation.

https://www.contentful.com/developers/docs/references/content-management-api/#/reference/webhooks/webhook

@alexandradeas
Copy link
Member Author

Filters are represented in the API as:

      "filters": [
        {
          "not": {
            "equals": [
              {
                "doc": "sys.environment.sys.id"
              },
              "foo"
            ]
          }
        },
        {
          "equals": [
            {
              "doc": "sys.contentType.sys.id"
            },
            "bar"
          ]
        },
        {
          "equals": [
            {
              "doc": "sys.id"
            },
            "baz"
          ]
        },
        {
          "equals": [
            {
              "doc": "sys.createdBy.sys.id"
            },
            "created-user"
          ]
        },
        {
          "equals": [
            {
              "doc": "sys.updatedBy.sys.id"
            },
            "updated-user"
          ]
        }
      ],

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant