View or Modify Cart
Items in the cart can be viewed by URI /requests GET filtered for state of draft.
A single item in the cart can be removed by URI /requests/{reqid} DELETE.
Multiple items in the cart can be removed by URI /requests DELETE.
A single item in the cart can be updated by URI /requests/{reqid} PUT.
Multiple items in the cart can be updated by URI /requests PUT.
cURL Example Viewing Cart Items
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 Response Body
{
"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 Example for Removing Single Cart Item
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 Response Body
{
"links": [
{
"rel": "self",
"href": "https://pseudo.com/iam/governance/adminservice/api/v1/requests/4007"
}
],
"id": "4007",
"status": "withdrawn"
}
cURL Example for Removing Multiple Cart Items
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 Request Body
{
"requests": [
{
"requestId": "3007",
"id": "2"
},
{
"requestId": "2030",
"id": "3"
}
]
}
DELETE Response Body
{
"requests": [
{
"id": "2",
"requestId": "3007",
"status": "SUCCESS"
},
{
"id": "3",
"requestId": "2030",
"status": "SUCCESS"
}
]
}
cURL Example for Updating Single Cart Item
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 Request Body
{
"requestId": "coder-1001",
"taskId": "2c91aeca-9169-47fd-847f-466763af278a",
"action": "approve"
}
PUT Response Body
{
"links": [
{
"rel": "self",
"href": "https://pseudo.com/iam/governance/selfservice/api/v1/requests/1235"
}
],
"id": "1235",
"requestId": "coder-1001",
"status": "SUCCESS"
}
cURL Example for Updating Multiple Cart Items
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 Request Body
{
"requests": [
{
"id": "1003",
"actionComment": "rest sysadmin approved",
"action": "approve"
},
{
"id": "23",
"actionComment": "rest sysadmin reject",
"action": "reject"
}
]
}
PUT Response Body
{
"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"
}
]
}