Get requests

get

/iam/governance/selfservice/api/v1/requests

Returns all the requests raised within Oracle Identity Manager. The requests in the context of the logged in user are returned. For example for an end user, the requests raised for the end user or by the end user are displayed. However for a manager, the requests raised by/for the manager and/or the requests raised by/for the direct reports are returned. Two views are available corresponding to the Track Requests and Pending Approvals tiles on the Self Service console. The view retrieved is determined by the parameter ?view which can have the value trackRequests or pendingApprovals. The default view is trackRequests. For example, to see requests that would be visible in the Pending Approvals tile you can use: GET /iam/governance/selfservice/api/v1/requests?view=pendingApprovals For the trackRequests view the following attributes may be returned: id, reqStatus, requester, reqCreatedOn, reqExpireOn, reqType, reqJustification, reqBeneficiaryList. For the pendingApprovals view the following attributes may be returned: id, title, creator, taskId, state, status, assignee, created, acquiredBy, expires. Note that if state is not included in the query parameters and no other query parameters are given then the default search uses "q=state eq Assigned." Use "q=state eq Any" to retrieve requests in any state. If another query parameter is used, such as "q=title co abc", then the filter "q=state eq Assigned" is not automatically applied. The requests can be filtered using query parameters to refine the result set. Here are some examples for view=trackRequests. Note that including the parameter view=trackRequests is optional since trackRequests is the default view. Retrieve the request with the requestId of 9: GET /iam/governance/selfservice/api/v1/requests?view=trackRequests&q=id eq 9 Retrieve any requests where reqStatus contains the string "wait". Note that the search is case insensitive: GET /iam/governance/selfservice/api/v1/requests?view=trackRequests&q=reqStatus co wait Retrieve any requests where the requester has the requesterId of 15: GET /iam/governance/selfservice/api/v1/requests?view=trackRequests&q=beneficiary eq 15 Retrieve any requests that were created with a specific timestamp: GET /iam/governance/selfservice/api/v1/requests?limit=33&view=trackRequests&q=reqCreatedOn eq 2018-10-08T16:20:14Z Retrieve any requests where reqType is "Create Role". Note that the search is case insensitive: GET /iam/governance/selfservice/api/v1/requests?view=trackRequests&q=reqType eq Create::Role Note the use of "::" to represent spaces in the query parameter value. Retrieve any requests where reqJustification contains the string "temp". Note that the search is case insensitive: GET /iam/governance/selfservice/api/v1/requests?view=trackRequests&q=reqJustification co temp Retrieve any requests where the beneficiary list contains a beneficiary with the Id of 17: GET /iam/governance/selfservice/api/v1/requests?view=trackRequests&q=beneficiary eq 17 Note that query parameters can be combined and results can be limited. For example, to find up to 3 requests where reqStatus contains the string "wait" and the requester has the requesterId of 15: GET /iam/governance/selfservice/api/v1/requests?limit=3&view=trackRequests&q=reqStatus co wait&requester eq 15 Here are some filtering examples for view=pendingApprovals. Retrieve any requests in the ASSIGNED state. Note that the search is case insensitive: GET /iam/governance/selfservice/api/v1/requests?view=pendingApprovals&q=state eq assigned When querying on state possible values are: Any, Assigned, Completed, Suspended, Withdrawn, Expired, Errored, Alerted, Deleted, Info_Requested, Stale. If state is not included in the query parameters and no other query parameters are given then the default search uses "state eq assigned." Use "q=state eq Any" to retrieve requests in any state. Retrieve the request with the Id of 8: GET /iam/governance/selfservice/api/v1/requests?view=pendingApprovals&q=requestKey eq 8 Retrieve any requests where title contains the string "approval for Request ID 9". Note that the search is case sensitive: GET /iam/governance/selfservice/api/v1/requests?view=pendingApprovals&q=title co approval::for::Request::ID::9 Note the use of "::" to represent spaces in the query parameter value. Retrieve any requests where user login for the creator attribute starts with the letter V. Note that the search is case insensitive: GET /iam/governance/selfservice/api/v1/requests?view=pendingApprovals&q=creator sw V Retrieve any requests where taskId contains contains the string "45e3-b94d". Note that the search is case sensitive: GET /iam/governance/selfservice/api/v1/requests?view=pendingApprovals&q=taskId co 45e3-b94d

Request

