JDBC Driver for Asana

Build 23.0.8839

Tasks

To Create, Update, Delete and Query from Tasks table.

Table Specific Information

Select

The driver will use the Asana API to process WHERE clause conditions built with the following column and operator. The rest of the filter is executed client side within the driver.

  • Id supports the '=' comparison.
  • ProjectId supports the '=' comparison.
  • Assignee supports the '=' comparison.
  • TagId supports the '=' comparison.
  • SectionId supports the '=' comparison.
  • UserTaskListId supports the '=' comparison.

For example, the following queries are processed server side:

SELECT * FROM Tasks WHERE Id = '1127092449876457'

SELECT * FROM Tasks WHERE ProjectId = '1128092964672848'

SELECT * FROM Tasks WHERE Assignee = '1126938691750986' AND WorkspaceId = '1126938837961830'

SELECT * FROM Tasks WHERE Assignee = '1126938691750986'

SELECT * FROM tasks WHERE TagId = '1129517083601713'

SELECT * FROM tasks WHERE SectionId = '1127092449876457'

SELECT * FROM tasks WHERE UserTaskListId = '1126938837961837'

When executing a query without one of the above filters, due to the Asana API design, tasks must be retrieved per project. The driver will first query the workspace to retrieve a list of projects. A separate request will then be made for each project to retrieve all the applicable tasks. In theory, this is similar to executing the following query:

SELECT * FROM Tasks WHERE ProjectId IN (SELECT Id FROM Projects)
Due to the number of required requests, performance may be impacted. Note, tasks may also be orphaned and not belong to a project. The driver will not be able to retrieve orphaned tasks.

Insert

ProjectId is a mandatory column for inserting into Tasks table. For example:

INSERT INTO Tasks (Name, Assignee, AssigneeStatus, startOn, DueOn, Completed, ProjectId, Notes, ApprovalStatus, Followers) VALUES ('Task1', '1167715005778471', 'later', '2020-03-25', '2020-04-01', false, 1167713816822364, 'TaskNotes', 'changes_requested', '1167715005778471')

Update

Following is an example of how to update a Tasks table:

UPDATE Tasks SET Browser = 'ie' WHERE Id = '1167713816822371'

Delete

Following is an example of how to delete from Tasks table:

DELETE FROM Tasks WHERE Id = '1167713816822371'

Columns

Name Type ReadOnly References Description
Id [KEY] String True

Globally unique ID of the task.

Name String False

Name of the task.

Assignee String False

User to which this task is assigned.

AssigneeStatus String False

Scheduling status of this task for the user it is assigned to.

The allowed values are today, upcoming, later, new, inbox.

CreatedAt Datetime True

The time at which this task was created.

ModifiedAt Datetime True

The time at which this task was last modified.

startOn Date False

Date and time on which this task is due, or null if the task has no due time.

DueAt Datetime False

Date and time on which this task is due, or null if the task has no due time.

DueOn Date False

Date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format.

Completed Boolean False

True if the task is currently marked complete, false if not.

CompletedAt Datetime True

The time at which this task was completed, or null if the task is incomplete.

CompletedBy String True

The user who completed this task.

ProjectId String False

Projects.Id

Projectid of this task is associated with.

Projects String False

Projects of this task is associated with.

WorkspaceId String False

Workspaces.Id

Globally unique ID of the Workspace.

Notes String False

More detailed, free-form textual information associated with the task.

NumberofSubTasks Integer True

The number of subtasks on this task.

ApprovalStatus String False

Reflects the approval status of this task.

The allowed values are pending, approved, rejected, changes_requested.

ResourceSubType String False

The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.

The allowed values are default_task, milestone, section, approval.

HtmlNotes String False

The notes of the text with formatting as HTML.

Memberships String True

Array of projects this task is associated with and the section it is in.

Dependencies String True

Array of resources referencing tasks that this task depends on.

Dependents String True

Array of resources referencing tasks that depend on this task.

Liked Boolean True

True if the task is liked by the authorized user, false if not.

NumberofLikes Integer True

The number of users who have liked this Task.

LikedBy String True

Array of likes for users who have liked this task.

ResourceType String True

The base type of this resource.

IsRenderedAsSeparator Boolean True

In some contexts tasks can be rendered as a visual separator.

Followers String True

Array of users following this task.

Tags String False

Array of tags associated with this task.

SectionId String True

Sections.Id

PseudoColumn: Globally unique ID of the section.

UserTaskListId String True

WorkspaceMembership.UserTaskListId

PseudoColumn: A user task list represents the tasks assigned to a particular user.

TagId String True

Tags.Id

PseudoColumn: Globally unique ID of the tag.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839