Act on Approval Tasks in Bulk (Async)

post

/access-governance/access-controls/20250331/approvals/workRequest

Asynchronously act on one or more Approval Tasks in bulk. Use this approach when actioning over 50 approval tasks.

Request

Header Parameters
  • The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.
Body ()
Contains a single action & comment for a set of approval tasks.
Root Schema : ApprovalDecisionWorkRequestDetails
Type: object
A bulk decision for a set of tasks to create a work request.
Show Source
Nested Schema : ApprovalTimeLimit
Type: object
Details about the approval time limit, when applicable. Only one of daysLimit, hoursLimit, or timeRangeLimit should be defined.
Show Source
Nested Schema : ExtensionTimeLimit
Type: object
Approval extension time limit definition as an end time.
Show Source
Nested Schema : taskIds
Type: array
List of Approval Task ids.
Show Source
Nested Schema : ApprovalTimeLimitRange
Type: object
Approval time limit definition as a time range.
Show Source
Back to Top

Response

Supported Media Types

202 Response

Created work request to bulk action the task decisions.
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation.

400 Response

Bad Request
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

401 Response

Unauthorized
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

404 Response

Not Found
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

409 Response

Conflict
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

429 Response

Too Many Requests
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

500 Response

Internal Server Error
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source

Default Response

Unknown Error
Headers
  • Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Body ()
Root Schema : Error
Type: object
Error Information.
Show Source
Back to Top

Examples

The following example shows how you can approve or reject approval tasks in Bulk. This is an asynchronous operation and use this for approving or rejecting over 50+ approval tasks. Replace placeholder values with actual values before running the sample command.

Before approving or rejecting task ids in bulk, you need to run the following APIs to fetch the required data:
  • List Approvals - [GET] {BasePath}/approvals/{accessRequestId} OR
  • List My Approvals - [GET] {BasePath}approvals/me
.

cURL Request Example

curl -i -X POST \
   -H "Authorization:Bearer <your-access-token>" \
   -H "Content-Type:application/json" \
   -d \
'{
  "taskIds": [
    "3c344664-19b1-11f0-91b5-3e5b0e78e128",
    "1e56b095-3c16-11f0-8176-c2421adcf556",
    "xx56b095-3c16-11f0-8176-c2421adcxxxx",
    "xx344664-19b1-11f0-91b5-3e5b0e78xxxx",
    "5f9a2bc1-4d21-11f0-93b6-5c3b7a5e7d2b",
    "7a4c8d22-6b35-11f0-9c82-9b1f62a4d8c4",
    "2d5f8a73-8c49-11f0-8e41-8d5a3b7c9d1f",
    "4e6d9f84-9d5c-11f0-92a8-7c1b5d3e8a2c",
    "xx9d5c-11f0-92a8-7c1b5d3e8xxxx",
    "6b2f1a95-2e76-11f0-81b2-4e3d7a5c8d2b"
  ],
  "action": "APPROVE",
  "comment": "Bulk Approval"
}' \
 '<${service-instance-url}/access-governance/access-controls/20250331/approvals/workRequest>'

Submit the POST request

${service-instance-url}/access-governance/access-controls/${version}/approvals/workRequest

Example Request Payload

{
  "taskIds": [
    "3c344664-19b1-11f0-91b5-3e5b0e78e128",
    "1e56b095-3c16-11f0-8176-c2421adcf556",
    "xx56b095-3c16-11f0-8176-c2421adcxxxx",
    "xx344664-19b1-11f0-91b5-3e5b0e78xxxx",
    "5f9a2bc1-4d21-11f0-93b6-5c3b7a5e7d2b",
    "7a4c8d22-6b35-11f0-9c82-9b1f62a4d8c4",
    "2d5f8a73-8c49-11f0-8e41-8d5a3b7c9d1f",
    "4e6d9f84-9d5c-11f0-92a8-7c1b5d3e8a2c",
    "xx9d5c-11f0-92a8-7c1b5d3e8xxxx",
    "6b2f1a95-2e76-11f0-81b2-4e3d7a5c8d2b"
  ],
  "action": "APPROVE",
  "comment": "Bulk Approval"
}

Example of the Response Code

You'll receive 204 OK response along with opc-work-request-id in the Response Header. Use this id in the /approvals/workRequest/{workRequestId} to check the status of the asynchronous bulk approval task.

Back to Top