Create Downtime Record
POST
downtime-records
Creates a new Downtime Record.
Resource Information
| Method and URI | POST https://api.aps.autodesk.com/fusion-operations/v2/downtime-records |
| 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 downtime record object to be created, conforming to the specified schema.
Expand all
| startTime* | Begin of the downtime (e.g. 2017-06-21T14:07:17Z) |
| endTime* datetime: ISO 8601 | End of the downtime (e.g. 2017-06-21T16:07:17Z). This value can be null when the downtime is finished, indicating that the downtime was closed automatically by the system. |
| reasonCode* | |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf* | |
| 0* | |
| 1* | |
| machines array: object | |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| workers array: object | |
| id int | |
| number int | |
| anyOf | |
| 0 | |
| 1 | |
| startedBy | |
| id int | |
| number int | |
| anyOf | |
| 0 | |
| 1 | |
| endedBy | |
| id int | |
| number int | |
| anyOf | |
| 0 | |
| 1 | |
| component | |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| product | |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| notes string | Max length: 5000 |
| anyOf | Begin of the downtime (e.g. 2017-06-21T14:07:17Z) |
| 0 | |
| 1 |
* Required
Response
HTTP Status Code Summary
| 201 Created | Downtime Record 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 downtime. |
| startTime datetime: ISO 8601 | Begin of the downtime (e.g. 2017-06-21T14:07:17Z) |
| endTime datetime: ISO 8601 | End of the downtime (e.g. 2017-06-21T16:07:17Z). This value can be null when the downtime is finished, indicating that the downtime was closed automatically by the system. |
| reasonCode | |
| id int | Unique identifier of the referenced entity. |
| code string | Code of the referenced entity.
Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| machines array: object | |
| 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 | |
| workers array: object | |
| id int | |
| number int | |
| name string | Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| startedBy | |
| id int | |
| number int | |
| name string | Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| endedBy | |
| id int | |
| number int | |
| name string | Max length: 255 |
| anyOf | |
| 0 | |
| 1 | |
| component | |
| 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 | |
| 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 | |
| notes string | Max length: 5000 |
| anyOf | Unique identifier of the downtime. |
| 0 | |
| 1 |
Example
Downtime Record successfully created.
Example single downtime record creation request with codes
Request
curl -v 'https://developer.api.autodesk.com/fusion-operations/v2/downtime-records' \
-X 'POST' \
-H 'Authorization: ' \
-H 'Content-Type: application/json' \
-d '{
"startTime": "2024-06-21T11:07:17Z",
"endTime": "2024-06-21T14:07:17Z",
"reasonCode": {
"code": "Mold cleaning"
},
"machines": [
{
"code": "M2"
},
{
"code": "M5"
}
],
"workers": [
{
"number": 66
}
],
"startedBy": {
"number": 4
},
"endedBy": {
"number": 4
},
"component": {
"code": "Tool 1"
},
"product": {
"code": "Product 1"
},
"notes": "My wonderful note with less than 5000 characters"
}'
Show More
Example single Downtime Record creation request with ids
Request
curl -v 'https://developer.api.autodesk.com/fusion-operations/v2/downtime-records' \
-X 'POST' \
-H 'Authorization: ' \
-H 'Content-Type: application/json' \
-d '{
"startTime": "2024-06-21T11:07:17Z",
"endTime": "2024-06-21T14:07:17Z",
"reasonCode": {
"id": 7
},
"machines": [
{
"id": 3
},
{
"id": 4
}
],
"workers": [
{
"id": 3
}
],
"startedBy": {
"id": 2
},
"endedBy": {
"id": 2
},
"component": {
"id": 2
},
"product": {
"id": 5
},
"notes": "My wonderful note with less than 5000 characters"
}'
Show More
Response
{
"id": 3,
"startTime": "2024-06-21T12:07:17Z",
"endTime": "2024-06-21T14:07:17Z",
"reasonCode": {
"id": 7,
"code": "Mold cleaning"
},
"machines": [
{
"id": 3,
"code": "M2",
"name": "Machine 2"
},
{
"id": 4,
"code": "M5",
"name": "Machine 52"
}
],
"workers": [
{
"id": 3,
"number": 66,
"name": "Peter"
}
],
"startedBy": {
"id": 2,
"number": 4,
"name": "John"
},
"endedBy": {
"id": 2,
"number": 4,
"name": "John"
},
"component": {
"id": 2,
"code": "Tool 1",
"name": "Tool 1"
},
"product": {
"id": 5,
"code": "Product1",
"name": "My Product"
},
"notes": "My wonderful note with less than 5000 characters"
}
Show More