Endpoint Get Sub Tasks
Name
get_subtasks
Description
Only enter TaskId if QueryBy=task else you may get error.
Related Tables
Parameters
Parameter | Required | Options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name:
Label: QueryBy |
YES |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name:
Label: Parent Task Id The parent task id for which you would like to fetch all sub tasks. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name:
Label: Project Id The project to filter tasks on. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name:
Label: Workspace Id The workspace to filter tasks on. Note: If you specify workspace, you must also specify the assignee to filter on. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name:
Label: Assignee Id The assignee to filter tasks on. If searching for unassigned tasks, assignee.any = null can be specified. Note: If you specify assignee, you must also specify the workspace to filter on. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name:
Label: Section Id The section to filter tasks on. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name:
Label: Tag Id |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name:
Label: UserTaskListId |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name:
Label: Completed Since Only return tasks that are either incomplete or that have been completed since this time. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name:
Label: Modified Since Only return tasks that have been modified since the given time. Note: A task is considered “modified” if any of its properties change, or associations between it and other objects are modified (e.g. a task being added to a project). A task is not considered modified just because another object it is associated with (e.g. a subtask) is modified. Actions that count as modifying the task include assigning, renaming, completing, and adding stories. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 | |
ActualTimeMinutes |
DT_I4
|
int
|
||
ApprovalStatus |
DT_WSTR
|
nvarchar(50)
|
50 | |
AssigneeStatus |
DT_WSTR
|
nvarchar(50)
|
50 | |
Completed |
DT_BOOL
|
bit
|
||
CompletedAt |
DT_DBTIMESTAMP
|
datetime
|
||
CompletedById |
DT_WSTR
|
nvarchar(50)
|
50 | |
CompletedByName |
DT_WSTR
|
nvarchar(255)
|
255 | |
CreatedAt |
DT_DBTIMESTAMP
|
datetime
|
||
CreatedById |
DT_WSTR
|
nvarchar(50)
|
50 | |
CreatedByName |
DT_WSTR
|
nvarchar(255)
|
255 | |
Dependencies |
DT_WSTR
|
nvarchar(500)
|
500 | |
Dependents |
DT_WSTR
|
nvarchar(500)
|
500 | |
Subtasks |
DT_NTEXT
|
nvarchar(MAX)
|
||
DueAt |
DT_DBTIMESTAMP
|
datetime
|
||
DueOn |
DT_WSTR
|
nvarchar(50)
|
50 | |
ExternalData |
DT_WSTR
|
nvarchar(100)
|
100 | |
ExternalId |
DT_WSTR
|
nvarchar(50)
|
50 | |
Hearted |
DT_BOOL
|
bit
|
||
Hearts |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
HtmlNotes |
DT_NTEXT
|
nvarchar(MAX)
|
||
IsRenderedAsSeparator |
DT_BOOL
|
bit
|
||
Liked |
DT_BOOL
|
bit
|
||
Likes |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
Memberships |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
ModifiedAt |
DT_DBTIMESTAMP
|
datetime
|
||
Notes |
DT_WSTR
|
nvarchar(2000)
|
2000 | |
NumHearts |
DT_I4
|
int
|
||
NumLikes |
DT_I4
|
int
|
||
NumSubtasks |
DT_I4
|
int
|
||
ResourceSubtype |
DT_WSTR
|
nvarchar(50)
|
50 | |
StartAt |
DT_DBTIMESTAMP
|
datetime
|
||
StartOn |
DT_WSTR
|
nvarchar(50)
|
50 | |
AssigneeId |
DT_WSTR
|
nvarchar(50)
|
50 | |
AssigneeName |
DT_WSTR
|
nvarchar(255)
|
255 | |
AssigneeSectionId |
DT_WSTR
|
nvarchar(50)
|
50 | |
AssigneeSectionName |
DT_WSTR
|
nvarchar(255)
|
255 | |
CustomFields |
DT_NTEXT
|
nvarchar(MAX)
|
||
Followers |
DT_WSTR
|
nvarchar(500)
|
500 | |
ParentId |
DT_WSTR
|
nvarchar(50)
|
50 | |
ParentName |
DT_WSTR
|
nvarchar(255)
|
255 | |
ParentCreatedBy |
DT_WSTR
|
nvarchar(255)
|
255 | |
ParentResourceSubtype |
DT_WSTR
|
nvarchar(50)
|
50 | |
PermalinkUrl |
DT_WSTR
|
nvarchar(500)
|
500 | |
Projects |
DT_WSTR
|
nvarchar(500)
|
500 | |
Projects1Id |
DT_WSTR
|
nvarchar(50)
|
50 | |
Projects1Name |
DT_WSTR
|
nvarchar(255)
|
255 | |
Projects2Id |
DT_WSTR
|
nvarchar(50)
|
50 | |
Projects2Name |
DT_WSTR
|
nvarchar(255)
|
255 | |
Projects3Id |
DT_WSTR
|
nvarchar(50)
|
50 | |
Projects3Name |
DT_WSTR
|
nvarchar(255)
|
255 | |
Tags |
DT_WSTR
|
nvarchar(500)
|
500 | |
Tags1Id |
DT_WSTR
|
nvarchar(50)
|
50 | |
Tags1Name |
DT_WSTR
|
nvarchar(255)
|
255 | |
Tags2Id |
DT_WSTR
|
nvarchar(50)
|
50 | |
Tags2Name |
DT_WSTR
|
nvarchar(255)
|
255 | |
Tags3Id |
DT_WSTR
|
nvarchar(50)
|
50 | |
Tags3Name |
DT_WSTR
|
nvarchar(255)
|
255 | |
Tags4Id |
DT_WSTR
|
nvarchar(50)
|
50 | |
Tags4Name |
DT_WSTR
|
nvarchar(255)
|
255 | |
Tags5Id |
DT_WSTR
|
nvarchar(50)
|
50 | |
Tags5Name |
DT_WSTR
|
nvarchar(255)
|
255 | |
WorkspaceId |
DT_WSTR
|
nvarchar(50)
|
50 | |
WorkspaceName |
DT_WSTR
|
nvarchar(255)
|
255 | |
[Dynamic Column] |
DT_WSTR
|
nvarchar(4000)
|
4000 |
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
This Endpoint belongs to the SubTasks table, therefore it is better to use it, instead of accessing the endpoint directly:
Required Parameters | |
---|---|
QueryBy | Fill-in the parameter... |
Optional Parameters | |
Parent Task Id | |
Project Id | |
Workspace Id | |
Assignee Id | |
Section Id | |
Tag Id | |
UserTaskListId | |
Completed Since | |
Modified Since | |
Continue On 404 Error (When record not found) | False |

