Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
POST meshes/repair¶a>
Detects mesh defects and repairs them
Analysis is not required before calling this endpoint.
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.
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 | identifier of the mesh to be repaired |
all | no | bool | true : all problems are repaired recursivelyfalse : only the first detected problem is repaired |
Response¶
HTTP Status Code Summary¶
Code |
Message |
Meaning |
---|---|---|
202 | OK | Successful created a mesh import 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 Repairing 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/repair' -d '{
"id":"42b2b0c3-17dc-4a83-8bf5-49752887b7f5",
"all": true
}'
{
"id": "79e6a536-27cd-41f4-befc-1b8f4f842bb7",
"progress": 0,
"status": "running",
"task_update_time": "2016-06-05T15:35:12.382Z"
}
For an example of a completed task result, see the Examples section in the GET tasks/:id endpoint documentation.