カートの表示または変更
カート内の項目は、URI /requests GET
によって表示でき、下書きの状態でフィルタされます。
カート内の1つの項目は、URI /requests/{reqid} DELETE
によって削除できます。
カート内の複数の項目は、URI /requests DELETE
によって削除できます。
カート内の1つの項目は、URI /requests/{reqid} PUT
によって更新できます。
カート内の複数の項目は、URI /requests PUT
によって更新できます。
cURLの例: カート項目の表示
curl -H "Content-Type: application/json" -X GET -u username:password https://pseudo.com/iam/governance/selfservice/api/v1/requests?q=reqStatus co Draft
GETレスポンス本文
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests?offset=1&limit=10&q=reqStatus%20co%20Draft" }, { "rel": "first", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests?offset=1&limit=10&q=reqStatus%20co%20Draft" } ], "count": 1, "hasMore": false, "totalResult": -1, "requests": [ { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/3002" } ], "id": "3002", "reqStatus": "Request Draft Created", "requester": { "name": "requesterId", "value": "17", "link": { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/users/17" } }, "reqCreatedOn": "2019-07-08T20:29:18Z", "reqType": "Assign Roles", "reqBeneficiaryList": [ { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/users/24" } ], "id": "24" } ] } ] }
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/4007
DELETEレスポンス本文
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/adminservice/api/v1/requests/4007" } ], "id": "4007", "status": "withdrawn" }
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
DELETEリクエスト本文
{ "requests": [ { "requestId": "3007", "id": "2" }, { "requestId": "2030", "id": "3" } ] }
DELETEレスポンス本文
{ "requests": [ { "id": "2", "requestId": "3007", "status": "SUCCESS" }, { "id": "3", "requestId": "2030", "status": "SUCCESS" } ] }
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/1235
PUTリクエスト本文
{ "requestId": "coder-1001", "taskId": "2c91aeca-9169-47fd-847f-466763af278a", "action": "approve" }
PUTレスポンス本文
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/1235" } ], "id": "1235", "requestId": "coder-1001", "status": "SUCCESS" }
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
PUTリクエスト本文
{ "requests": [ { "id": "1003", "actionComment": "rest sysadmin approved", "action": "approve" }, { "id": "23", "actionComment": "rest sysadmin reject", "action": "reject" } ] }
PUTレスポンス本文
{ "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests" } ], "requests": [ { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/1003" } ], "id": "1003", "status": "SUCCESS" }, { "links": [ { "rel": "self", "href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/23" } ], "id": "23", "status": "SUCCESS" } ] }