Attachments

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.


AttachmentCompact

A Compact object reflects the default fields returned after a successful API request. See input/output options to include more fields in the response.

PropertyTypeDescription
gidstringGlobally unique identifier of the resource, as a string.
resource_typestringThe base type of this resource.
namestringThe name of the file.
resource_subtypestringThe service hosting the attachment. Valid values are asana, dropbox, gdrive, onedrive, box, vimeo, and external.
{
  "gid": "12345",
  "resource_type": "attachment",
  "name": "Screenshot.png",
  "resource_subtype": "dropbox"
}

Attachment

PropertyTypeDescription
gidstringGlobally unique identifier of the resource, as a string.
resource_typestringThe base type of this resource.
namestringThe name of the file.
resource_subtypestringThe service hosting the attachment. Valid values are asana, dropbox, gdrive, onedrive, box, vimeo, and external.
connected_to_appbooleanWhether 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.
created_atstring(date-time)The time at which this resource was created.
download_urlstring(uri)¦nullThe URL containing the content of the attachment.
Note: May be null if the attachment is hosted by Box and will be null if the attachment is a Video Message hosted by Vimeo. 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.
hoststringThe service hosting the attachment. Valid values are asana, dropbox, gdrive, box, and vimeo.
parentobject¦nullThe task this attachment is attached to.
parent.gidstringGlobally unique identifier of the resource, as a string.
parent.resource_typestringThe base type of this resource.
parent.namestringThe name of the task.
parent.resource_subtypestring¦nullThe resource subtype of the parent resource that the filter applies to.
permanent_urlstring(uri)¦nullnone
sizeintegerThe size of the attachment in bytes. Only present when the resource_subtype is asana.
view_urlstring(uri)¦nullThe 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.
{
  "gid": "12345",
  "resource_type": "attachment",
  "name": "Screenshot.png",
  "resource_subtype": "dropbox",
  "connected_to_app": true,
  "created_at": "2012-02-22T02:06:58.147Z",
  "download_url": "https://s3.amazonaws.com/assets/123/Screenshot.png",
  "host": "dropbox",
  "parent": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "permanent_url": "https://s3.amazonaws.com/assets/123/Screenshot.png",
  "size": 12345,
  "view_url": "https://www.dropbox.com/s/123/Screenshot.png"
}
Asana Home
Asana helps you manage projects, focus on what's important, and organize work in one place for seamless collaboration.
© 2023 Asana, Inc.