Get events on a resource
/events Returns the full record for all events that have occurred since the sync token was created.
A GET request to the endpoint /[path_to_resource]/events can be made in
lieu of including the resource ID in the data for the request.
Asana limits a single sync token to 100 events. If more than 100 events exist
for a given resource, has_more: true will be returned in the response, indicating
that there are more events to pull.
Note: The resource returned will be the resource that triggered the event. This may be different from the one that the events were requested for. For example, a subscription to a project will contain events for tasks contained within the project.
Parameters
query Query Parameters
| Name | Type |
|---|---|
opt_fields This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. | ("action" | "change" | "change.action" | "change.added_value" | "change.field" | "change.new_value" | "change.removed_value" | "created_at" | "parent" | "parent.name" | "resource" | "resource.name" | "type" | "user" | "user.name")[] |
resource
required
A resource ID to subscribe to. The resource can be a task, project, or goal. | string |
sync A sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated.
Note: On your first request, omit the sync token. The response will be the same as for an expired sync token, and will include a new valid sync token.If the sync token is too old (which may happen from time to time) the API will return a | string |
opt_pretty Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | boolean |
Responses
Successfully retrieved events.
Client Errors
This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
errors?:
}
A valid authentication token was not provided with the request, so the API could not associate a user with the request.
errors?:
}
The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
errors?:
}
Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
errors?:
}
The request is missing or has an expired sync token.
Server Errors
There was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
errors?:
}