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
Key | Datatype | Required | Description |
---|---|---|---|
compartmentId | string | (Required) The ID of the compartment in which to list resources. | |
resourceId | string | The OCID of the resource. | |
status | string | A filter to return only resources their lifecycleState matches the given OperationStatus. | |
limit | number | The maximum number of items to return. | |
page | number | The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. | |
sortBy | string | The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. | |
sortOrder | string | The sort order to use, either 'asc' or 'desc'. | |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
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. | |||
Accept | string |
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"}]}