Community articleAssigning profile roles using the Administration API5.0
Added by IBM contributorIBM on June 26, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Administrators can update roles for user profiles by sending an HTTP PUT request to the appropriate resource of the Administration API.


Administrators can update roles for user profiles by sending an HTTP PUT request to the appropriate resource of the Administration API.

Only the administrator can get and update roles. The administrator can manipulate roles for any user.

A user can only have a single role at any point in time.

Input

Provide a profile role Atom feed document.

Note:
The content type of the Atom entry document must be application/atom+xml.

Output

None.

Input
Method URI Description
PUT /profiles/admin/atom/profileRoles.do Administrators can update roles for user profiles by sending an HTTP PUT request to the appropriate resource of the Administration API.
Content Type: application/atom+xml
Sample Request:
<feed xmlns="http://www.w3.org/2005/Atom">
<id>RoleFeed-sample-1</id>
<entry>
    <id>employee</id>
</entry>
</feed>

or

<feed xmlns="http://www.w3.org/2005/Atom">
<id>RoleFeed-sample-2</id>
<entry>
    <id>employee.extended</id>
</entry>
</feed>

or

<feed xmlns="http://www.w3.org/2005/Atom">
<id>RoleFeed-sample-3</id>
<entry>
    <id>external.user</id>
</entry>
</feed>
Name Type Optional Description
targetUserid
string No Administrators can retrieve roles for user profiles by sending an HTTP GET request to the appropriate resource of the Administration API.
Output
Code Description
200
OK. Indicates that the request was received successfully.
400
Bad Request. Returned when no matching user record can be found.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
403
Forbidden. The server refuses to fulfill a request, typically because the request was for an object that you don't have permission to access.