Asana: Workspaces schemas
12 Asana schemas with complete fields and constraints.
← Workspaces operations · All schemas
Add a user to a workspace or organization — response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Add a user to a workspace or organization — response body — data data — sdk__User Base Response |
Referenced models: Add a user to a workspace or organization — response body — data data — sdk__User Base Response
Add a user to a workspace or organization — response body — data data — User Base Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Get users in a team — response body — data data item |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).email | string | Optional | The user's email address. Format: email Read only: true |
$ (allOf 2).photo | JSON | Optional | |
$ (allOf 2).photo (anyOf 1) | Model | Alternative | Expand Get a user — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60 |
$ (allOf 2).photo (anyOf 2) | null | Alternative |
Referenced models: Get users in a team — response body — data data item, Get a user — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60
Add a user to a workspace or organization — response body — data data — sdk__User Base Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. A *user* object represents an account in Asana that can be given access to various workspaces, projects, and tasks. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
name | string | Optional | *Read-only except when same user as requester*. The user's name. |
email | string | Optional | The user's email address. Format: email Read only: true |
photo | JSON | Optional | |
photo (anyOf 1) | Model | Alternative | Expand Get a user — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60 |
photo (anyOf 2) | null | Alternative |
Referenced models: Get a user — response body — data data photo image 1024x1024, image 128x128, image 21x21, image 27x27, image 36x36, image 60x60
Get a workspace — response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Get a workspace — response body — data data — sdk__Workspace Response |
Referenced models: Get a workspace — response body — data data — sdk__Workspace Response
Get a workspace — response body — data data — Workspace Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Update a workspace — request body — body data |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).email_domains | array | Optional | The email domains that are associated with this workspace. |
$ (allOf 2).email_domains[] | string | Each item | Format: uri |
$ (allOf 2).is_organization | boolean | Optional | Whether the workspace is an *organization*. |
Referenced models: Update a workspace — request body — body data
Get a workspace — response body — data data — sdk__Workspace Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. A *workspace* is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
name | string | Optional | The name of the workspace. |
email_domains | array | Optional | The email domains that are associated with this workspace. |
email_domains[] | string | Each item | Format: uri |
is_organization | boolean | Optional | Whether the workspace is an *organization*. |
Get multiple workspaces — response body — data, next page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | |
data[] | Model | Each item | Expand Get a workspace — response body — data data — sdk__Workspace Response |
next_page | Model | Optional | Expand Get goals — response body — data, next page next page |
Referenced models: Get goals — response body — data, next page next page, Get a workspace — response body — data data — sdk__Workspace Response
Get workspace events — response body — data, has more, sync data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | 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`. |
user | JSON | Optional | |
user (allOf 1) | Model | All variants apply | Expand Get users in a team — response body — data data item |
user (allOf 2) | JSON | All variants apply | The user who triggered the event. |
resource | JSON | Optional | |
resource (allOf 1) | Model | All variants apply | Expand Get objects via typeahead — response body — data data item |
resource (allOf 2) | JSON | All variants apply | The resource which has triggered the event by being modified in some way. |
type | string | Optional | *Deprecated: Refer to the resource_type of the resource.* The type of the resource that generated the event. Read only: true |
action | string | Optional | The type of action taken on the **resource** that triggered the event. This can be one of `changed`, `added`, `removed`, `deleted`, or `undeleted` depending on the nature of the event. Read only: true |
parent | JSON | Optional | |
parent (allOf 1) | Model | All variants apply | Expand Get objects via typeahead — response body — data data item |
parent (allOf 2) | JSON | All variants apply | For added/removed events, the parent object that resource was added to or removed from. The parent will be `null` for other event types. |
created_at | string | Optional | The timestamp when the event occurred. Format: date-time Read only: true |
change | Model | Optional | Expand Get workspace events — response body — data, next page data item change |
Referenced models: Get objects via typeahead — response body — data data item, Get users in a team — response body — data data item, Get workspace events — response body — data, next page data item change
Get workspace events — response body — data, next page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | |
data[] | Model | Each item | Expand Get workspace events — response body — data, next page data item |
next_page | Model | Optional | Expand Get goals — response body — data, next page next page |
Referenced models: Get goals — response body — data, next page next page, Get workspace events — response body — data, next page data item
Get workspace events — response body — data, next page data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | 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`. |
user | object | Optional | A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. A *user* object represents an account in Asana that can be given access to various workspaces, projects, and tasks.A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. A *user* object represents an account in Asana that can be given access to various workspaces, projects, and tasks. The user who triggered the event. |
user.gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
user.resource_type | string | Optional | The base type of this resource. Read only: true |
user.name | string | Optional | *Read-only except when same user as requester*. The user's name. |
resource | object | Optional | A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. The resource which has triggered the event by being modified in some way. |
resource.gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource.resource_type | string | Optional | The base type of this resource. Read only: true |
resource.name | string | Optional | The name of the object. |
type | string | Optional | *Deprecated: Refer to the resource_type of the resource.* The type of the resource that generated the event. Read only: true |
action | string | Optional | The type of action taken on the **resource** that triggered the event. This can be one of `changed`, `added`, `removed`, `deleted`, or `undeleted` depending on the nature of the event. Read only: true |
parent | object | Optional | A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. For added/removed events, the parent object that resource was added to or removed from. The parent will be `null` for other event types. |
parent.gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
parent.resource_type | string | Optional | The base type of this resource. Read only: true |
parent.name | string | Optional | The name of the object. |
created_at | string | Optional | The timestamp when the event occurred. Format: date-time Read only: true |
change | Model | Optional | Expand Get workspace events — response body — data, next page data item change |
Referenced models: Get workspace events — response body — data, next page data item change
Get workspace events — response body — data, next page data item change
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Information about the type of change that has occurred. This field is only present when the value of the property `action`, describing the action taken on the **resource**, is `changed`. Read only: true |
field | string | Optional | The name of the field that has changed in the resource. Read only: true |
action | string | Optional | The type of action taken on the **field** which has been changed. This can be one of `changed`, `added`, or `removed` depending on the nature of the change. Read only: true |
new_value | JSON | Optional | *Conditional.* This property is only present when the value of the event's `change.action` is `changed` _and_ the `new_value` is an Asana resource. This will be only the `gid` and `resource_type` of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with [opt_fields](/docs/inputoutput-options)) when using the [get events](/reference/getevents) endpoint. |
added_value | JSON | Optional | *Conditional.* This property is only present when the value of the event's `change.action` is `added` _and_ the `added_value` is an Asana resource. This will be only the `gid` and `resource_type` of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with [opt_fields](/docs/inputoutput-options)) when using the [get events](/reference/getevents) endpoint. |
removed_value | JSON | Optional | *Conditional.* This property is only present when the value of the event's `change.action` is `removed` _and_ the `removed_value` is an Asana resource. This will be only the `gid` and `resource_type` of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with [opt_fields](/docs/inputoutput-options)) when using the [get events](/reference/getevents) endpoint. |
Update a workspace — request body — body data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A *workspace* is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace. |
gid | string | Optional | Globally unique identifier of the resource, as a string. Read only: true |
resource_type | string | Optional | The base type of this resource. Read only: true |
name | string | Optional | The name of the workspace. |