アプリケーション役割プロビジョニングの検索
/essbase/rest/v1/applications/{app}/permissions
指定されたアプリケーションについてプロビジョニング情報を検索します。
EPM共有サービス・セキュリティ・モードを使用している場合、この操作は実行できません。かわりに、共有サービス・コンソールでユーザー、グループおよび権限を管理します。
リクエスト
- app(required): string
アプリケーション名。
- filter: string
入力には
all
、group
またはuser
を含めることができます。デフォルト値はall
です。そのため、この問合せパラメータを指定しなかった場合は、すべてのユーザーおよびグループが返されます。デフォルト値:all
- id: string
ユーザーIDまたはグループIDのワイルドカード・パターン。指定した場合は、そのパターンに一致するユーザーおよびグループが返されます。指定しなかった場合は、役割があるすべてのユーザーおよびグループが返されます。役割のないユーザーまたはグループは返されません。
デフォルト値:*
- inherited: boolean
trueの場合は、親グループから派生した役割が考慮に入れられます。デフォルトはfalseです。
デフォルト値:false
- role: string
入力には
all
、none
、または役割(例:app_manager
、db_manager
、db_update
またはdb_access
)のカンマ区切りリストを含めることができます。デフォルト値はall
です。そのため、この問合せパラメータを指定しなかった場合は、役割があるすべてのユーザーおよびグループが返されます。none
を指定した場合は、役割のないユーザーおよびグループのみが返されます。名前で複数の役割を指定した場合、指定した複数の役割のいずれかがあるユーザーおよびグループのみが返されます。デフォルト値:all
レスポンス
- application/json
- application/xml
200 レスポンス
OK
検索条件に一致するユーザーまたはグループのプロビジョニング情報が正常に返されました。レスポンス・タイプは、Acceptヘッダーに応じてJSON、XMLまたはCSVストリームのいずれかになります。Accept='application/json'
またはAccept='application/xml'
である場合、検索結果はレスポンス本体で返されます。Accept='application/octet-stream'
である場合、検索結果はストリームとして返されます。
object
- group: boolean
trueまたはfalse。idがグループを参照するかどうか。
- id: string
ユーザーIDまたはグループID
- links: array links
- name: string
ユーザー名またはグループ名。
- role: string
ユーザーまたはグループの役割。
400 レスポンス
不正なリクエスト
ログインしているユーザーに、適切なアプリケーション役割がない可能性があります。
500 レスポンス
サーバーの内部エラーです。
例
次の例では、cURLでWindowsのシェル・スクリプトからREST APIを呼び出してアプリケーションのプロビジョニング情報を検索する方法を示します。
呼出し元ユーザーのIDおよびパスワードは変数であり、properties.bat
内でその変数値が設定されています。
レスポンスでリンクを必要としない場合は、links=none
を問合せパラメータとして指定します。
cURLコマンドを含むスクリプト
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions?id=*&role=all&filter=all&inherited=false" -H "accept: application/json" -u %User%:%Password%
レスポンス本体の例
{
"items": [
{
"id": "User001",
"role": "db_access",
"links": [
{
"rel": "get",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User001",
"method": "GET"
},
{
"rel": "edit",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User001",
"method": "PUT"
},
{
"rel": "delete",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User001",
"method": "DELETE"
}
]
},
{
"id": "User002",
"role": "db_update",
"links": [
{
"rel": "get",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User002",
"method": "GET"
},
{
"rel": "edit",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User002",
"method": "PUT"
},
{
"rel": "delete",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User002",
"method": "DELETE"
}
]
},
{
"id": "User003",
"role": "db_manager",
"links": [
{
"rel": "get",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User003",
"method": "GET"
},
{
"rel": "edit",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User003",
"method": "PUT"
},
{
"rel": "delete",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User003",
"method": "DELETE"
}
]
},
{
"id": "User004",
"role": "app_manager",
"links": [
{
"rel": "get",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User004",
"method": "GET"
},
{
"rel": "edit",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User004",
"method": "PUT"
},
{
"rel": "delete",
"href": "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User004",
"method": "DELETE"
}
]
}
]
}
cURLコマンドを含むスクリプト - リンクなし、出力ファイルに書込み
次の例では、指定ユーザーのアプリケーション権限を取得します。
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/permissions/User004?group=false&links=none" -H "Accept: application/json" -o output_get.json -u %User%:%Password%
レスポンス本体の例
次の内容がoutput_get.json
に書き込まれます。
{
"id" : "User004",
"role" : "app_manager"
}