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
EMAIL 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:

  1. assign: to make user system admin set "assign"
  2. revoke: to revoke system admin set "revoke"

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

  • "application/json"
  • "application/xml"

If no parameter is set, JSON is the default response given.

"application/xml"
Content-Type

The format of the provided content

  • "application/json"
  • "application/xml"

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

See API Error messages 

 

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"

    }

}

 

 

Comments


0 Comments

Last Updated: Nov 08,2024