Retrieve all work order operations
get
/productionMonitoring/clientapi/v2/workOrders/{workOrder-id}/operations
This operation returns information about all the work order operations that are filtered by a query.
Request
Path Parameters
-
workOrder-id: string
The unique identifier of the work order
Query Parameters
-
expand(optional): string
The list of fields to be expanded in the result. Use 'all' to expand all expandable fields in result.
-
fields(optional): string
The comma-separated list of fields to be shown in response. By default all response object fields will be present.
-
limit(optional): integer
The maximum number of entries to return to the end user.
-
offset(optional): integer
The number that the first record of results is starting from.
-
orderBy(optional): string
Ordering criteria for the returned work order operation list
-
q(optional): string
Query to filter work order operations on the server (For more information on mongoDB query parameters refer to Using mongoDB Query Syntax.)
-
since(optional): integer
The starting point of the desired time interval, in milliseconds. The default is 0.
-
totalResults(optional): boolean
The total number of results suiting the request.
-
until(optional): integer
The finishing point of the desired time interval, in milliseconds. The default is 0.
Header Parameters
-
X-ORACLE-IOT-ORG: string
To allow targeting requests to different organizations. The header value should contain the organization identifier
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=collection
200 Response
Successfully processed.
Root Schema : WorkOrderOperation_receive_list
Type:
Show Source
object
-
count:
integer(int32)
-
hasMore:
boolean
-
items:
array items
-
limit:
integer(int32)
-
links:
array links
The set of API navigation links.
-
offset:
integer(int32)
Nested Schema : items
Type:
Show Source
object
-
actualEndTime:
integer
Actual finish date of the operation as an epoch milliseconds
-
actualEndTimeAsString:
integer
Actual finish date of the operation as an ISO-8601 formatted string
-
actualStartTime:
integer
Actual start date of the operation as an epoch milliseconds
-
actualStartTimeAsString:
integer
Actual start date of the operation as an ISO-8601 formatted string
-
createdBy:
string
Name of the user who registered this work order operation
-
createdTime:
integer
The time when the work order operation was registered with the app as an epoch milliseconds
-
createdTimeAsString:
integer
The time when the work order operation was registered with the app as an ISO-8601 formatted string
-
description:
string
Description of the work order operation
-
externalId:
string
External id representing value that uniquely identifies the work order operation in an external system
-
id:
string
The unique identifier of the work order operation
-
kind:
string
The operation kind
-
lastModifiedBy:
string
Name of the user who last modified the definition of the work order operation
-
lastModifiedTime:
integer
The time when the work order operation definition was last updated as an epoch milliseconds
-
lastModifiedTimeAsString:
integer
The time when the work order operation definition was last updated as an ISO-8601 formatted string
-
name:
string
The name of the operation
-
outputs:
object outputs
The list of output products
-
plannedEndTime:
integer
Scheduled date and time to finish the operation as an epoch milliseconds
-
plannedEndTimeAsString:
integer
Scheduled date and time to finish the operation as an ISO-8601 formatted string
-
plannedStartTime:
integer
Scheduled date and time to start the operation as an epoch milliseconds
-
plannedStartTimeAsString:
integer
Scheduled date and time to start the operation as an ISO-8601 formatted string
-
sequenceNumber:
integer
The sequence number in which the operation is performed in the work order
-
state:
string
The state of the operation. This field represents the state of the operation during its life cycle. One of [UNKNOWN, NOT_STARTED, STARTED, COMPLETED]
-
tasks:
object tasks
The list of operation tasks are used to process the operation
-
workOrder:
string
The work order this operation belongs to
Nested Schema : outputs
Type:
object
The list of output products
Show Source
-
links(optional):
array links
The set of API navigation links.
Nested Schema : tasks
Type:
object
The list of operation tasks are used to process the operation
Show Source
-
links(optional):
array links
The set of API navigation links.
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
401 Response
Unauthorized. The request requires user authentication.
406 Response
Request Not Acceptable. The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.
Examples
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/productionMonitoring/clientapi/v2/workOrders/{workOrder-id}/operations
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"count":2,
"hasMore":false,
"items":[
{
"actualEndTime":1469184297746,
"actualEndTimeAsString":1469184297746,
"actualStartTime":1469184297746,
"actualStartTimeAsString":1469184297746,
"createdBy":"Name of the user who registered this work order operation",
"createdTime":1469184297746,
"createdTimeAsString":1469184297746,
"description":"Description of the work order operation",
"externalId":"79b7700623ca-1ef2",
"id":"36aa272a75cb-66b0",
"kind":"The operation kind",
"lastModifiedBy":"Name of the user who last modified the definition of the work order operation",
"lastModifiedTime":1469184297746,
"lastModifiedTimeAsString":1469184297746,
"name":"The name of the operation",
"outputs":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"plannedEndTime":1469184297746,
"plannedEndTimeAsString":1469184297746,
"plannedStartTime":1469184297746,
"plannedStartTimeAsString":1469184297746,
"sequenceNumber":12345,
"state":"The state of the operation. This field represents the state of the operation during its life cycle. One of [UNKNOWN, NOT_STARTED, STARTED, COMPLETED]",
"tasks":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"workOrder":"The work order this operation belongs to"
},
{
"actualEndTime":1469184297746,
"actualEndTimeAsString":1469184297746,
"actualStartTime":1469184297746,
"actualStartTimeAsString":1469184297746,
"createdBy":"Name of the user who registered this work order operation",
"createdTime":1469184297746,
"createdTimeAsString":1469184297746,
"description":"Description of the work order operation",
"externalId":"40be2e7a1b8c-18c2",
"id":"3e52a441855-50e8",
"kind":"The operation kind",
"lastModifiedBy":"Name of the user who last modified the definition of the work order operation",
"lastModifiedTime":1469184297746,
"lastModifiedTimeAsString":1469184297746,
"name":"The name of the operation",
"outputs":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"plannedEndTime":1469184297746,
"plannedEndTimeAsString":1469184297746,
"plannedStartTime":1469184297746,
"plannedStartTimeAsString":1469184297746,
"sequenceNumber":12345,
"state":"The state of the operation. This field represents the state of the operation during its life cycle. One of [UNKNOWN, NOT_STARTED, STARTED, COMPLETED]",
"tasks":{
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"workOrder":"The work order this operation belongs to"
}
],
"limit":10,
"links":[
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/productionMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
],
"offset":0
}
Complete cURL Example
The following example shows a complete cURL command that you can use to perform the described operation:
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/productionMonitoring/clientapi/v2/workOrders/{workOrder-id}/operations
Note that in the request,
https://iotserver
will be replaced by the name and port of your assigned IoT Cloud Service instance. The format of the Cloud Service instance is
https://myinstance-myidentitydomain.iot.us.oraclecloud.com
and the default port is 443.