Retrieve all production plans
get
/productionMonitoring/clientapi/v2/productionPlans
This operation retrieves information for all production plans filtered by a query. This method supports the request header with name 'X-ORACLE-IOT-ORG', which allows targeting requests to different organizations. The value of this request header should contain the organization identifier.
Request
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
The ordering criteria for the returned production plans.
-
q(optional): string
The query to filter production plans 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
This method supports the request header with name 'X-ORACLE-IOT-ORG', which allows targeting requests to different organizations. The value of this request header should contain the organization identifier.
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=singular
200 Response
Successfully processed.
Root Schema : ProductionPlan_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
-
actualQuantity:
number
The actual quantity of the product.
-
endTime:
integer
The end time for the plan item as an an epoch milliseconds.
-
endTimeAsString:
string
The end time for the plan item as an ISO-8601 formatted string.
-
expectedQuantity:
number
The expected quantity of the product.
-
externalId:
string
Property description was not set
-
factory:
string
The identifier of the factory the production plan is created for.
-
id:
string
The identifier created by the Oracle IoT Cloud Service for the production plan.
-
idealCycleTime:
number
The minimum cycle time (in milliseconds) to complete this machine for the given product under optimal conditions.
-
machine:
string
The identifier of the machine the production plan is created for.
-
operator:
string
The identifier of the operator the production plan is created for.
-
product:
string
The identifier of the product the production plan is created for.
-
productionLine:
string
The identifier of the production line the production plan is created for.
-
rejectQuantity:
number
The rejected quantity of the product.
-
routingTask:
string
The identifier of the routing task the production plan is created for.
-
scrapQuantity:
number
The scrap quantity of the product.
-
startTime:
integer
The start time for the plan item as an epoch milliseconds.
-
startTimeAsString:
string
The start time for the plan item as an ISO-8601 formatted string.
-
type:
string
The type of the production plan. The type must be one of [FACTORY, FACTORY_LINE, MACHINE_TASK].One of [FACTORY, FACTORY_LINE, MACHINE_TASK, OPERATOR_TASK].
-
workOrder:
string
The identifier of the work order the production plan is created for.
-
workOrderNumber:
string
The work order number for the production plan. It is unique within a factory.
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.
403 Response
Forbidden. The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.
Examples
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/productionMonitoring/clientapi/v2/productionPlans
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"count":2,
"hasMore":false,
"items":[
{
"actualQuantity":0.0,
"endTime":1469184297746,
"endTimeAsString":"2016-07-22T10:44:57.746Z",
"expectedQuantity":0.0,
"externalId":"382b46b0534b-47c9",
"factory":"The identifier of the factory the production plan is created for.",
"id":"6307c302907-2357",
"idealCycleTime":0.0,
"machine":"The identifier of the machine the production plan is created for.",
"operator":"The identifier of the operator the production plan is created for.",
"product":"The identifier of the product the production plan is created for.",
"productionLine":"The identifier of the production line the production plan is created for.",
"rejectQuantity":0.0,
"routingTask":"The identifier of the routing task the production plan is created for.",
"scrapQuantity":0.0,
"startTime":1469184297746,
"startTimeAsString":"2016-07-22T10:44:57.746Z",
"type":"FACTORY",
"workOrder":"The identifier of the work order the production plan is created for.",
"workOrderNumber":"The work order number for the production plan. It is unique within a factory."
},
{
"actualQuantity":0.0,
"endTime":1469184297746,
"endTimeAsString":"2016-07-22T10:44:57.746Z",
"expectedQuantity":0.0,
"externalId":"4ff04b573b2a-6175",
"factory":"The identifier of the factory the production plan is created for.",
"id":"1b3a57be39a0-3159",
"idealCycleTime":0.0,
"machine":"The identifier of the machine the production plan is created for.",
"operator":"The identifier of the operator the production plan is created for.",
"product":"The identifier of the product the production plan is created for.",
"productionLine":"The identifier of the production line the production plan is created for.",
"rejectQuantity":0.0,
"routingTask":"The identifier of the routing task the production plan is created for.",
"scrapQuantity":0.0,
"startTime":1469184297746,
"startTimeAsString":"2016-07-22T10:44:57.746Z",
"type":"FACTORY",
"workOrder":"The identifier of the work order the production plan is created for.",
"workOrderNumber":"The work order number for the production plan. It is unique within a factory."
}
],
"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/productionPlans
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.