How do I know what the gids are for the assignee_sections available to a user?

The API documentation for creating and updating a task says for assignee_section:

Note that you can only write to assignee_section with the gid of an existing section visible in the user’s “My Tasks” list.

My problem is that it’s not clear how to get the gids for all of a user’s available assignee_sections in a workspace. I could pull all of their tasks but that seems like overkill and would still miss any valid assignee_sections that don’t have tasks in them. What am I missing?

Good question, I went looking for the endpoint but couldn’t find it. @Phil_Seeman can you help?

Hi @DougB,

As you noted, assignee_sections are composed of the sections in a user’s “My Tasks” list.

A user’s My Tasks is technically called a “user task list” (UTL) in the API.

In almost every way, a UTL is just another project to the API. Therefore, to get the sections in a UTL, just use the regular endpoint to get the sections in a project:

Those will be the valid values to use for assignee_section.

The only “catch” is you need the gid of the UTL for that endpoint. You can get that value via this endpoint:

If you need the user’s gid for the above call, you can get that by using me as the parameter in this call:

1 Like

Thanks for the quick response, @Bastien_Siebman and @Phil_Seeman. That worked perfectly!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.