Endpoint Get Attachments (For Project refer to Key-Resources Upload only)
Name
get_attachments
Description
There are three possible parent values for this request: project, project_brief, and task. For a project, an attachment refers to a file uploaded to the [Key resources] section in the project Overview. For a project brief, an attachment refers to inline files in the project brief itself. For a task, an attachment refers to a file directly associated to that task. Note that within the Asana app, inline images in the task description do not appear in the index of image thumbnails nor as stories in the task. However, requests made to GET /attachments for a task will return all of the images in the task, including inline images.
Parameters
Parameter | Required | Options | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name:
Label: Parent Id (e.g. Id of Project, Task or ProjectBrief) Globally unique identifier for object to fetch statuses from. Must be a GID for a project, project_brief, or task. |
YES | |||||||||||||||||||||||||||
Name:
Label: Fields |
|
|||||||||||||||||||||||||||
Name:
Label: Limit Results per page. The number of objects to return per page. The value must be between 1 and 100. |
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
---|---|---|---|---|
Id |
DT_WSTR
|
nvarchar(50)
|
50 | |
Name |
DT_WSTR
|
nvarchar(255)
|
255 | |
ResourceSubtype |
DT_WSTR
|
nvarchar(50)
|
50 | |
ConnectedToApp |
DT_BOOL
|
bit
|
||
CreatedAt |
DT_DBTIMESTAMP
|
datetime
|
||
DownloadUrl |
DT_WSTR
|
nvarchar(500)
|
500 | |
Host |
DT_WSTR
|
nvarchar(50)
|
50 | |
ParentId |
DT_WSTR
|
nvarchar(50)
|
50 | |
ParentName |
DT_WSTR
|
nvarchar(255)
|
255 | |
ParentResourceSubtype |
DT_WSTR
|
nvarchar(50)
|
50 | |
PermanentUrl |
DT_WSTR
|
nvarchar(500)
|
500 | |
Size |
DT_I4
|
int
|
||
ViewUrl |
DT_WSTR
|
nvarchar(500)
|
500 |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use Asana Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
Required Parameters | |
---|---|
Parent Id (e.g. Id of Project, Task or ProjectBrief) | Fill-in the parameter... |
Optional Parameters | |
Continue On 404 Error (When record not found) | False |

API Destination
Required Parameters | |
---|---|
Parent Id (e.g. Id of Project, Task or ProjectBrief) | Fill-in the parameter... |
Optional Parameters | |
Continue On 404 Error (When record not found) | False |

ODBC application
Use these SQL queries in your ODBC application data source:
Get attachments
SELECT * FROM get_attachments
WITH
(
"ParentId" = 'abcd-1234-parentid'
)
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get attachments
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_attachments
WITH
(
"ParentId" = ''abcd-1234-parentid''
)';
EXEC (@MyQuery) AT [LS_TO_ASANA_IN_GATEWAY];