I’d like to get all projects, regardless if I’m a member and its public state, via the API.
I’m just using a token, since we’re gonna use it for internal reporting only.
I’ve tried several options (like specifying workspace and team) through the API explorer, but none of them are giving me what I need.
Am I missing something or is it just not possible to get those projects? (Or should I register tokens with each user’s account? – Seems cumbersome, since I’m an admin and I figured the token registered with that account should give me complete access to the entire organization, its workspace & teams and its contents).
@Vib_Wor is correct. Service Accounts provide exactly what you’re looking for, though it is an enterprise feature. Enterprise admins can also run full org exports.
As you correctly point out, the workaround for non-enterprise users would be to add yourself (or a bot account) to every private project that you want to have access to via the API. Your Personal Access Token will have access to every public team/project/task/subtask in Asana (i.e. you don’t need to be a member to get access via the API if it’s public). You only don’t have access to things that are private.
Want to confirm if I access the API with a Service Account and
GET /workspaces/{workspace_gid}/projects
this will return all projects in the workspace, regardless of membership? I
n other words, want to make sure that this endpoint operates this way or is the only way to get all projects is to hit the /organization_exports endpoint?