Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
POST meshes/export¶a>
Exports a mesh to be downloaded.
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 mesh object.
To download the generated export file, call the GET buckets/:bucketKey/objects/:objectName endpoint in the Data Management API.
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 |
---|---|---|---|
id | yes | string: UUID | id of the mesh to be exported |
file_type | yes | string | File type of the file that was uploaded to OSS; only necessary if unspecified as the file extension in the object URN |
Response¶
HTTP Status Code Summary¶
Code |
Message |
Meaning |
---|---|---|
202 | OK | Successful created a mesh export 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¶
Task for Exporting a Mesh Successfully Created (202)¶
curl -X 'POST' -H 'Authorization: Bearer RWLzh098vuF3068r73FI7nF2RORf' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/ps/v1/geom/meshes/export' -d '{
"id":"2c8eb53e-e62b-45de-9209-de4c66017170",
"file_type": "stl_binary"
}'
{
"id": "279699aa-5ea4-4e68-8a92-bf61c93181d3",
"progress": 0,
"status": "running",
"task_update_time": "2016-06-05T15:16:34.273Z"
}
For an example of a completed task result, see the Examples section in the GET tasks/:id endpoint documentation.