On this page:

User

URI Templates

HTTP Action

Media TypeURI TemplatesDescription
GETapplication/json
user{?parameters}
Get information about current user requesting REST API.

Parameters

URI ParameterDescriptionValuesDefault value
application-nameGet information about assigned roles for the specific applicationStringnone (Mandatory parameter)

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
userApplicationDetail[ ]
This list of matched applications returns roles assigned for this userArray0..*
userApplicationDetail[ ].applicationDetailApplication detailsStructure1
userApplicationDetail[ ].applicationDetail.nameApplication nameString1
userApplicationDetail[ ].applicationDetail.hrefAuto referenceURI1
userApplicationDetail[ ].applicationDetail.adgDatabaseFor a Measurement Database, name of the Central database hosting this applicationString0..1
userApplicationDetail[ ].applicationRolesRoles assigned for this applicationStructure1
userApplicationDetail[ ].applicationRoles.qualityManagerCheck whether the user has "QUALITY_MANAGER" role for this applicationBoolean1
userApplicationDetail[ ].applicationRoles.exclusionManagerCheck whether the user has "EXCLUSION_MANAGER" role for this applicationBoolean1
userApplicationDetail[ ].applicationRoles.qualityAutomationManagerCheck whether the user has "QUALITY_AUTOMATION_MANAGER" role for this applicationBoolean1
userApplicationDetail[ ].applicationRoles.codeRestrictedCheck whether the user has "CODE_RESTRICTED" role for this applicationBoolean1


JSON Example

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


GET DEMO
 {
	"href": "user",
	"superConsumer": true,
	"administrator": true,
	"contextUuid": "64e9ff82-7b68-4ad1-916a-932294942593",
	"name": "admin",
	"userApplicationDetail": [
		{
			"applicationDetail": {
				"name": "Dream Team",
				"href": "AAD/applications/3",
				"adgDatabase": "adg_contrex_central"
			},
			"applicationRoles": {
				"codeRestricted": false,
				"qualityManager": false,
				"exclusionManager": false,
				"qualityAutomationManager": false
			}
		}
	]
}

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