Skip to content

Asana: Get multiple webhooks

Asana webhooks.getWebhooks: arguments, response, policy and SDK examples.

← Webhooks operations · Get started

Operation asana.getwebhooks

Provider route: GET /webhooks. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/asana with npm, or alter-sdk-asana with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { AsanaIntegration } from "@alter-ai/asana";
async function execute(input: Parameters<AsanaIntegration["webhooks"]["getWebhooks"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new AsanaIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.webhooks.getWebhooks(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_asana import AsanaIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = AsanaIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.webhooks.get_webhooks(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectRequired within parentAdditional keys: not allowed
query.opt_prettybooleanOptional
query.limitintegerOptionalMinimum: 1
Maximum: 100
query.offsetstringOptional
query.workspacestringRequired within parent
query.resourcestringOptional
query.opt_fieldsarrayOptional
query.opt_fields[]stringEach itemOne of: active, created_at, delivery_retry_count, failure_deletion_timestamp, filters, filters.action, filters.fields, filters.resource_subtype, last_failure_at, last_failure_content, last_success_at, next_attempt_after, offset, path, resource, resource.name, target, uri

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)objectAll variants apply
$ (allOf 1).dataarrayOptional
$ (allOf 1).data[]ModelEach itemExpand Get a webhook — response body — data data — Webhook Response
$ (allOf 1).next_pageModelOptionalExpand Get goals — response body — data, next page next page
$ (allOf 2)ModelAll variants applyExpand Get multiple webhooks — response body — data, next page

Referenced models: Get goals — response body — data, next page next page, Get a webhook — response body — data data — Webhook Response, Get multiple webhooks — response body — data, next page

1 more schema is linked from the tables above, on the schema pages.

Get goals — response body — data, next page next page
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternative*Conditional*. This property is only present when a limit query parameter is provided in the request. When making a paginated request, the API will return a number of results as specified by the limit parameter. If more results exist, then the response will contain a next_page attribute, which will include an offset, a relative path attribute, and a full uri attribute. If there are no more pages available, next_page will be null and no offset will be provided. Note that an offset token will expire after some time, as data may have changed.
$ (anyOf 1).offsetstringOptionalPagination offset for the request.
Read only: true
$ (anyOf 1).pathstringOptionalA relative path containing the query parameters to fetch for next_page
Read only: true
$ (anyOf 1).uristringOptionalA full uri containing the query parameters to fetch for next_page
Format: uri
Read only: true
$ (anyOf 2)nullAlternative
Get a webhook — response body — data data — Webhook Response
FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)ModelAll variants applyExpand Get a webhook — response body — data data active, gid, resource, resource type, target
$ (allOf 2)objectAll variants apply
$ (allOf 2).created_atstringOptionalThe time at which this resource was created.
Format: date-time
Read only: true
$ (allOf 2).last_failure_atJSONOptional
$ (allOf 2).last_failure_at (anyOf 1)stringAlternativeThe timestamp when the webhook last received an error when sending an event to the target.
Format: date-time
Read only: true
$ (allOf 2).last_failure_at (anyOf 2)nullAlternative
$ (allOf 2).last_failure_contentJSONOptional
$ (allOf 2).last_failure_content (anyOf 1)stringAlternativeThe contents of the last error response sent to the webhook when attempting to deliver events to the target.
Read only: true
$ (allOf 2).last_failure_content (anyOf 2)nullAlternative
$ (allOf 2).last_success_atJSONOptional
$ (allOf 2).last_success_at (anyOf 1)stringAlternativeThe timestamp when the webhook last successfully sent an event to the target.
Format: date-time
Read only: true
$ (allOf 2).last_success_at (anyOf 2)nullAlternative
$ (allOf 2).delivery_retry_countJSONOptional
$ (allOf 2).delivery_retry_count (anyOf 1)integerAlternativeThe number of times the webhook has retried delivery of events to the target (resets after a successful attempt).
Read only: true
$ (allOf 2).delivery_retry_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (allOf 2).next_attempt_afterstringOptionalThe timestamp after which the webhook will next attempt to deliver an event to the target.
Format: date-time
Read only: true
$ (allOf 2).failure_deletion_timestampstringOptionalThe timestamp when the webhook will be deleted if there is no successful attempt to deliver events to the target
Format: date-time
Read only: true
$ (allOf 2).filtersarrayOptionalWhitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.
$ (allOf 2).filters[]JSONEach item
$ (allOf 2).filters[] (allOf 1)ModelAll variants applyExpand Update a webhook — request body — body data filters item action, fields, resource subtype, resource type
$ (allOf 2).filters[] (allOf 2)JSONAll variants applyA set of filters to specify a whitelist for what types of events will be delivered.
$ (allOf 2).filters[] (allOf 3)objectAll variants apply

Referenced models: Get a webhook — response body — data data active, gid, resource, resource type, target, Update a webhook — request body — body data filters item action, fields, resource subtype, resource type

Get multiple webhooks — response body — data, next page
FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parent
data[]ModelEach itemExpand Get a webhook — response body — data data — sdk__Webhook Response
next_pageModelOptionalExpand Get goals — response body — data, next page next page

Referenced models: Get goals — response body — data, next page next page, Get a webhook — response body — data data — sdk__Webhook Response

Get a webhook — response body — data data active, gid, resource, resource type, target
FieldTypePresenceDescription and constraints
$objectRootWebhook objects represent the state of an active subscription for a server to be updated with information from Asana. This schema represents the subscription itself, not the objects that are sent to the server. For information on those please refer to the [event](/reference/events) schema.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
activebooleanOptionalIf true, the webhook will send events - if false it is considered inactive and will not generate events.
Read only: true
resourceModelOptionalExpand Get objects via typeahead — response body — data data item
targetstringOptionalThe URL to receive the HTTP POST.
Format: uri
Read only: true

Referenced models: Get objects via typeahead — response body — data data item

Update a webhook — request body — body data filters item action, fields, resource subtype, resource type
FieldTypePresenceDescription and constraints
$objectRootA 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)
resource_typestringOptionalThe 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_subtypestringOptionalThe 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.
actionstringOptionalThe 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.
fieldsarrayOptional*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`
*Note: Subscriptions created on higher-level resources such as a Workspace, Team, or Portfolio do not support fields.*
fields[]stringEach item
Get objects via typeahead — response body — data data item
FieldTypePresenceDescription and constraints
$objectRootA generic Asana Resource, containing a globally unique identifier.
gidstringOptionalGlobally unique identifier of the resource, as a string.
Read only: true
resource_typestringOptionalThe base type of this resource.
Read only: true
namestringOptionalThe name of the object.
Get a webhook — response body — data data filters item
FieldTypePresenceDescription and constraints
$objectRootA 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)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)
A set of filters to specify a whitelist for what types of events will be delivered.
resource_typestringOptionalThe 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_subtypestringOptionalThe 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.
actionstringOptionalThe 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.
fieldsarrayOptional*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`
*Note: Subscriptions created on higher-level resources such as a Workspace, Team, or Portfolio do not support fields.*
fields[]stringEach item

SDK function policy ID: asana.getwebhooks. Catalog operation: asana:getWebhooks. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["webhooks:read"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.