Reference

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: ParentId

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: Fields

Label: Fields

Option Value
name name
resource_subtype resource_subtype
connected_to_app connected_to_app
created_at created_at
download_url download_url
host host
parent parent
parent.name parent.name
parent.resource_subtype parent.resource_subtype
permanent_url permanent_url
size size
view_url view_url
Name: Limit

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
If the column you are looking for is missing, consider customizing Asana Connector.

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

API Source - Asana
Read and write data related to Tasks, Projects, Workspaces, Portfolios, TimeEntries, Memberships and more.
Asana
Get Attachments (For Project refer to Key-Resources Upload only)
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
SSIS API Source - Read from table or endpoint

API Destination

API Destination - Asana
Read and write data related to Tasks, Projects, Workspaces, Portfolios, TimeEntries, Memberships and more.
Asana
Get Attachments (For Project refer to Key-Resources Upload only)
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
SSIS API Destination - Access table or endpoint

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