Asana · Schema

WebhookFilter

A WebhookFilter can be passed on creation of a webhook in order to filter the types of actions that trigger delivery of an [event](/reference/events)

CollaborationProductivityProject ManagementProjectsTask ManagementTasksWorkflow

Properties

Name Type Description
resource_type string The type of the resource which created the event when modified; for example, to filter to changes on regular tasks this field should be set to `task`.
resource_subtype string The resource subtype of the resource that the filter applies to. This should be set to the same value as is returned on the `resource_subtype` field on the resources themselves.
action string The type of change on the **resource** to pass through the filter. For more information refer to `Event.action` in the [event](/reference/events) schema. This can be one of `changed`, `added`, `remove
fields array *Conditional.* A whitelist of fields for events which will pass the filter when the resource is changed. These can be any combination of the fields on the resources themselves. This field is only vali
View JSON Schema on GitHub

JSON Schema

asana-webhookfilter-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/WebhookFilter",
  "title": "WebhookFilter",
  "type": "object",
  "description": "A WebhookFilter can be passed on creation of a webhook in order to filter the types of actions that trigger delivery of an [event](/reference/events)",
  "properties": {
    "resource_type": {
      "type": "string",
      "description": "The type of the resource which created the event when modified; for example, to filter to changes on regular tasks this field should be set to `task`.",
      "example": "task"
    },
    "resource_subtype": {
      "description": "The resource subtype of the resource that the filter applies to. This should be set to the same value as is returned on the `resource_subtype` field on the resources themselves.",
      "type": "string",
      "example": "milestone"
    },
    "action": {
      "type": "string",
      "description": "The type of change on the **resource** to pass through the filter. For more information refer to `Event.action` in the [event](/reference/events) schema. This can be one of `changed`, `added`, `removed`, `deleted`, and `undeleted` depending on the nature of what has occurred on the resource.",
      "example": "changed"
    },
    "fields": {
      "type": "array",
      "description": "*Conditional.* A whitelist of fields for events which will pass the filter when the resource is changed. These can be any combination of the fields on the resources themselves. This field is only valid for `action` of type `changed`\n*Note: Subscriptions created on higher-level resources such as a Workspace, Team, or Portfolio do not support fields.*",
      "items": {
        "type": "string"
      },
      "example": [
        "due_at",
        "due_on",
        "dependencies"
      ]
    }
  }
}