Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Issue while using "globaltreenodes" API for trash in Onshape storage
aman_singh005
Member Posts: 11 ✭
Actually I was trying to use the native onshape APIs for trash but for some reason I am getting the "forbidden" error.
I am using these 3 APIs.
https://cad.onshape.com/api/globaltreenodes/restore
This works fine.
I am using these 3 APIs.
https://cad.onshape.com/api/globaltreenodes/restore
This works fine.
But I am getting 403 (Forbidden) for these 2 requests, I am using the same type of auth and respective json body.
https://cad.onshape.com/api/globaltreenodes/emptyTrash
https://cad.onshape.com/api/globaltreenodes/emptyTrash
https://cad.onshape.com/api/globaltreenodes/delete
For eg, for /delete -
My body is -
Can anyone please help here, what could be wrong ?
For eg, for /delete -
My body is -
<div>{</div><div> "itemsToMove": [</div><div> {</div><div> "resourceType": "folder",</div><div> "id": "087c742dd84d5eae353d6e2a"</div><div> }</div><div> ]</div><div>}</div>
Can anyone please help here, what could be wrong ?
0
Answers
POST https://cad.onshape.com/api/globaltreenodes/magic/4
Just make sure that your OAuth application in the dev portal has permission to delete
So, this "delete" is for the trash, right ? I mean it will delete the folder forever ?
I guess it's a normal delete.
Also, can you please let me know if there is a way to empty the trash using any APIs ?
Or if you can provide me some documentation, that would be great help.
The /delete api for removing from trash seems to not be a publicly accessible API.
These APIs don't exactly have documentation, and are likely not officially supported.
Onshape has more than a few APIs that are not publicly accessible.
So, is there any alternative or anything you might help here ?