Asana: Attachments schemas
6 Asana schemas with complete fields and constraints.
← Attachments operations · All schemas
Get an attachment — response body — data
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | Model | Required within parent | Expand Get an attachment — response body — data data — sdk__Attachment Response |
Referenced models: Get an attachment — response body — data data — sdk__Attachment Response
Get an attachment — response body — data data parent created by, gid, name, resource subtype, resource type
| 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. The *task* is the basic object around which many operations in Asana are centered.A generic Asana Resource, containing a globally unique identifier.A generic Asana Resource, containing a globally unique identifier. The *task* is the basic object around which many operations in Asana are centered. The task this attachment is attached to. Read only: true |
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 task. |
resource_subtype | JSON | Optional | |
resource_subtype (anyOf 1) | string | Alternative | The resource subtype of the parent resource that the filter applies to. |
resource_subtype (anyOf 2) | null | Alternative | |
created_by | object | Optional | [Opt In](/docs/inputoutput-options). A *user* object represents an account in Asana that can be given access to various workspaces, projects, and tasks. Read only: true |
created_by.gid | string | Optional | Globally unique identifier of the resource. |
created_by.resource_type | string | Optional | The type of resource. |
Get an attachment — response body — data data — Attachment Response
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Get attachments from an object — response body — data, next page data item |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).created_at | string | Optional | The time at which this resource was created. Format: date-time Read only: true |
$ (allOf 2).download_url | JSON | Optional | |
$ (allOf 2).download_url (anyOf 1) | string | Alternative | The URL containing the content of the attachment. *Note:* May be null if the attachment is hosted by [Box](https://www.box.com/) and will be null if the attachment is a Video Message hosted by [Vimeo](https://vimeo.com/). If present, this URL may only be valid for two minutes from the time of retrieval. You should avoid persisting this URL somewhere and just refresh it on demand to ensure you do not keep stale URLs. Format: uri Read only: true |
$ (allOf 2).download_url (anyOf 2) | null | Alternative | |
$ (allOf 2).permanent_url | JSON | Optional | |
$ (allOf 2).permanent_url (anyOf 1) | string | Alternative | A stable URL for accessing the attachment through the Asana web application. This URL redirects to the file download location (e.g., an S3 link) if the user is authenticated and authorized to view the parent object (e.g., a task). Unauthorized users will receive a `403 Forbidden` response. This link is persistent and does not expire, but requires an active session to resolve. Format: uri Read only: true |
$ (allOf 2).permanent_url (anyOf 2) | null | Alternative | |
$ (allOf 2).host | string | Optional | The service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`. Read only: true |
$ (allOf 2).parent | JSON | Optional | |
$ (allOf 2).parent (anyOf 1) | JSON | Alternative | |
$ (allOf 2).parent (anyOf 1) (allOf 1) | Model | All variants apply | Expand Search tasks in a workspace — response body — data data item |
$ (allOf 2).parent (anyOf 1) (allOf 2) | object | All variants apply | The task this attachment is attached to. Read only: true |
$ (allOf 2).parent (anyOf 1) (allOf 2).resource_subtype | JSON | Optional | |
$ (allOf 2).parent (anyOf 1) (allOf 2).resource_subtype (anyOf 1) | string | Alternative | The resource subtype of the parent resource that the filter applies to. |
$ (allOf 2).parent (anyOf 1) (allOf 2).resource_subtype (anyOf 2) | null | Alternative | |
$ (allOf 2).parent (anyOf 2) | null | Alternative | |
$ (allOf 2).size | JSON | Optional | |
$ (allOf 2).size (anyOf 1) | integer | Alternative | The size of the attachment in bytes. Only present when the `resource_subtype` is `asana`. Read only: true |
$ (allOf 2).size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (allOf 2).view_url | JSON | Optional | |
$ (allOf 2).view_url (anyOf 1) | string | Alternative | The URL where the attachment can be viewed, which may be friendlier to users in a browser than just directing them to a raw file. May be null if no view URL exists for the service. Format: uri Read only: true |
$ (allOf 2).view_url (anyOf 2) | null | Alternative | |
$ (allOf 2).connected_to_app | boolean | Optional | Whether the attachment is connected to the app making the request for the purposes of showing an app components widget. Only present when the `resource_subtype` is `external` or `gdrive`. Read only: true |
Referenced models: Get attachments from an object — response body — data, next page data item, Search tasks in a workspace — response body — data data item
Get an attachment — response body — data data — sdk__Attachment 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. An *attachment* object represents any file attached to a task in Asana, whether it's an uploaded file or one associated via a third-party service such as Dropbox or Google Drive. |
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 file. Read only: true |
resource_subtype | string | Optional | The service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`. |
created_at | string | Optional | The time at which this resource was created. Format: date-time Read only: true |
download_url | JSON | Optional | |
download_url (anyOf 1) | string | Alternative | The URL containing the content of the attachment. *Note:* May be null if the attachment is hosted by [Box](https://www.box.com/) and will be null if the attachment is a Video Message hosted by [Vimeo](https://vimeo.com/). If present, this URL may only be valid for two minutes from the time of retrieval. You should avoid persisting this URL somewhere and just refresh it on demand to ensure you do not keep stale URLs. Format: uri Read only: true |
download_url (anyOf 2) | null | Alternative | |
permanent_url | JSON | Optional | |
permanent_url (anyOf 1) | string | Alternative | A stable URL for accessing the attachment through the Asana web application. This URL redirects to the file download location (e.g., an S3 link) if the user is authenticated and authorized to view the parent object (e.g., a task). Unauthorized users will receive a `403 Forbidden` response. This link is persistent and does not expire, but requires an active session to resolve. Format: uri Read only: true |
permanent_url (anyOf 2) | null | Alternative | |
host | string | Optional | The service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`. Read only: true |
parent | JSON | Optional | |
parent (anyOf 1) | Model | Alternative | Expand Get an attachment — response body — data data parent created by, gid, name, resource subtype, resource type |
parent (anyOf 2) | null | Alternative | |
size | JSON | Optional | |
size (anyOf 1) | integer | Alternative | The size of the attachment in bytes. Only present when the `resource_subtype` is `asana`. Read only: true |
size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
view_url | JSON | Optional | |
view_url (anyOf 1) | string | Alternative | The URL where the attachment can be viewed, which may be friendlier to users in a browser than just directing them to a raw file. May be null if no view URL exists for the service. Format: uri Read only: true |
view_url (anyOf 2) | null | Alternative | |
connected_to_app | boolean | Optional | Whether the attachment is connected to the app making the request for the purposes of showing an app components widget. Only present when the `resource_subtype` is `external` or `gdrive`. Read only: true |
Referenced models: Get an attachment — response body — data data parent created by, gid, name, resource subtype, resource type
Get attachments from an object — response body — data, next page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | |
data[] | Model | Each item | Expand Get an attachment — response body — data data — sdk__Attachment 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 an attachment — response body — data data — sdk__Attachment Response
Get attachments from an object — response body — data, next page data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An *attachment* object represents any file attached to a task in Asana, whether it's an uploaded file or one associated via a third-party service such as Dropbox or Google Drive. |
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 file. Read only: true |
resource_subtype | string | Optional | The service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`. |