Changing Admins through REST API
![]()
Hello,
I have a project area created in my RRC 2.0.0.4. I'm trying to set members roles using the REST API but I get a 403 (Permission denied) if I'm not declared as an administrator of this project (even if I'm JazzAdmins). So, I would like to add myself as an Admin like it could be done in the Web UI. When I call the project-area service, I get this :
I can't see the admins service for this project (in RTC 3.0.1, I am able to get one but not in RRC 2.0.0.4). I also observed HTTP headers using the Web UI and I can see that it is using a service named com.ibm.team.process.internal.common.service.IProcessRestService. Is there a way to get the admins service or a documentation that explains how to use the IProcessRestService ? Regards, Sylvain |
2 answers
![]()
Hi there,
Yes I am not sure where the Admin assignment is exposed via REST API. Here's the link to the Process specification: https://jazz.net/wiki/bin/view/Main/DraftTeamProcessRestApi?rev=4 However the user should not need to be an administrator to set roles. Is your current user (that you are trying to use) a Member of the project with Administrator role? Can that user assign roles via the Web UI but just not via the REST APIs? -Tom |
![]()
Hi,
Thank you for your reply. The user I am using is not declared as a member nor an admin of the project but has the JazzAdmins rights. I'm able to add an admin through web UI but not using the API you linked here (it was what I used and I didn't get admins-url). Nevertheless, I found the service used by the Web UI : First, I get the itemID of a contributor (GET http request) : https://{host}{:port}/jazz/service/com.ibm.team.repository.service.internal.IAdminRestService/contributors? Then, I get a stateID for the project area (GET http request) : https://{host}{:port}/jazz/service/com.ibm.team.process.internal.common.service.IProcessRestService/projectAreaByUUID?uuid={project area UUID} Finally, I add the admin to the project (POST http request) : https://{host}{:port}/jazz/service/com.ibm.team.process.internal.common.service.IProcessRestService/projectArea This works but it's not using a service found through the rootservices document so I just assume it's a workaround cause I would prefer not building URI on my own. So, if someone knows how to make it in a better way, I'll be glad to see his solution. Regards, Sylvain |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.