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
-
opc-request-id: string
The client request ID for tracing. The only valid characters for request IDs are letters, numbers, underscore, and dash.
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
-
action(required):
string
Allowed Values:
[ "APPROVE", "REJECT" ]
APPROVE or REJECT. -
approvalTimeLimit:
object ApprovalTimeLimit
Details about the approval time limit, when applicable. Only one of daysLimit, hoursLimit, or timeRangeLimit should be defined.
-
approvalTimeLimitType:
string
Allowed Values:
[ "INDEFINITELY", "NUMBER_OF_HOURS", "NUMBER_OF_DAYS", "DATE_TIME_RANGE", "EXTENSION" ]
Optional approval time limit type. When type is INDEFINITELY, approvalTimeLimit and extensionTimeLimit should be left undefined. When type is NUMBER_OF_HOURS, NUMBER_OF_DAYS, or DATE_TIME_RANGE, approvalTimeLimit should be provided. When type is EXTENSION, extensionTimeLimit should be provided. -
comment(required):
string
Justification for decision.
-
extensionTimeLimit:
object ExtensionTimeLimit
Approval extension time limit definition as an end time.
-
taskIds(required):
array taskIds
List of Approval Task ids.
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
-
daysLimit:
integer
Minimum Value:
1
Maximum Value:365
Approval time limit definition in days. -
hoursLimit:
integer
Minimum Value:
1
Maximum Value:24
Approval time limit definition in hours. -
rangeLimit:
object ApprovalTimeLimitRange
Approval time limit definition as a time range.
Nested Schema : ExtensionTimeLimit
Type:
object
Approval extension time limit definition as an end time.
Show Source
-
timeExpires(required):
string(date-time)
The extended expiration time as an RFC3339 formatted datetime string.
Nested Schema : ApprovalTimeLimitRange
Type:
object
Approval time limit definition as a time range.
Show Source
-
timeExpires(required):
string(date-time)
The expiration time as an RFC3339 formatted datetime string.
-
timeStarts(required):
string(date-time)
The start time as an RFC3339 formatted datetime string.
Response
Supported Media Types
- application/json
202 Response
Created work request to bulk action the task decisions.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
-
opc-work-request-id: string
Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation.
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
401 Response
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
409 Response
Conflict
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
429 Response
Too Many Requests
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
Default Response
Unknown Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
Error Information.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing.
-
message(required):
string
A human-readable error string.
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.