Lists work requests in a compartment or for a resource.

GET {{baseUrl}}/workRequests?compartmentId={{compartment_ocid}}&limit=10&sortOrder=ASC

Lists the work requests in a compartment or for a specified resource.

Request Params

KeyDatatypeRequiredDescription
compartmentIdstring(Required) The ID of the compartment in which to list resources.
resourceIdstringThe OCID of the resource.
statusstringA filter to return only resources their lifecycleState matches the given OperationStatus.
limitnumberThe maximum number of items to return.
pagenumberThe page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.
sortBystringThe field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.
sortOrderstringThe sort order to use, either 'asc' or 'desc'.

HEADERS

KeyDatatypeRequiredDescription
opc-request-idstringUnique Oracle-assigned identifier for the request. If you need to contact Oracle about a
particular request, please provide the request ID.
Acceptstring

RESPONSES

status: OK

{"items":[{"operationType":"\u003cstring\u003e","status":"ACCEPTED","id":"\u003cstring\u003e","compartmentId":"\u003cstring\u003e","percentComplete":"\u003cfloat\u003e","timeAccepted":"\u003cdateTime\u003e","timeFinished":"\u003cdateTime\u003e","timeStarted":"\u003cdateTime\u003e"},{"operationType":"\u003cstring\u003e","status":"IN_PROGRESS","id":"\u003cstring\u003e","compartmentId":"\u003cstring\u003e","percentComplete":"\u003cfloat\u003e","timeAccepted":"\u003cdateTime\u003e","timeFinished":"\u003cdateTime\u003e","timeStarted":"\u003cdateTime\u003e"}]}