On this page:

User

URI Templates

HTTP Action

Media TypeURI TemplatesDescription
GETapplication/json
user
Get information about current user requesting REST API.

JSON Representation

Properties
Description
Type
Occurs
hrefAuto referenceURI1
nameUser nameString1
contextUuidA unique identifier of the current user sessionString1
administratorCheck whether the user has "ADMIN" roleBoolean
superConsumerCheck whether the user has permission to consume all applications without restrictionBoolean1
qualityManagerCheck whether the user has "QUALITY_MANAGER" roleBoolean1
exclusionManagerCheck whether the user has "EXCLUSION_MANAGER" roleBoolean1
qualityAutomationManagerCheck whether the user has "QUALITY_AUTOMATION_MANAGER" roleBoolean1


JSON Example

 {
    "href": "user",
    "name": "CIO",
    "contextUuid": "031b54ae-5f26-45f7-9e34-84fa222ce4e1",
    "administrator": false,
    "superConsumer": true,
    "qualityManager": false,
    "exclusionManager": false,
    "qualityAutomationManager": true
}



Login


Pseudo REST service to trigger a creation of end user session. Require an "Authorization" header containing user name and password

Prior to any request, REST client must authenticate on behalf of the current end-user, using the "login" request. This request must contain an HTTP header containing the credentials UserName:Password encoded in base 64.


GET /.../rest/user/login HTTP/1.1
Authorization: Basic Y2FzdDpjYXN0


If credentials are valid then the server replies: HTTP/1.1 200 OK 

If credendials are invalid then the server replies: HTTP/1.1 401 Unauthorized

Note: a Set-Cookie HTTP header is sent back from the server in the first server response.

URI Templates

HTTP Action

Media TypeURI TemplatesDescription
GETapplication/json
user/login
Pseudo REST service to trigger a creation of end user session. Require an "Authorization" header containing user name and password



Logout


Pseudo REST service to end a user's session

The following request closes the current session and replies "HTTP/1.1 401 Unauthorized"


GET /.../rest/user/logout HTTP/1.1


URI Templates

HTTPAction

Media TypeURI TemplatesDescription
GETapplication/json
user/logout
Pseudo REST service to end a user's session



Ping


Pseudo REST service to test whether current client can access to the server, use the "ping" request

URI Templates

HTTPAction

Media TypeURI TemplatesDescription
GETapplication/json
user/ping
Pseudo REST service to test a user session.

Enable admin role

This resource provides admin role to the current logged in user when no other user has admin role.

This web service is disabled for INTEGRATED security mode.

PUT: user/admin-role service works only for localhost in default and LDAP security mode.

URI Templates

HTTPAction

Media TypeURI TemplatesDescription
GETapplication/json
user/admin-role

Check whether any user exists with admin role for the current security mode.

PUTapplication/jsonuser/admin-role

Set the current user as admin, fails if another user exist with admin role