Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
POST trays¶a>
Creates a new tray that contains the meshes selected to be printed.
Note that this endpoint is asynchronous and initiates a task that runs in the background, rather than halting execution of your program. The response returns a task id
that you need to use to call the GET tasks/:id endpoint, which retreives the new tray object.
Resource Information¶
Method and URI | POST 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 |
Body Structure¶
The POST body is a single, flat JSON object with the following attributes:
Name |
Required |
Value Type |
Description |
---|---|---|---|
printer_type_id | yes | string: UUID | |
profile_id | yes | string: UUID | |
mesh_ids | yes | array: string: UUID | a list of mesh identifiers to be printed |
mesh_attrs | no | object | Indexed by mesh, these are parameters for the algorithm that fits the mesh onto the tray. Set this parameter if you do not want the POST trays/prepare endpoint to reorient, reposition or calculate support material requirements for the meshes. |
default_material_id | no | string: UUID | identifier of the default material to use if a mesh does not have a material specified
See GET materials
for more information.
|
Response¶
HTTP Status Code Summary¶
Code |
Message |
Meaning |
---|---|---|
202 | Accepted | Successfully created a tray creation task |
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 (202)¶
The response body is a single, flat JSON object with the following attributes:
Field |
Type |
Description |
---|---|---|
id | string: UUID | Task ID |
status | enum: string | Possible values: running , done , and error |
progress | float | A value between 0 (not started) and 1 (complete) indicating percentage complete |
result | object | The response if status is done |
error | object | The error message if status is error |
Examples¶
Tray Task Successfully Created (202)¶
curl -X 'POST' -H 'Authorization: Bearer RWLzh098vuF3068r73FI7nF2RORf' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/ps/v1/print/trays' -d '{
"printer_type_id" : "7FAF097F-DB2E-45DC-9395-A30210E789AA",
"profile_id" : "34F0E39A-9389-42BA-AB5A-4F2CD59C98E4",
"mesh_ids" : [ "92624c41-7501-477a-bf22-87578d7fdf82", "270a95c9-ff09-4fd2-a083-a41eb294150a" ],
"mesh_attrs": {
"92624c41-7501-477a-bf22-87578d7fdf82": {
"reposition": false,
"reorient": true,
"support": true
}
}
}'
{
"id": "73e8ab90-3e5e-4b2f-9e12-6cdcb3ccc421",
"progress": 0,
"status": "running",
"task_update_time": "2016-06-06T05:42:30.476Z"
}
For an example of a completed task result, see the Examples section in the GET tasks/:id endpoint documentation.