Supported Media Types
Query Parameters
  • Attributes to be returned in the result.RequestId attribute is mandatory in return list. Comma-separated attributes are accepted.
  • Search filter to get the requests. SCIM filter is accepted. Filter attributes can be requester details or beneficiary details. There should not be any spaces for attribute value. If you want to pass space in between attribute values then replace it with "::". Sample value for filter is "requester eq john or beneficiary eq avink". In view=pendingApprovals mode we can filter the pending request's with the filter param "q=state eq assigned"
  • User who raised the request
  • Target User ID
  • Type of view. Possible values are pendingApprovals/trackRequests
Back to Top

Response

Supported Media Types

200 Response

Successful
Headers
Body ()
Root Schema : BulkReqGetResponse
Type: object
Show Source
Nested Schema : requests
Type: array
Show Source
Nested Schema : UserBulkRequest
Type: object
Show Source
Nested Schema : Requester
Type: object
Show Source
Nested Schema : LinkDataInstances
Type: object
Show Source

401 Response

Unauthorized

404 Response

Resource not found

500 Response

Internal Server Error

Default Response

Unexpected error
Back to Top

Examples

This example retrieves the request information for all requests. The information shown here is against a pseudo system and serves as a prototype.

cURL Example

curl  -H "Content-Type: application/json"  -X GET  -u username:password  https://pseudo.com/iam/governance/selfservice/api/v1/requests

Example of GET Response Body

The following example shows the contents of the response body in JSON format.

{
    "links": [
        {
            "rel": "self",
            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/?
offset=1&limit=10"
        },
        {
            "rel": "first",
            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/?
offset=1&limit=10"
        },
        {
            "rel": "next",
            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/?
offset=11&limit=10"
        }
    ],
    "count": 10,
    "hasMore": true,
    "totalResult": -1,
    "requests": [
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/12"
                }
            ],
            "id": "12",
            "reqStatus": "Request Completed",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-14T18:35:19Z",
            "reqExpireOn": "2019-03-14T18:54:57Z",
            "reqType": "Modify User Profile",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                        }
                    ],
                    "id": "17"
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/17"
                }
            ],
            "id": "17",
            "reqStatus": "Request Awaiting Approval",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-15T18:09:52Z",
            "reqType": "Modify User Profile",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                        }
                    ],
                    "id": "17"
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/19"
                }
            ],
            "id": "19",
            "reqStatus": "Request Completed",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-15T18:10:02Z",
            "reqExpireOn": "2019-03-18T19:14:43Z",
            "reqType": "Modify User Profile",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                        }
                    ],
                    "id": "17"
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/21"
                }
            ],
            "id": "21",
            "reqStatus": "Request Awaiting Approval",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-15T18:10:14Z",
            "reqType": "Modify User Profile",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                        }
                    ],
                    "id": "17"
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/1009"
                }
            ],
            "id": "1009",
            "reqStatus": "Request Awaiting Approval",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-18T20:47:34Z",
            "reqJustification": "Request role for sub-ordinate",
            "reqType": "Assign Roles",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/24"
                        }
                    ],
                    "id": "24"
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/1010"
                }
            ],
            "id": "1010",
            "reqStatus": "Request Awaiting Approval",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-18T20:51:02Z",
            "reqJustification": "Request role for sub-ordinate",
            "reqType": "Assign Roles",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/24"
                        }
                    ],
                    "id": "24"
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/11"
                }
            ],
            "id": "11",
            "reqStatus": "Request Awaiting Approval",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-14T18:33:44Z",
            "reqType": "Modify User Profile",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                        }
                    ],
                    "id": "17"
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/15"
                }
            ],
            "id": "15",
            "reqStatus": "Request Awaiting Approval",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-15T18:09:39Z",
            "reqType": "Modify User Profile",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                        }
                    ],
                    "id": "17"
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/16"
                }
            ],
            "id": "16",
            "reqStatus": "Request Awaiting Approval",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-15T18:09:47Z",
            "reqType": "Modify User Profile",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                        }
                    ],
                    "id": "17"
                }
            ]
        },
        {
            "links": [
                {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/requests/18"
                }
            ],
            "id": "18",
            "reqStatus": "Request Completed",
            "requester": {
                "name": "requesterId",
                "value": "17",
                "link": {
                    "rel": "self",
                    "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                }
            },
            "reqCreatedOn": "2019-03-15T18:09:57Z",
            "reqExpireOn": "2019-03-18T19:14:10Z",
            "reqType": "Modify User Profile",
            "reqBeneficiaryList": [
                {
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://pseudo.com/iam/governance/selfservice/api/v1/users/17"
                        }
                    ],
                    "id": "17"
                }
            ]
        }
    ]
}
Back to Top