Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
GET printers/status/:printer_id¶a>
Checks whether a printer is online and gets its current status
The printer must be registered to the current logged-in member (3-legged user). The endpoint returns the printer’s online/offline status when the printer was last checked in (which it also provides in milliseconds) and gives information about the current job, if relevant. The printer is considered to be offline if there were no pings from the printer over the previous 60 seconds.
Resource Information¶
Method and URI | GET https:/ |
Authentication Context | user context required |
Required OAuth Scopes | data:read data:write |
Data Format | JSON |
Request¶
HTTP Headers¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
Authorization | yes | string | Must be Bearer <token> , where <token> is obtained via a three- |
URI Parameters¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
printer_id | yes | int | the printer ID |
Response¶
HTTP Status Code Summary¶
Code |
Message |
Meaning |
---|---|---|
200 | OK | Successful |
400 | Bad Request | Invalid request. E.g., the request could not be parsed. |
401 | Unauthorized | Invalid authorization header. E.g., user is not logged in, or cannot access resource. |
404 | Not Found | Endpoint does not exist. |
422 | Unprocessable Entity | Semantic errors |
429 | Precondition Required | Request rate limit exceeded |
500 | Internal Server Error | An unknown error occurred on the server. |
Body Structure (200)¶
A successful response returns a JSON object with the following attributes:
Attribute |
Value Type |
Description |
---|---|---|
last_check_in | int | milliseconds since last check-in |
printer_availability | enum: string | whether the printer is online or offline |
last_reported_state | object | an object that contains last reported state information |
last_reported_state.printer_status | enum: string | more detailed information about the printer’s last reported status |
last_reported_state.error_code | int | code associated with any possible error state |
last_reported_state.error_message | string | detailed message if the priner is in an errored state |
last_reported_state.job_id | string: UUID | the identifier of the current job |
last_reported_state.job_status | enum: string | the status of the current job |
last_reported_state.job_progress | float | a value between 0 and 1 representing the percentage
completion of the current job |
last_reported_state.data | object | extended information about the current job and printer status |
last_reported_state.data.job_name | string | human-readable name of the current job |
last_reported_state.data.job_id | string: UUID | the identifier of the current job |
last_reported_state.data.layer | int | the current layer being printed |
last_reported_state.data.total_layers | int | the total number of layers in the print job |
last_reported_state.data.seconds_left | int | the number of seconds remaining in the print job |
last_reported_state.data.temperature | float: degrees C | the temperature in Centigrade of the printer |
Examples¶
Successful Retrieval of Printer Status (200)¶
curl -X 'GET' -H 'Authorization: Bearer m17SbcLhQRcLTUbkJXoKR53Rk8lj' -v 'https://developer.api.autodesk.com/ps/v1/print/printers/status/1092'
{
"last_check_in": 21000,
"printer_availability": "offline",
"last_reported_state": {
"printer_status": "paused",
"error_code": 0,
"error_message": "",
"job_id": "4b1e4677-99fc-4d68-b697-3a10cc2a0c76",
"job_status": "paused",
"job_progress": 0.5,
"data": {
"job_name": "Part1.stl",
"job_id": "4b1e4677-99fc-4d68-b697-3a10cc2a0c76",
"layer": 6,
"total_layers": 12,
"seconds_left": 37,
"temperature": 28.6875
}
}
}