Replace work order by ID

put

/productionMonitoring/clientapi/v2/workOrders/{workOrder-id}

This operation updates information about a work order that is specified by its ID, with complete work order definition.

Request

Supported Media Types
Path Parameters
Header Parameters
  • To allow targeting requests to different organizations. The header value should contain the organization identifier
Body ()
Root Schema : WorkOrder_create
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : WorkOrder_receive
Type: object
Show Source
Nested Schema : operations
Type: object
The list of operations are used to process the work order
Show Source

400 Response

Bad Request. The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

401 Response

Unauthorized. The request requires user authentication.

404 Response

Not Found. The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

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.

415 Response

Unsupported Media Type. The request entity has a media type which the server or resource does not support.
Back to Top

Examples

curl -X PUT 
   -u <username>:<password>
   -H 'Accept: application/json'
   -H 'Content-Type: application/json'
   https://iotserver/productionMonitoring/clientapi/v2/workOrders/{workOrder-id}

Example of Request Body

The following example shows the content of the request body in JSON format:


{
"actualEndTime":1469184297746,
"actualStartTime":1469184297746,
"batchQuantity":12345,
"batchUOM":"Unit of measure of the batch quantity. Applicable only for Process Work Order",
"description":"Description of the work order.",
"externalId":"77f114dc23a2-3d5d",
"factory":"A factory this work order belongs to",
"name":"Name that identifies the work order",
"plannedEndTime":1469184297746,
"plannedQuantity":12345,
"plannedStartTime":1469184297746,
"primaryUOM":"Unit of measure of the primary product. Applicable only for Process Work Order",
"product":"A product identifier that the work order creates",
"state":"The user-defined name for the work order state. The field contains the system value of the work order state by default.",
"systemState":"Name of the work order system state. This represents the state of the work order during its life cycle. One of [CREATED, PLANNED, UNRELEASED, RELEASED, IN_PROCESS, COMPLETED, CLOSED, CANCELLED].",
"type":"Type of the work order state. One of [STANDARD, NON_STANDARD, TRANSFORM, REWORK]. Default value is STANDARD.",
"workMethod":"'DISCRETE_MANUFACTURING'"
}

Example of Response Body

The following example shows the content of the response body in JSON format:


{
"actualEndTime":1469184297746,
"actualEndTimeAsString":1469184297746,
"actualStartTime":1469184297746,
"actualStartTimeAsString":1469184297746,
"batchQuantity":12345,
"batchUOM":"Unit of measure of the batch quantity. Applicable only for Process Work Order",
"createdBy":"Name of the user who registered this work order",
"createdTime":1469184297746,
"createdTimeAsString":1469184297746,
"description":"Description of the work order.",
"externalId":"21e159c27202-1b50",
"factory":"A factory this work order belongs to",
"id":"6765235b6917-15c8",
"integrationId":"5185cd41adb-1cf6",
"lastModifiedBy":"Name of the user who last modified the definition of the work order",
"lastModifiedTime":1469184297746,
"lastModifiedTimeAsString":1469184297746,
"name":"Name that identifies the work order",
"operations":{
"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,
"plannedQuantity":12345,
"plannedStartTime":1469184297746,
"plannedStartTimeAsString":1469184297746,
"primaryUOM":"Unit of measure of the primary product. Applicable only for Process Work Order",
"product":"A product identifier that the work order creates",
"routing":"The production routing identifier",
"state":"The user-defined name for the work order state. The field contains the system value of the work order state by default.",
"systemState":"Name of the work order system state. This represents the state of the work order during its life cycle. One of [CREATED, PLANNED, UNRELEASED, RELEASED, IN_PROCESS, COMPLETED, CLOSED, CANCELLED].",
"type":"Type of the work order state. One of [STANDARD, NON_STANDARD, TRANSFORM, REWORK]. Default value is STANDARD.",
"workMethod":"'DISCRETE_MANUFACTURING'"
}



Complete cURL Example

The following example shows a complete cURL command that you can use to perform the described operation:

curl -X PUT 
   -u <username>:<password>
   -H 'Accept: application/json'
   -H 'Content-Type: application/json'
   -d '{"actualEndTime":1469184297746,"actualStartTime":1469184297746,"batchQuantity":12345,"batchUOM":"Unit of measure of the batch quantity. Applicable only for Process Work Order","description":"Description of the work order.","externalId":"77f114dc23a2-3d5d","factory":"A factory this work order belongs to","name":"Name that identifies the work order","plannedEndTime":1469184297746,"plannedQuantity":12345,"plannedStartTime":1469184297746,"primaryUOM":"Unit of measure of the primary product. Applicable only for Process Work Order","product":"A product identifier that the work order creates","state":"The user-defined name for the work order state. The field contains the system value of the work order state by default.","systemState":"Name of the work order system state. This represents the state of the work order during its life cycle. One of [CREATED, PLANNED, UNRELEASED, RELEASED, IN_PROCESS, COMPLETED, CLOSED, CANCELLED].","type":"Type of the work order state. One of [STANDARD, NON_STANDARD, TRANSFORM, REWORK]. Default value is STANDARD.","workMethod":"'DISCRETE_MANUFACTURING'"}'
   https://iotserver/productionMonitoring/clientapi/v2/workOrders/{workOrder-id}



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.
Back to Top