EndPoint Download Multiple Attachments
Name
download_attachments
Description
Download Multiple Attachments for a specified parent.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
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
StatusCode |
DT_I4
|
int
|
False |
||
SavedFilePath |
DT_WSTR
|
nvarchar(300)
|
300 | False |
|
SavedBytes |
DT_I8
|
bigint
|
False |
||
Id |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
Name |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
ResourceSubtype |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
ConnectedToApp |
DT_BOOL
|
bit
|
False |
||
CreatedAt |
DT_DBTIMESTAMP
|
datetime
|
False |
||
DownloadUrl |
DT_WSTR
|
nvarchar(500)
|
500 | False |
|
Host |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
ParentId |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
ParentName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
ParentResourceSubtype |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
PermanentUrl |
DT_WSTR
|
nvarchar(500)
|
500 | False |
|
Size |
DT_I4
|
int
|
False |
||
ViewUrl |
DT_WSTR
|
nvarchar(500)
|
500 | False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | 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 component to read data or in API Destination component to read/write data:
Download Multiple Attachments using API Source

Download Multiple Attachments using API Destination

ODBC application
Use these SQL queries in your ODBC application data source:
Download Multiple Attachments to Local Disk
Download Multiple Attachments for a specified Parent (e.g. Task, Project, ProjectBrief) to Local Disk Folder. Saved file name syntax is {AttachmentId}_{FileName}.
SELECT * FROM download_attachments
WITH (
ParentId='1206673375982078' --Id of Task , Project or ProjectBrief
, SaveFolder='c:\temp'
, OverwriteFile=1
)
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Download Multiple Attachments to Local Disk
Download Multiple Attachments for a specified Parent (e.g. Task, Project, ProjectBrief) to Local Disk Folder. Saved file name syntax is {AttachmentId}_{FileName}.
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM download_attachments
WITH (
ParentId=''1206673375982078'' --Id of Task , Project or ProjectBrief
, SaveFolder=''c:\temp''
, OverwriteFile=1
)';
EXEC (@MyQuery) AT [LINKED_SERVER_TO_ASANA_IN_DATA_GATEWAY];