User APIs
Assign / Revoke System Admin permissions
OVERVIEW
Overview
This API is used to assign and revoke System Admin permissions in Publisher.
Since v5.0
HTTP Request
POST /api/2/users/<ID>/sysadmin?{parameters}
OR
POST /api/2/users/<EMAIL>/sysadmin?{parameters}
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the user to assign / revoke System Admin permissions |
| The email of the user to assign / revoke System Admin permissions |
URL Query Parameters
| Parameter | Format | Description |
|---|---|---|
| action | String |
Set value as assign/revoke to assign or revoke System Admin:
GET /api/2/users/3/sysadmin?action=assign |
HTTP Headers
| HTTP Request Header | Description | Example |
|---|---|---|
| Authorization | The API Authorisation token. | "Bearer XXXXXXXXXXXXX" |
| Accept |
The format of the expected response
If no parameter is set, JSON is the default response given. |
"application/xml" |
| Content-Type |
The format of the provided content
If no parameter is set, JSON is the expected content by default. |
"application/json" |
HTTP Response
Success
HTTP response 200 with User Summary Object
(Example below)
Error
Example HTTP Request & Response
POST http://example.com/context/api/2/users/3/sysadmin?action=assign
JSON Response
{
"user": {
"id": 3,
"email": "user@domain.com",
"link": "http://example.com/context/api/2/user/3"
}
}
Last Updated: Nov 08,2024
Comments
0 Comments