9.8.1 Acquisition of user information
Function
Acquires information about the user who executed the API.
Execution permissions
Admin role, Develop role, Modify role, Submit role
API version
v1
Request format
GET http://host:port/Automation/version/user
Status code
For details about the status codes that can be returned as the response to a request, see the relevant topic in 9.2.17 Status code.
Response schema
The following shows the structure of the response body for a request.
{
"userName" : "user-name",
"accessPermission" : [ ... ],
"resourceGroup" : [ {
"instanceId" : "instance-id",
"name" : "resource-group-name",
"description" : "description",
"accessPermission" : [ ... ]
} , ... ]
}
Usage example
In the following example, the API acquires information about the execution user.
Request header:
GET /Automation/v1/user HTTP/1.1
Host:10.196.184.238:22015
Accept:application/json
Accept-Language: ja
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
User-Agent: useragent1
Response header:
HTTP/1.1 200 OK
Date: Mon, 28 Jul 2014 03:21:30 GMT
Server: Cosminexus HTTP Server
Access-Control-Expose-Headers: WWW-Authenticate
WWW-Authenticate: HSSO ce680e5daa37d9873f31124c64fa8c4a435c21_WIN-JLTV0PQLK2A_V0810
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, HEAD, OPTIONS
Access-Control-Allow-Credentials: true
Cache-Control: no-store, no-transform
Transfer-Encoding: chunked
Content-Type: application/json
Response body:
{
"userName" : "System",
"accessPermission" : [ "User Management" ],
"resourceGroup" : [ {
"instanceId" : "Automation_RG_ALL",
"name" : "All Service Groups",
"description" : "default service groups which contains all services",
"accessPermission" : [ "View", "Execute", "Develop", "Modify", "Admin" ]
} ]
}