Setting a project membership to `comment_only` via the API

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?

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 ?

2 Likes

Hey @Jonathan_Stiansen and @Phil_Seeman, thanks for bringing this to our attention. While we’ve had the addMembers and addCollaborators 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.

Any plan to bring that to the API? I would really benefit from being able to add a member as comment-only to projects to avoid any unexpected data change by my code…

1 Like

I would love that capability as well!

cc: @AndrewWong

1 Like

Thank you for the feedback, Bastien and Phil. We do aim to have web product parity in the API. No promises that this will make the near term roadmap, but I have communicated the need to the API team.

1 Like

I would like to add this to our asana team. Also, we would like to provide read-only permissions to bots and the rest human users will have the existing features as it is. This is because we will be integrating a chatbot into our asana project and bots should be identified. We use asana to collaborate on the chatbot development services that we are working on and we hope to integrate it into our asana project initially.

Hi there! Any changes on this topic? We are waiting for the endpoint to add comment only access for projects with a great amount of members. For example, there is a project with our company library, access should be granted to all members but only one have to administrate this project and have full write access, anyone else should be comment only!

Yes - this capability is coming any day now! See:

1 Like