You can translate the source file to many different formats (see Supported Translations for details). For the purpose of this tutorial, you will translate the source file to the STL format.
To translate a file, you must kick off a translation job. The translation job produces a manifest, which lists all the files that are generated. It also reports how far translation has progressed as a percentage, for each file listed in the manifest.
For this task, you will use the Base64-encoded URN of the source file. In the previous task, Postman saved this to the variable t2_ossEncodedSourceFileURN
, which you will use in the next request.
-
In the Postman sidebar, click Task 3 - Translate Source File > Start a Translation Job. The request loads.
-
Click the Body tab and take note of the JSON payload.
Note the difference in the JSON payload from the same task in the previous tutorial:
-
compressedURN
- A flag that tells the system that the source file is within a zip file. -
rootfile
- The main source file. In this case it is the main assembly file, Tuner.iam, which contains references to the part files found in the zip file. -
type
- The file type that the source file will be translated to; STL in this case.
-
-
Click Send. If the request is successful you should see a screen similar to the following image.
Note the
urn
attribute in the JSON response. This is the URL-safe Base64 encoded URN of the source file. A script in the Tests tab, saves this value to a variable namedt2_url_safe_urn_of_source
.
When you kick off a translation job, it takes time to complete. There are two ways to check if the translation job is done:
-
Periodically check the status of the translation job.
-
Set up a webhook to notify you when the job is done.
For the purpose of this tutorial you will check the status of the translation job. For more information on webhooks, see the documentation on Model Derivative webhook events
-
In the Postman sidebar, click Task 3 - Translate Source File > Check Status of Job. The request loads.
Note the use of the URL-safe Base64-encoded URN of the source file as a URI parameter (the
t2_url_safe_urn_of_source
variable) -
Click Send. You will see a screen similar to the following image.
When a job is complete, the
progress
attribute becomescomplete
. Repeat this step until the job is complete.A script in the Tests tab, saves the URN of the OBJ file to a variable named
dv_urn_0
.