Sample - Asana API
GET/attachments/{attachment_gid}

Get an attachment

Required scope: attachments:read

Get the full record for a single attachment.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
opt_fieldsarray<string>optional
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. Properties can include nested fields. To learn more, see the [input/output options guide](/docs/inputoutput-options#selecting-nested-fields).

11 status codes
200Successfully retrieved the record for a single attachment.
dataobjectoptional
400This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
errorsarray<object>optional
401A valid authentication token was not provided with the request, so the API could not associate a user with the request.
errorsarray<object>optional
402The request was valid, but the queried object or object mutation specified in the request is above your current premium level.
errorsarray<object>optional
403The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
errorsarray<object>optional
404Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
errorsarray<object>optional
424You have exceeded one of the enforced rate limits in the API. See the [documentation on rate limiting](https://developers.asana.com/docs/#rate-limits) for more information.
errorsarray<object>optional
500There was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
errorsarray<object>optional
501There is an issue between the load balancers and Asana's API.
errorsarray<object>optional
503Either the upstream service is unavailable to the API, or the API has been intentionally shut off.
errorsarray<object>optional
504This request took too long to complete.
errorsarray<object>optional

Error handling

A 400 is returned: This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again. A 401 is returned: A valid authentication token was not provided with the request, so the API could not associate a user with the request. A 402 is returned: The request was valid, but the queried object or object mutation specified in the request is above your current premium level. A 403 is returned: The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to. A 404 is returned: Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist. A 424 is returned: You have exceeded one of the enforced rate limits in the API. See the documentation on rate limiting for more information. A 500 is returned: There was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase. A 501 is returned: There is an issue between the load balancers and Asana's API. A 503 is returned: Either the upstream service is unavailable to the API, or the API has been intentionally shut off. A 504 is returned: This request took too long to complete.