Update properties of a Machine
PATCH
machines/{machineId}
Modifies only the specified attributes in the request body for the identified Machine. Attributes not included in the request remain unchanged.
Resource Information
| Method and URI | PATCH https://api.aps.autodesk.com/fusion-operations/v2/machines/{machineId} |
| Authentication Context | No security required |
| Required OAuth Scopes | data:read data:write |
| Data Format | JSON |
Request
Headers
| Authorization* string | JWT Access Token |
| Content-Type* string | Must be application/json |
* Required
Request
URI Parameters
| machineId int | Unique identifier of the Machine. |
Request
Body Structure
The Machine attributes to be updated, conforming to the specified schema. Only the provided fields will be modified.
Expand all
| code string | Max length: 255 |
| name string | Max length: 255 |
| shift | The current active shift for the machine |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | The current active shift for the machine |
| 0 | |
| 1 | |
| vendor string | Max length: 255 |
| model string | Max length: 255 |
| section | |
| id int | Unique identifier of the referenced entity. |
| name string | Name of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| counter int | The value from which the machine counter will start |
| costPerHour number | The value assigned to each hour of labor |
| notes string | Max length: 255 |
| disabled boolean | Defines if the machine is disabled |
| automatic boolean | Defines if the worker is linked to the Machine or not |
| productionClosedByOtherWorkers boolean | Defines if the Production using this Machine can only be closed by the worker that started it |
| parallelProduction boolean | Defines if the Production can be started on a Machine that is currently producing |
| totalCyclesInput boolean | Changes the way quantities and wastes are asked on the Production checkout |
| useMachineCounterAsQuantityMeasure boolean | Used when the Machine has an internal counter that indicates the total quantity produced since the last time it has been reset |
| machineComponents array: object | |
| code string | Max length: 255 |
| name string | Max length: 255 |
| products array: object | |
| product | |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| unitsProduced number | |
| anyOf | |
| 0 | |
| 1 | |
| reasonCodes array: object | |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 |
Response
HTTP Status Code Summary
| 200 OK | Machine updated successfully. |
| 400 Bad Request | Bad request due to invalid data. |
| 401 Unauthorized | The access token is invalid. It may have either expired or may not be a three-legged access token. Please verify the token and retry the request. |
| 403 Forbidden | The request was successfully validated but lacked required permission. Please verify your token permissions and retry the request. |
| 404 Not Found | The resource in the path does not exist. |
| 429 Too Many Requests | Rate limit exceeded; wait some time before retrying. |
| 500 Internal Server Error | An unknown server-side error occurred. Please try again later. If the problem persists, please contact support. |
Response
Header (429)
| Retry-After integer | The number of seconds to wait before retrying the request. |
Response
Body Structure (200)
Expand all
| id | Unique identifier of the machine. |
| code string | Max length: 255 |
| name string | Max length: 255 |
| shift | The current active shift for the machine |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | The current active shift for the machine |
| 0 | |
| 1 | |
| vendor string | Max length: 255 |
| model string | Max length: 255 |
| section | |
| id int | Unique identifier of the referenced entity. |
| name string | Name of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| counter int | The value from which the machine counter will start |
| costPerHour number | The value assigned to each hour of labor |
| notes string | Max length: 255 |
| disabled boolean | Defines if the machine is disabled |
| automatic boolean | Defines if the worker is linked to the Machine or not |
| productionClosedByOtherWorkers boolean | Defines if the Production using this Machine can only be closed by the worker that started it |
| parallelProduction boolean | Defines if the Production can be started on a Machine that is currently producing |
| totalCyclesInput boolean | Changes the way quantities and wastes are asked on the Production checkout |
| useMachineCounterAsQuantityMeasure boolean | Used when the Machine has an internal counter that indicates the total quantity produced since the last time it has been reset |
| machineComponents array: object | |
| id int | Unique identifier of the machine component. |
| code string | Max length: 255 |
| name string | Max length: 255 |
| products array: object | |
| product | |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| name string | Name of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| unitsProduced number | |
| anyOf | |
| 0 | |
| 1 | |
| reasonCodes array: object | |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| anyOf | Unique identifier of the machine. |
| 0 | |
| 1 |
Example
Machine updated successfully.
Partial machine name update example
Request
curl -v 'https://developer.api.autodesk.com/fusion-operations/v2/machines/:machineId' \
-X 'PATCH' \
-H 'Authorization: ' \
-H 'Content-Type: application/json' \
-d '{
"name": "New machine changed name"
}'
Partial machine automatic example
Request
curl -v 'https://developer.api.autodesk.com/fusion-operations/v2/machines/:machineId' \
-X 'PATCH' \
-H 'Authorization: ' \
-H 'Content-Type: application/json' \
-d '{
"automatic": true
}'
Response
{
"id": 38,
"code": "My new machine",
"name": "New machine changed name",
"shift": {
"id": 3,
"code": "Normal"
},
"vendor": "ABC Machines",
"model": "Model X",
"section": {
"id": 3,
"name": "A"
},
"counter": 0,
"costPerHour": 150,
"notes": "My wonderful note with less than 255 characters",
"disabled": false,
"automatic": true,
"productionClosedByOtherWorkers": false,
"parallelProduction": true,
"totalCyclesInput": false,
"useMachineCounterAsQuantityMeasure": false,
"machineComponents": [
{
"id": 23,
"code": "Tool 1"
},
{
"id": 27,
"code": "Tool 2"
}
],
"reasonCodes": [
{
"id": 3,
"code": "Maintenance"
},
{
"id": 5,
"code": "Change Over"
}
]
}
Show More