保留中の承認のアクション
承認および却下などの保留中の承認のアクションの場合、次のURIを使用します。
-
/requests GET
: ユーザーの保留中の承認を取得します -
/requests PUT
: 保留中の承認を更新します -
/requests DELETE
: リクエストの失効または取下げを行います
cURLの例: 保留中の承認の取得
curl -H "Content-Type: application/json" -X GET -u username:password https://pseudo.com/iam/governance/selfservice/api/v1/requests?view=pendingApprovals
GETレスポンス本文
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests?view=pendingApprovals&offset=1&limit=10" }, { "rel": "first", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests?view=pendingApprovals&offset=1&limit=10" } ], "count": 4, "hasMore": false, "totalResult": -1, "requests": [ { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/1009" } ], "title": "Default request level approval for Request ID 1009", "id": "1009", "creator": "aarora", "taskId": "a8d8ba9e-3787-4510-af9a-c21b8947b247", "state": "ASSIGNED", "status": "Request Awaiting Approval", "assignee": "SYSTEM ADMINISTRATORS", "created": "2019-06-20T20:34:08Z" }, { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/1012" } ], "title": "Default operational level approval for Request ID 1012", "id": "1012", "creator": "aarora", "taskId": "ae5de640-6f8f-4140-b89d-8cc90041a6e3", "state": "ASSIGNED", "status": "Request Awaiting Approval", "assignee": "SYSTEM ADMINISTRATORS", "created": "2019-06-21T17:40:14Z" }, { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/2006" } ], "title": "Default operational level approval for Request ID 2006", "id": "2006", "creator": "dtran20190701", "taskId": "fb5c4722-9f5a-49c0-9edf-1cf4b171a5f6", "state": "ASSIGNED", "status": "Request Awaiting Approval", "assignee": "SYSTEM ADMINISTRATORS", "created": "2019-07-01T18:01:52Z" }, { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/2007" } ], "title": "Default operational level approval for Request ID 2007", "id": "2007", "creator": "dtran20190701", "taskId": "780115f1-2184-497f-8189-b4f921be7865", "state": "ASSIGNED", "status": "Request Awaiting Approval", "assignee": "SYSTEM ADMINISTRATORS", "created": "2019-07-01T18:08:25Z" } ] }
cURLの例: 保留中リクエストの承認
curl -H "Content-Type: application/json" -H "X-Requested-By: <anyvalue>" -X PUT -u username:password -d @put.json https://pseudo.com/iam/governance/selfservice/api/v1/requests/2006
PUTリクエスト本文
{ "requestId": "coder-1001", "action": "approve" }
PUTレスポンス本文
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/2006" } ], "id": "2006", "requestId": "coder-1001", "status": "SUCCESS" }
cURLの例: リクエストの取下げ
curl -H "Content-Type: application/json" -H "X-Requested-By: <anyvalue>" -X DELETE -u username:password -d @post.json https://pseudo.com/iam/governance/selfservice/api/v1/requests/2007
DELETEレスポンス本文
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/2007" } ], "id": "2007", "status": "withdrawn" }