Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

copy design using api

abdallah_mashalyabdallah_mashaly Member Posts: 7

i have a public design for example this one
https://cad.onshape.com/documents/fc8af75b1e15f82459f28f6f/w/431848f670c2fa7a12ebc577/e/b9af0e7afeae426fd3426fdd

im trying to copy it using the api
method = POST

path = f"/api/documents/d/{source_did}/w/{source_wid}/copy"    body = {        "newName": new_doc_name,        "isPublic": is_public    }


i get document not found , but when i use the same ids , but with a different endpoint to get the document details:
method= GET

path = f"/api/documents/{doc_id}"

i get the document details
am i using the wrong endpoint or is there another method?
i know i can do this from the viewer by simply pressing the button in the image , but is there a way to do it using the api??

image.png

Comments

Sign In or Register to comment.