Skip to content

Asana: Attachments schemas

6 Asana schemas with complete fields and constraints.

← Attachments operations · All schemas

Get an attachment — response body — data

FieldTypePresenceDescription and constraints
$objectRoot
dataModelRequired within parentExpand 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

FieldTypePresenceDescription and constraints
$objectRootA 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
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 task.
resource_subtypeJSONOptional
resource_subtype (anyOf 1)stringAlternativeThe resource subtype of the parent resource that the filter applies to.
resource_subtype (anyOf 2)nullAlternative
created_byobjectOptional[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.gidstringOptionalGlobally unique identifier of the resource.
created_by.resource_typestringOptionalThe type of resource.

Get an attachment — response body — data data — Attachment Response

FieldTypePresenceDescription and constraints
$JSONRoot
$ (allOf 1)ModelAll variants applyExpand Get attachments from an object — response body — data, next page data item
$ (allOf 2)objectAll variants apply
$ (allOf 2).created_atstringOptionalThe time at which this resource was created.
Format: date-time
Read only: true
$ (allOf 2).download_urlJSONOptional
$ (allOf 2).download_url (anyOf 1)stringAlternativeThe 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)nullAlternative
$ (allOf 2).permanent_urlJSONOptional
$ (allOf 2).permanent_url (anyOf 1)stringAlternativeA 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)nullAlternative
$ (allOf 2).hoststringOptionalThe service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`.
Read only: true
$ (allOf 2).parentJSONOptional
$ (allOf 2).parent (anyOf 1)JSONAlternative
$ (allOf 2).parent (anyOf 1) (allOf 1)ModelAll variants applyExpand Search tasks in a workspace — response body — data data item
$ (allOf 2).parent (anyOf 1) (allOf 2)objectAll variants applyThe task this attachment is attached to.
Read only: true
$ (allOf 2).parent (anyOf 1) (allOf 2).resource_subtypeJSONOptional
$ (allOf 2).parent (anyOf 1) (allOf 2).resource_subtype (anyOf 1)stringAlternativeThe resource subtype of the parent resource that the filter applies to.
$ (allOf 2).parent (anyOf 1) (allOf 2).resource_subtype (anyOf 2)nullAlternative
$ (allOf 2).parent (anyOf 2)nullAlternative
$ (allOf 2).sizeJSONOptional
$ (allOf 2).size (anyOf 1)integerAlternativeThe size of the attachment in bytes. Only present when the `resource_subtype` is `asana`.
Read only: true
$ (allOf 2).size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (allOf 2).view_urlJSONOptional
$ (allOf 2).view_url (anyOf 1)stringAlternativeThe 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)nullAlternative
$ (allOf 2).connected_to_appbooleanOptionalWhether 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

FieldTypePresenceDescription and constraints
$objectRootA 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.
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 file.
Read only: true
resource_subtypestringOptionalThe service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`.
created_atstringOptionalThe time at which this resource was created.
Format: date-time
Read only: true
download_urlJSONOptional
download_url (anyOf 1)stringAlternativeThe 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)nullAlternative
permanent_urlJSONOptional
permanent_url (anyOf 1)stringAlternativeA 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)nullAlternative
hoststringOptionalThe service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`.
Read only: true
parentJSONOptional
parent (anyOf 1)ModelAlternativeExpand Get an attachment — response body — data data parent created by, gid, name, resource subtype, resource type
parent (anyOf 2)nullAlternative
sizeJSONOptional
size (anyOf 1)integerAlternativeThe size of the attachment in bytes. Only present when the `resource_subtype` is `asana`.
Read only: true
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
view_urlJSONOptional
view_url (anyOf 1)stringAlternativeThe 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)nullAlternative
connected_to_appbooleanOptionalWhether 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

FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parent
data[]ModelEach itemExpand Get an attachment — response body — data data — sdk__Attachment Response
next_pageModelOptionalExpand 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

FieldTypePresenceDescription and constraints
$objectRootAn *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.
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 file.
Read only: true
resource_subtypestringOptionalThe service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`.

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.