9.8.1 ユーザー情報の取得
機能
APIを実行したユーザーの情報を取得します。
実行権限
Adminロール,Developロール,Modifyロール,Submitロール
APIのバージョン
v1
リクエスト形式
GET http://host:port/Automation/version/user
ステータスコード
リクエストに対するレスポンスとして返却されるステータスコードについては,「9.2.17 ステータスコード」のトピックを参照してください。
レスポンスのスキーマ
リクエストに対するレスポンスボディーの構造を次に示します。
{ "userName" : "user-name", "accessPermission" : [ ... ], "resourceGroup" : [ { "instanceId" : "instance-id", "name" : "resource-group-name", "description" : "description", "accessPermission" : [ ... ] } , ... ] }
使用例
実行ユーザーの情報を取得する場合の使用例を示します。
リクエストヘッダー: 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 レスポンスヘッダー: 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 レスポンスボディー: { "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" ] } ] }