Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
DELETE printers/:printer_id¶a>
Removes a printer from a member’s list of printers.
Notes:
- The printer owner can unregister printer users.
- The printer owner cannot be unregistered without first unregistering all the printer’s users.
Resource Information¶
Method and URI | DELETE https:/ |
Authentication Context | user context required |
Required OAuth Scopes | 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 to unregister |
Body Structure¶
The POST body is a single, flat JSON object with the following attribute:
Name |
Required |
Value Type |
Description |
---|---|---|---|
secondary_member_id | no | string | identifier of the member to remove
Omitting this attribute has the meaning
of attempting to remove the 3-legged
authenticated user from being the printer’s
owner.
|
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¶
Successful Deletion of Primary Member from Printer (204)¶
curl -X 'DELETE' -H 'Authorization: Bearer tlzR39q1DNI4Sz0JAqMMNp9S9LSw' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/ps/v1/print/printers/872' -d ''
204 No Content
Successful Deletion of Secondary Member from Printer (204)¶
curl -X 'DELETE' -H 'Authorization: Bearer tlzR39q1DNI4Sz0JAqMMNp9S9LSw' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/ps/v1/print/printers/872' -d '
{
"secondary_member_id": "FPEJMQHAG3NXE"
}
'
204 No Content
Failed Attempt to Delete Primary Member Before All Secondary Members are Removed (400)¶
curl -X 'DELETE' -H 'Authorization: Bearer tlzR39q1DNI4Sz0JAqMMNp9S9LSw' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/ps/v1/print/printers/872' -d
{
"message": "Cannot delete printer primary member. Secondary member exists for the printer",
"code": -1,
"error_id": "6812375c-ea1c-4c65-abb1-66eeffb21996"
}
Failed Attempt to Delete a Secondary Member Not Registered with the Printer (403)¶
curl -X 'DELETE' -H 'Authorization: Bearer tlzR39q1DNI4Sz0JAqMMNp9S9LSw' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/ps/v1/print/printers/872' -d '{
"secondary_member_id": "FPEJMQHAG3NXE"
}'
{
"message": "The secondary member is not registered for this printer",
"code": -1,
"error_id": "3ebf865b-6c54-4469-8ddb-c170abc146a5"
}