How does the createTranslation API work?
md_al_mamun316
Member Posts: 13 ✭
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
}
"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.
Tagged:
0
Best Answer
-
I've never had luck getting the /translation endpoint to work for uploading files.
I always use the /api/blobelements to upload files and do translation
0
Answers
-
I've never had luck getting the /translation endpoint to work for uploading files.
I always use the /api/blobelements to upload files and do translation
0
