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
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: OverwriteFile |
YES |
|
||||||||||||||||||||||||||
Name:
Label: SaveFolder Specify a disk folder path to save file(s) to |
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 |
---|---|---|---|---|
StatusCode |
DT_I4
|
int
|
||
SavedFilePath |
DT_WSTR
|
nvarchar(300)
|
300 | |
SavedBytes |
DT_I8
|
bigint
|
||
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... |
OverwriteFile | Fill-in the parameter... |
SaveFolder | Fill-in the parameter... |
Optional Parameters | |
Fields | |
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... |
OverwriteFile | Fill-in the parameter... |
SaveFolder | Fill-in the parameter... |
Optional Parameters | |
Fields | |
Continue On 404 Error (When record not found) | False |

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 [LS_TO_ASANA_IN_GATEWAY];