Create Machine
POST
machines
Creates a new Machine.
Resource Information
| Method and URI | POST https://api.aps.autodesk.com/fusion-operations/v2/machines |
| 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
Body Structure
The machines object to be created, conforming to the specified schema.
Expand all
| code | 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 | |
| anyOf | Max length: 255 |
| 0 | |
| 1 |
Response
HTTP Status Code Summary
| 201 Created | Machine successfully created. |
| 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. |
| 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 (201)
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 successfully created.
Example single machine request with codes
Request
curl -v 'https://developer.api.autodesk.com/fusion-operations/v2/machines' \
-X 'POST' \
-H 'Authorization: ' \
-H 'Content-Type: application/json' \
-d '{
"code": "My new machine",
"name": "Johannes",
"shift": {
"code": "Normal"
},
"vendor": "ABC Machines",
"model": "Model X",
"section": {
"name": "A"
},
"counter": 0,
"costPerHour": 150,
"notes": "My wonderful note with less than 255 characters",
"disabled": false,
"automatic": false,
"productionClosedByOtherWorkers": false,
"parallelProduction": true,
"totalCyclesInput": false,
"useMachineCounterAsQuantityMeasure": false,
"machineComponents": [
{
"code": "Tool 1"
},
{
"code": "Tool 2"
}
],
"reasonCodes": [
{
"code": "Maintenance"
},
{
"code": "Change Over"
}
]
}'
Show More
Example single machine request with ids
Request
curl -v 'https://developer.api.autodesk.com/fusion-operations/v2/machines' \
-X 'POST' \
-H 'Authorization: ' \
-H 'Content-Type: application/json' \
-d '{
"code": "My new machine",
"name": "Johannes",
"shift": {
"id": 3
},
"vendor": "ABC Machines",
"model": "Model X",
"section": {
"id": 3
},
"counter": 0,
"costPerHour": 150,
"notes": "My wonderful note with less than 255 characters",
"disabled": false,
"automatic": false,
"productionClosedByOtherWorkers": false,
"parallelProduction": true,
"totalCyclesInput": false,
"useMachineCounterAsQuantityMeasure": false,
"machineComponents": [
{
"id": 23
},
{
"id": 27
}
],
"reasonCodes": [
{
"id": 3
},
{
"id": 5
}
]
}'
Show More
Response
{
"id": 38,
"code": "My new machine",
"name": "Johannes",
"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": false,
"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