Setting a project membership to `comment_only` via the API


#1

Hey guys,

I’m just checking in to see how we can add membership to a project with read-only permissions. I’m currently using the projects/:projectId/addMembers endpoint, it’s not described in the docs but it is used in the Javascript library here: https://github.com/Asana/node-asana/blob/master/lib/resources/gen/projects.js

For clarification this is how I’m calling it now:

let newClient = await client.projects.addMembers(projectId, { members: [email] });

How can I ‘sneak’ permissions in there for comment-only?


#2

Well that’s really interesting. As you say, adding members to a project is undocumented and by my understanding not possible to do via the API. But there it is in the Node library, and actually I found it in the PHP library as well.

I think we will need the Asana API team to weigh in on this question… @Joe_Trollo, @Matt_Bramlage, @Jeff_Schneider ?


#3

Hey @Jonathan_Stiansen and @Phil_Seeman, thanks for bringing this to our attention. While we’ve had the addMembers and addFollowers endpoints for years, there was a bug in our YAML file that is used to build the docs. I’ve fixed it and it should be documented after our next static site deploy.

To answer the original question, there is currently no endpoint to set a project to comment_only via the API.