Access to Asana data


#1

Hi

I would like to get access to my Asana account’s data using a BI tool and build an analytics app for myself. I see that API keys are deprecated. How else can I pull data from Asana to an external BI tool?

Regards,


#2

Hey @Sean_Milne,

you can use a personal access token or use oAuth2 authentication.


#3

Hi Diakoptis

I’m using Qlik as a tool to get the data and using PAT or oAuth2 won’t work as a result of a different programming language

Previously this was the solution using API Key:

let asanaAPIKey = ‘[ENTER YOUR API KEY]’;

Projects:
LOAD
id as Projects_id,
name as Projects_name
FROM
[http://localhost:5555/QVSource/WebConnectorV2/?table=JsonToTable&verb=get&xpath=DATA%2Fdata&UserName=$(asanaAPIKey)&url=https%3A%2F%2Fapp.asana.com%2Fapi%2F1.0%2Fprojects&minimumTimeBetweenRequests=600&format=qvx]
(qvx);

LET noRows = NoOfRows(‘Projects’);

for i=0 to $(noRows)-1

let projectId = peek('Projects_id', $(i), 'Projects');

set errormode = 0;
	
TaskIds:
LOAD
	'$(projectId)' as Projects_id,
	id as TaskIds_id,
	name as TaskIds_name
FROM
[http://localhost:5555/QVSource/WebConnectorV2/?table=JsonToTable&verb=get&xpath=DATA%2fdata&UserName$(asanaAPIKey)&url=https%3a%2f%2fapp.asana.com%2fapi%2f1.0%2ftasks%3fproject%3d$(projectId)&minimumTimeBetweenRequests=600&format=qvx]
(qvx);

set errormode = 1;

next

LET noRows = NoOfRows(‘TaskIds’);

for i=0 to $(noRows)-1

let taskId = peek('TaskIds_id', $(i), 'TaskIds');

Tasks:
LOAD
	id as TaskIds_id,
	workspace_id as Task_workspace_id,
	workspace_name as Task_workspace_name,
	created_at as Task_created_at,
	modified_at as Task_modified_at,
	name as Task_name,
	notes as Task_notes,
	completed as Task_completed,
	assignee_status as Task_assignee_status,
	due_on as Task_due_on,
	completed_at as Task_completed_at,
	followers_id as Task_followers_id,
	followers_name as Task_followers_name,
	date#(SubField(created_at, 'T', 1), 'YYYY-MM-DD') as global_date,
	// assignee as Task_assignee, doesn't seem to always exist
	projects_id as Task_projects_id,
	projects_name as Task_projects_name
FROM
[http://localhost:5555/QVSource/WebConnectorV2/?&cacheTimeInHours=6&table=JsonToTable&verb=get&xpath=DATA%2fdata&UserName=$(asanaAPIKey)&url=https%3a%2f%2fapp.asana.com%2fapi%2f1.0%2ftasks%2f$(taskId)&minimumTimeBetweenRequests=600&format=qvx]
(qvx);

next

drop Table Projects;
drop table TaskIds;