API Destination
This Endpoint belongs to the SubTasks table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to get sub tasks:
Required Parameters | |
---|---|
QueryBy | Fill-in the parameter... |
Optional Parameters | |
Parent Task Id | |
Project Id | |
Workspace Id | |
Assignee Id | |
Section Id | |
Tag Id | |
UserTaskListId | |
Completed Since | |
Modified Since | |
Continue On 404 Error (When record not found) | False |

ODBC application
Use these SQL queries in your ODBC application data source:
Read Sub Tasks - First Level (default project)
Read all first level sub tasks for default project. If you sub tasks for 3rd, 4th level deep then this wont capture.
SELECT * FROM SubTasks
Read Sub Tasks - First Level for specified project
Read all first level sub tasks for a specified project id. If you sub tasks for 3rd, 4th level deep then this wont capture.
SELECT * FROM SubTasks WITH (ProjectId='1200652735638082')
Read Sub Tasks for a specified parent task
SELECT * FROM SubTasks WITH(QueryBy='task', TaskId='1207150838176996')
get_subtasks
endpoint belongs to
SubTasks
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Read Sub Tasks - First Level (default project)
Read all first level sub tasks for default project. If you sub tasks for 3rd, 4th level deep then this wont capture.
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM SubTasks';
EXEC (@MyQuery) AT [LS_TO_ASANA_IN_GATEWAY];
Read Sub Tasks - First Level for specified project
Read all first level sub tasks for a specified project id. If you sub tasks for 3rd, 4th level deep then this wont capture.
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM SubTasks WITH (ProjectId=''1200652735638082'')';
EXEC (@MyQuery) AT [LS_TO_ASANA_IN_GATEWAY];
Read Sub Tasks for a specified parent task
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM SubTasks WITH(QueryBy=''task'', TaskId=''1207150838176996'')';
EXEC (@MyQuery) AT [LS_TO_ASANA_IN_GATEWAY];
get_subtasks
endpoint belongs to
SubTasks
table(s), and can therefore be used via those table(s).