
Asana API Integration Profile
Information and guides about integrating with Asana API
Add Asana Integration to Your ProductUpload an attachment in Asana API
Upload an attachment.
This method uploads an attachment on an object and returns the compact record for the created attachment object. This is possible by either:
- Providing the URL of the external resource being attached, or
- Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API
The 100MB size limit on attachments in Asana is enforced on this endpoint.
This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded.
Requests made should follow the HTTP/1.1 specification that line
terminators are of the form CRLF
or \r\n
outlined
here in order for the server to reliably and properly handle the request.
Input schema fields
Field Name | API Key | Type | Description |
---|---|---|---|
Query | query | object | |
Data | data | object | |
Resource Subtype | data.resource_subtype | string | The type of the attachment. Must be one of the given values. If not specified, a file attachment of type `asana` will be assumed. Note that if the value of `resource_subtype` is `external`, a `parent`, `name`, and `url` must also be provided. |
File | data.file | string | Required for `asana` attachments. |
Parent | data.parent | string | Required identifier of the parent task, project, or project_brief, as a string. |
Output schema fields
Field Name | API Key | Type | Description |
---|---|---|---|
Data | data | object | A generic Asana Resource, containing a globally unique identifier. |
Gid | data.gid | string | Globally unique identifier of the resource, as a string. |
Resource Type | data.resource_type | string | The base type of this resource. |
Name | data.name | string | The name of the file. |
Resource Subtype | data.resource_subtype | string | The service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`. |