Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
POST printers/command/:task_id¶a>
The printer firmware calls this endpoint to acknowledge receipt of a command through the Faye command channel. Commands are sent to the printer by calling the POST printers/:printer_id/command endpoint.
See the Firmware Workflow page for more information.
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/command/:task_id |
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 |
URI Parameters¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
task_id | yes | string: UUID | the ID of the task created to tack the command’s completion; corresponds to the task_id
returned by the
POST printers/ |
Body Structure¶
The POST body is a JSON object with the following attributes:
Attribute |
Required |
Value Type |
Description |
---|---|---|---|
progress | yes | float | value between 0 and 1 that represents the percentage complete |
error_code | no | int | error message ID |
error_message | no | string | human-readable error message text |
job_id | no | 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 |
Response¶
HTTP Status Code Summary¶
Code |
Message |
Meaning |
---|---|---|
204 | 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. |
Examples¶
Printer Command Acknowledgement Successfully Created (204)¶
curl -X 'POST' -H 'Content-Type: application/json' -H 'X-Printer-Auth-Token: _LyEDQH3npJG6FwqTAoG4EIQYfunFkI3fuJ_PZB3PC0' -v 'http://printer-forge-prod.spark.autodesk.com/v1/print/printers/command/6ace3ef1-2fa0-4231-8288-0c64d7481e08' -d '{
"progress": 0.5,
"error_code": 404,
"error_message": "unknown command",
"job_id": "121333sdsd",
"job_status": "paused",
"job_progress": 0.5,
"data": {
"state": "printing",
"change": " ",
"ui_sub_state": "",
"is_error": false,
"error_code": 123,
"error": 123,
"error_message": "lorem ipsum",
"layer": 14,
"total_layers": 23,
"seconds_left": 3643,
"temperature": 71,
"job_id": 123
}
}'
204 No Content