Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
PUT printers/:printer_id/jobs¶a>
Starts a queued job for a 3D printer, if the printer is ready to print.
Jobs must have a valid printable_id
or printable_url
attribute set to call this endpoint.
If the callback_url
attribute is specified, your app will be notified via an HTTP POST with job status. When the job is first created, a test callback is sent to your app by calling your callback_url
with /support
appended. For example, if your callback_url
is http://mysampleapp.com/callback_handler
, the callback mechanism will send a test payload to http://mysampleapp.com/callback_handler/support
. Your app will need to respond with a JSON payload of {"callback":"supported"}
.
The callback will be called with an object like the following:
{
"printer_status": "printing",
"progress": "0.94",
"job_id": "01afb066-725e-4fcf-ba3f-40a551de3e97",
"job_progress": "0.94",
"job_status": "printing",
"data": {
"job_status": "printing",
"total_layers": "50",
"layer": "47",
"seconds_left": "60",
"temperature": "71",
"job_id": "01afb066-725e-4fcf-ba3f-40a551de3e97"
},
"job_name": "My new Bear",
"member_id": "FPEJMQHAG3NXE",
"printer_id": "2831",
"printer_name": "Testing"
}
Resource Information¶
Method and URI | PUT 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- |
Content-Type | yes | string | Must be application/json |
URI Parameters¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
printer_id | yes | int | The printer ID |
Body Structure¶
The POST body is a single, flat JSON object with the following attributes:
Name |
Required |
Value Type |
Description |
---|---|---|---|
job_id | yes | string: UUID | Job ID |
callback_url | no | string: URL | Callback URL |
callback_interval | no | int | the percentage interval at which the
callback_url will be calledFor example, if set to
20 , the callback_url will be called when the job is at
0%, 20%, 40%, 60%, 80%, and 100% completion.The default value is
0 , in which case the callback_url is called every time the
printer checks in. |
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:
Field |
Type |
Description |
---|---|---|
printer_id | int | The printer ID |
job_id | string: UUID | The job ID |
status | enum: string | The status of the job |
Examples¶
Queued Job Successfully Started (200)¶
curl -X 'PUT' -H 'Content-Type: application/json' -H 'Authorization: Bearer uWtnd0hJiVYs9wFq9nsoOI6fUfrb' -v 'https://developer.api.autodesk.com/ps/v1/print/printers/1092/jobs' -d '
{
"job_id":"4b1e4677-99fc-4d68-b697-3a10cc2a0c76",
"callback_url": "http://domain/handleUpdate",
"callback_interval": 20
}'
{
"printer_id": "1092",
"job_id": "4b1e4677-99fc-4d68-b697-3a10cc2a0c76",
"status": "sent"
}