Get an attachment

Get the full record for a single attachment.

📘

Customizing the response

Requests to this endpoint return "compact" attachment objects (schema) by default. To include more fields in the response, see input/output options.

Path Params
string
required

Globally unique identifier for the attachment.

Query Params
array of strings

This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.

opt_fields
boolean

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.

Responses

Response body
object
object

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.

string

Globally unique identifier of the resource, as a string.

string

The base type of this resource.

string

The name of the file.

string

The service hosting the attachment. Valid values are asana, dropbox, gdrive, onedrive, box, vimeo, and external.

date-time

The time at which this resource was created.

uri | null

The 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.

uri | null
string

The service hosting the attachment. Valid values are asana, dropbox, gdrive, box, and vimeo.

object | null

The task this attachment is attached to.

integer

The size of the attachment in bytes. Only present when the resource_subtype is asana.

uri | null

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.

boolean

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.

Language
Credentials
Request
Asana Home
Asana helps you manage projects, focus on what's important, and organize work in one place for seamless collaboration.
© 2023 Asana, Inc.