How to get an owner name while sending a GET Projects request.

Hi Everyone,

Is there a way I can get owner name of all projects. I am using https://app.asana.com/api/1.0/projects?opt_fields=current_status,name,owner

Result includes - “owner”: {
“gid”: “12XXXXXXXXXX09”,
“resource_type”: “user”
}
while using https://app.asana.com/api/1.0/projects?12XXXXXXXXXX09
Result includes - “owner”: {
“gid”: “12XXXXXXXXXX09”,
“name”:“ABC”,
“resource_type”: “user”
}
Is there a way to get owner name for all projects at once ?
Thanks!

Try this:
https://app.asana.com/api/1.0/projects?opt_fields=current_status,name,owner.name

3 Likes

Thank you @Frederic_Malenfant, this worked !

2 Likes

Hello, when an API pulls the PROJECT OWNER GID - does this come what what roles you have assigned to the people inside the project?

Hi @James_Fei_Mar,

That information does not come from the project owner.

You can get the roles that are defined within a given project template, and you can set the roles’ values when instantiating a project from a template; but once the project is created, there’s no API access to the roles that were used in the project’s creation.

So where would “project_owner_gid” come from?

Oh, OK, sorry, I didn’t really “get” your question before.

While it’s true that the “Project owner” is shown in the “Project roles” section on the project’s Overview tab, the “owner” is really a special value. By default it’s set to the user who created the project, but it can be changed to someone else, either here:
image

or here:

image