It's all about the answers!

Ask a question

Add user via Process REST API

Pedro Castro (1326) | asked Apr 25 '17, 5:10 p.m.

I have been working with the process rest api and I see that I can add users doing a post request to members collections, but seems that it only works if I am a administrator in the project area no matter if I have JazzAdmin repository permission,  I don't know why this happens, I got this error when I'm trying to do it.

Name: Save Project Area
    Severity: ERROR
        Summary: Permission Denied
        Description: You don't have permission to perform the following actions:
  Modify the collection of team members (modify/members)
        Severity: ERROR

As JazzAdmin user I can add users via web in all project areas even if I'm not the administrator of them.
Does anybody knows if there is another way to add the user using the process api without been an administrator of the project area?

I will give you an example of what I'm doing.

curl -k -b cookie.txt -c cookie.txt https://myserver/jts/authenticated/identity
curl -X POST --anyauth -k -L -b cookie.txt -c cookie.txt -d "j_username=myuser" -d "j_password=$pass" https://myserver/jts/authenticated/j_security_check
curl -D - -k -b cookie.txt -H "Content-Type: application/xml" -X POST --data-binary @user.xml https://myserver/ccm/process/project-areas/_m8GiUJyaEeCCOpmJEcOfKQ/members

my user.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
          <jp06:members xmlns:jp06="">

Thank you.

One answer

permanent link
Donald Nong (14.5k414) | answered Apr 25 '17, 8:49 p.m.

You need to add yourself as the Project Administrator, at least temporarily. The exact same issue was discussed in the below post (do check out the other posts linked in the post).

Your answer

Register or to post 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.