Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
POST printers/status¶a>
The printer firmware calls this endpoint to notify Forge of its current status.
For information about statuses, see the Firmware Workflow section.
Note that an X-Printer-Auth-Token
request header containing a 43-character auth_token
generated by the POST printers/registration_code endpoint is required.
Resource Information¶
Method and URI | POST http://printer-forge-prod.spark.autodesk.com/v1/print/printers/status |
Authentication Context | app only |
Required OAuth Scopes | none |
Data Format | JSON |
Request¶
HTTP Headers¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
X-Printer-Auth-Token | yes | string | The 43-character authorization token for use by this printer |
Content-Type | yes | string | Must be application/json |
Body Structure¶
The POST body is a JSON object with the following attributes:
Attribute |
Required |
Value Type |
Description |
---|---|---|---|
printer_status | yes | enum: string | the status to set the printer to |
error_code | no | int | error message ID |
error_message | no | string | human-readable error message text |
job_id | string: UUID | the ID of the job | |
job_status | no | enum: string | |
job_progress | no | float | value between 0 and 1 that represents the percentage complete |
data | no | object | extended information about the current job; limited to 5000 characters |
data.job_name | no | string | name of the job |
data.job_id | no | string: UUID | ID of the job |
data.layer | no | int | current layer being processed |
data.total_layers | no | int | total number of layers to print |
data.seconds_left | no | int | seconds left for the job |
data.temperature | no | int | temperature in Centigrade of the printer |
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)¶
The response body is a single, flat JSON object with the following attributes:
Name |
Value Type |
Description |
---|---|---|
registered | bool | whether the printer is registered |
Examples¶
Printer Status Successfully Set as Ready (200)¶
curl -X 'POST' -H 'X-Printer-Auth-Token: _LyEDQH3npJG6FwqTAoG4EIQYfunFkI3fuJ_PZB3PC0' -H 'Content-Type: application/json' -v 'http://printer-forge-prod.spark.autodesk.com/v1/print/printers/status' -d '{
"printer_status":"ready"
}'
{
"registered": true
}
Printer Status Successfully Set as Paused (200)¶
curl -X 'POST' -H 'X-Printer-Auth-Token: _LyEDQH3npJG6FwqTAoG4EIQYfunFkI3fuJ_PZB3PC0' -H 'Content-Type: application/json' -v 'http://printer-forge-prod.spark.autodesk.com/v1/print/printers/status' -d '{
"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
}
}'
{
"registered": true
}