2.12.1 ユーザー情報の取得
機能
APIを実行したユーザーの情報を取得します。
実行権限
Adminロール,Developロール,Modifyロール,Submitロール
APIのバージョン
v1
リクエスト形式
GET http://host:port/Automation/version/user
ステータスコード
リクエストに対するレスポンスとして返却されるステータスコードについては,「2.2.17 ステータスコード」のトピックを参照してください。
レスポンスのスキーマ
リクエストに対するレスポンスボディーの構造を次に示します。
{
"userName" : "user-name",
"accessPermission" : [ ... ],
"fullName" : "full-name",
"description" : "description",
"email" : "email",
"resourceGroup" : [ {
"instanceId" : "instance-id",
"name" : "resource-group-name",
"description" : "description",
"accessPermission" : [ ... ]
} ]
}
使用例
実行ユーザーの情報を取得する場合の使用例を示します。
リクエストヘッダー:
GET /Automation/v1/user HTTP/1.1
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
User-Agent: curl/7.36.0
Host: 10.196.184.182:22015
Accept: application/json
Accept-Language: ja
レスポンスヘッダー:
HTTP/1.1 200 OK
Date: Thu, 30 Jul 2015 07:17:47 GMT
Server: Cosminexus HTTP Server
Access-Control-Expose-Headers: WWW-Authenticate
WWW-Authenticate: HSSO 31fd21f2412025969969b479f296b5be20b267_Vlo8Y30JdDBUB3ljJSVPaRtjBSA=_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
レスポンスボディー:
{
"userName" : "System",
"accessPermission" : [ "User Management" ],
"fullName" : "",
"description" : "Built-in account",
"email" : "",
"resourceGroup" : [ {
"instanceID" : "Automation_RG_ALL",
"name" : "All Service Groups",
"description" : "default service groups which contains all services",
"accessPermission" : [ "View", "Execute", "Develop", "Modify", "Admin" ]
} ]
}