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.

How does the createTranslation API work?

Hi, I'm trying to execute an API call to create a translation for my .step file to create a Single Part Studio in a new a tab of the document from Django backend. Unfortunately there is not much documentation for this call, the only thing explaining how to do it I've found here and it says the following:
"The file is uploaded as multipart form data. Each of the API parameters is a separate field in the multipart upload. The two required fields are “file” and “formatName”. The file part must contain the upload and should normally have a filename attribute set. The filename attribute can be omitted if the form data also has an encodedFilename field that contains the filename in URL-encoded form."

I am trying to do so, but in Django I get "Bad request" message and even in Glassworks I get
  "message": "Untranslatable format",
  "moreInfoUrl": "",
  "status": 400,
  "code": 0
I'm sure that the file is correct and it can be successfully translated in a single part studio manually.

How should I create a request body or is there any better way to solve the problem? I also tried with '?storeInDocument=True&formatName=STEP&translate=True', but the response is the same..

Thanks in advance.

Best Answer


Sign In or Register to comment.