Upload the Model to the Product
In this section, you will upload a model file to the product ID/version combination.
* 
This section will help you get started, but for complete documentation, access the Swagger API documentation on your Experience Service.
The upload to the Experience Service will convert the model in several ways that can partially be driven via the request:
Once you upload your model in a supported file format (multi-extension formats are not supported in this use case), the model will be converted to a .pvz file.
You can also choose to select the Run CAD Optimizer option when uploading your model file for simplification. If you choose to, run the CAD optimizer, the Product ID and version will be linked to four model PVZs. In this example using the Quadcopter models, we will not apply any simplification, as the model is already small.
The original model file
The simplified to “high” quality file
The simplified to “medium” quality file
The simplified to “low” quality file
You can find the required model files in the “Loading and Comparing Assets Dynamically” folder in the Studio Examples repository in GitHub.
1. Upload the Quadcopter Base model using one of the following methods:
Method
Instructions
In Postman
Define the following in POST /ExperienceService/products/v1/model
1. Headers:
name—model name with extension (optional)
pXvid—the UUID from the response of the “POST Product” request in Create a New Product
Content type — application/pvz
simplification — false
cadDataExtension — pvz
Authorization — your Experience Service authorization
2. Body: Attach the CAD file you want to upload as a “binary”
Using a Curl command
Your request should look similar to the following:
curl --location 'https://yourESURL/ExperienceService/products/v1/model' \
--header 'name: quadcopter.pvz' \
--header 'pXvid: yourUUID' \
--header 'Content-Type: application/pvz' \
--header 'simplification: true' \
--header 'cadDataExtension: pvz' \
--header 'X-Requested-With: any' \
--header 'Authorization: Basic cWE6cWF4' \
--data-binary '@/C:/Users/userName/Documents/CADs/quadcopter.pvz'
The Experience Service returns the UUID of the product:
{
"modelId" : <modelId>
}
2. If the model uploads successfully, the response you receive will look similar to the following:
{
"modelId" : <modelId>
}
3. Use one of the following methods to request model simplification or the conversion status for the Quadcopter Base where <modelID> is the returned value in the response you received:
Method
Instructions
In Postman
GET - http://<yourESURL>/ExperienceService/products/v1/model/status/<modelID>
In the header, add “X-Requested-With” - “any”
Using a Curl command
curl --location 'http://<yourESURL>/ExperienceService/products/v1/model/status/<modelID>' \
--header 'X-Requested-With: any' \
--header 'Authorization: ••••••'
4. Repeat steps 1 and 2 for the Quadcopter Updated model. Be sure to use the correct pXvid and .pvz file.
5. Before proceeding to the next step, ensure that the Simplification status in your model status request is marked as "Completed".
Was this helpful?