Skip to content

Connecting to Asana#

First steps with Asana#

Set up an account with Asana.

Cost

There are both free and paid options for this API.

Rate Limits

Your account plan tier will limit the number of requests each API key can make per month. Current rate limits are available in Asana's documentation.

How to Connect DataDisillr to Asana#

To set up a data source connection for Asana, you will need to have:

  • A unique name for your data source connection to be used in queries.
  • The API key generated through your Asana account.

Data Source Form#

To locate the Asana form, follow the steps in Connecting Your Data to DataDistillr. When you get to the window to choose the data source type, select API as shown below.

Select API from the available choices

On the API screen, select Asana from the list of API types as shown in the image below.

Select Asana from API types

The following form will appear. Instructions can be found below on how to find the information required to fill each field on the Asana API form.

Once you have filled out all the fields, press the green 'Save' button, and your API will be connected!

Asana Form

Name#

Enter any name that will help you recognize this data source from within your query window.

Acceptable Characters Include

  • lowercase alphanumeric characters
  • underscores

API Key#

An API key is generated within your account page. The following steps will navigate you to its location. Once created, copy the key and enter it in the Asana form under 'API key'.

In the Asana app, click your profile icon in the top right corner of the page. Choose My Settings.

Click on Asana Account Icon. Choose 'My Settings'.

In the My Settings window, click on the Apps tab.

Click on the Apps Tab in the 'My Settings' window.

Click on Manage Developer Apps which opens a new tab in your browser.

Click on 'Manage Developer Apps'.

In the Personal access tokens section, choose Create new token.

Click on 'Create new token'.

Enter a descriptive name for your token and check the checkbox to agree to the API terms and conditions. Click Create token.

Enter name and check the checkbox. Click 'Create token'.

Click Copy to copy the token to your clipboard.

Click 'Copy' to copy the token.

Endpoints#

Please see Asana's API Reference for more on Asana's endpoints.

The table below shows a list of endpoints available to connect to within the DataDistillr application. If you need to connect to any endpoints not listed in the table below, please use the Custom APIs Form.

Endpoint Required Optional Description
/tasks assignee
project
section
workspace
completed_since
modified_since
limit
offset
opt_pretty
opt_fields
Returns the tasks which match the parameters provided.
/users workspace
team
limit
offset
opt_pretty
opt_fields
Returns the users that the current user has access to.
/workspaces limit
offset
opt_pretty
opt_fields
Returns the workspaces associated with the current user.
/projects workspace
team
archived
limit
offset
opt_pretty
opt_fields
Returns the projects associated with the current user. (Asana recommends filtering by team to avoid timeouts for large domains).
/tags workspace limit
offset
opt_pretty
opt_fields
Returns the tags for the given workspace.
/organizations/{workspace_gid}/teams limit
offset
opt_pretty
opt_fields
Returns all of the teams in the organization connected to the current user.

The endpoints above will display as follows in the nav tree once your API has successfully connected.

Asana Query Page Sidebar

Sample Queries#

The following queries are intended to help you get started, and make life simpler querying within your API.

For the following examples, suppose that my Asana API data source was called asanaapi2000, and I want to query an endpoint. The endpoint goes after the Asana data source name:

FROM Clause

FROM `asanaapi2000`.`<ENDPOINT>`

Get Tasks Endpoint#

This query returns all tasks associated with the specified project.

SELECT *
FROM asanaapi2000.`/tasks`
WHERE `project`='1201829319351080'
LIMIT 100

Get Users Endpoint#

This query returns all users associated with the specified workspace, displaying 50 users per page.

SELECT *
FROM asanaapi2000.`/users`
WHERE `workspace`='944661173197038'
AND `limit`='50'
LIMIT 100

Get Workspaces Endpoint#

This query returns all workspaces accessible to the current user.

SELECT *
FROM asanaapi2000.`/workspaces`
LIMIT 100

Get Projects Endpoint#

This query returns all projects associated with the specified workspace, displaying 10 projects per page.

SELECT *
FROM asanaapi20000.`/projects`
WHERE `workspace`='944661173197038'
AND `limit`='10'
LIMIT 100

Get Tags Endpoint#

This query returns all tags associated with the specified workspace.

SELECT *
FROM asanaapi2000.`/tags`
WHERE `workspace`='944661173197038'
LIMIT 100

Get Teams Endpoint#

This query returns all teams associated with the specified workspace_gid, displaying 10 teams per page.

SELECT *
FROM asanaapi2000.`/organizations/:workspace_gid/teams`
WHERE `workspace_gid`='944661173197038'
AND `limit`='10'
LIMIT 100