Search + K

Command Palette

Search for a command to run...

Sign In

Get workspace events

GET /workspaces/{workspace_gid}/events
Copy endpoint
https://app.asana.com/api/1.0

Returns the full record for all events that have occurred since the sync token was created. The response is a list of events and the schema of each event is as described here. Asana limits a single sync token to 1000 events. If more than 1000 events exist for a given domain, has_more: true will be returned in the response, indicating that there are more events to pull.

Parameters

path Path Parameters

Name Type
workspace_gid required

Globally unique identifier for the workspace or organization.

string

query Query Parameters

Name Type
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
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 412 Precondition Failed error, and include a fresh sync token in the response.

string

Responses

200 application/json

Successfully retrieved events.

{ data?: EventResponse

An event is an object representing a change to a resource that was observed by an event subscription or delivered asynchronously to the target location of an active webhook.

The event may be triggered by a different user than the subscriber. For example, if user A subscribes to a task and user B modified it, the event's user will be user B. Note: Some events are generated by the system, and will have null as the user. API consumers should make sure to handle this case.

The resource that triggered the event may be different from the one that the events were requested for or the webhook is subscribed to. For example, a subscription to a project will contain events for tasks contained within the project.

Note: pay close attention to the relationship between the fields Event.action and Event.change.action. Event.action represents the action taken on the resource itself, and Event.change.action represents how the information within the resource's fields have been modified.

For instance, consider these scenarios:

  • When at task is added to a project, Event.action will be added, Event.parent will be an object with the id and type of the project, and there will be no change field.

  • When an assignee is set on the task, Event.parent will be null, Event.action will be changed, Event.change.action will be changed, and new_value will be an object with the user's id and type.

  • When a collaborator is added to the task, Event.parent will be null, Event.action will be changed, Event.change.action will be added, and added_value will be an object with the user's id and type.

interface EventResponse {
user?: UserCompact;
resource?: AsanaNamedResource;
type?: string;
action?: string;
parent?: AsanaNamedResource;
created_at?: string;
change?: {
field?: string;
action?: string;
new_value?: unknown;
added_value?: unknown;
removed_value?: unknown;
}
;
}
[]
;sync?: string;has_more?: boolean; }

Client Errors

400 application/json

This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}
401 application/json

A valid authentication token was not provided with the request, so the API could not associate a user with the request.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}
403 application/json

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.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}
404 application/json

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.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}

Server Errors

500 application/json

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.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}