Admin API Base URL: https://api-platform.vntana.com
Public API Base URL: https://api.vntana.com
For a collection of all Endpoints in our Admin API, view the documentation here. To view the collection of Public Endpoints, view the documentation here. Note: In the following guide and aforementioned documentation, you will see referenced in numerous Endpoints something called a Client. This refers to the folders one can create on the Platform within an Organization. The Client nomenclature is a legacy reference being replaced with Folder. These will be referenced as Client / Folder in all guides.
Another key feature of the VNTANA Platform is the ability to download the Original 3D model that was uploaded as well as the GLB, FBX, and USDZ formatted versions of the Optimized 3D model. This is possible using both the Admin API and the Public API.
Note: In order to download the thumbnail or asset itself, the Product must be ‘Published’ on the Platform.
Downloading Model via Admin API
As with all endpoints in the Admin API, you must first obtain the appropriate level of authentication by generating a Refresh Token. View this guide to learn more about authentication.
-
Log in using an Authentication Key or email / password.
-
Returns an x-auth-token in the Response Headers.
-
-
Retrieve a list of Organizations and store the needed Organization’s UUID.
-
Pass the x-auth-token from Step 1 in the Request Headers.
1{ ‘x-auth-token’ : ‘Bearer ‘ + x_auth_token } -
This step can be skipped if the Organization UUID is already stored locally.
-
-
Generate a Refresh Token for the Organization.
-
Pass the x-auth-token from Step 1 in the Request Headers.
1234{‘x-auth-token’ : ‘Bearer ‘ + x_auth_token‘organizationUuid’ : ‘string’} -
Returns the Refresh Token as the Response Header x-auth-token.
-
-
Retrieve a list of Clients / Folders and store the needed UUID.
-
Pass the x-auth-token in the Request Headers.
-
This step can be skipped if the Client / Folder UUID is already stored locally.
-
-
Generate a Refresh Token for the Client / Folder (Organization Admin / Owner users must skip this step).
-
Pass the Refresh Token from Step 3 in the Request Headers with the Organization and Client UUID’s.
12345{‘x-auth-token’ : ‘Bearer ‘ + refreshToken,‘organizationUuid’ : ‘string’,‘clientUuid’ : ‘string’} -
Returns the Refresh Token as the Response Header x-auth-token.
-
Once Authenticated, you will need to make a request to retrieve the UUID of the Product(s) you wish to download a file for. If you have the UUID stored locally, this step can be skipped. For more information on how to search for Products on the Platform, view this guide.
Use this endpoint to search for a Product to retrieve its UUID.
Next, you will also need to retrieve the clientUuid if you don’t already have it. You can use the following endpoint to retrieve a list of Clients / Folders and pull the correct uuid. Note: If you have a Webhook configured to notify you of a product.completed event, meaning it has finished Optimization and is ready to be downloaded, the clientUuid will be passed in the payload sent by the Webhook.
The Request structure is as follows:
The Response structure is as follows:
With the Product UUID(s) in hand, you can call one of the following endpoints to download the asset:
The difference between the two is in the endpoint URL, for the original asset you pass ‘asset’ in the URL and for the optimized you pass ‘model’ as well as a query parameter for the format (GLB, FBX, or USDZ). The data from the endpoint will need to be streamed into a file and unlike other endpoints that return the data in the Response Body, the entire Response content will simply be the data that needs to be streamed into a file.
Downloading Model via Public API
You can also leverage the Public API to download the Optimized versions of your Products, as well as the Original. The endpoint will require 4 parameters:
- productUuid: The UUID of the Product to download the Optimized assets of.
- blobId: The UUID of the converted asset, unique for each format (GLB, FBX, or USDZ).
- organizationSlug: Unique name-based identifier for the Organization.
- clientSlug: Unique name-based identifier for the Client / Folder.
The clientSlug and organizationSlug are based on the names of the Client / Folder and Organization. On the VNTANA Platform, Organization and Client / Folder names need not be unique, instead a slug is generated based on the name which is unique. These can be found in the URL of the Client / Folder or Organization in question. For example: https://platform.vntana.com/some-org-slug/some-client-slug.
The productUuid can be retrieved using the following Public endpoint:
Note: The base URL of the Public API is different than that of the Admin API.
There are a few different options to filter the results of the search, but only page and size are actually required. This will return the productUuid in the Response body, as well as each formats blobId:
The blobId is the parameter modelBlobId found in response > grid > asset > models for each conversion format, whereas it’ll be assetBlobId found just in response > grid > asset. With all the necessary parameters, the model can be downloaded using the following endpoint:
Postman Collection
To test these endpoints download the below Postman collections, containing examples for both the Public and Admin API processes. To use these collections, simply set the necessary global variables and run the collection as a whole, selecting which endpoints to make use of. If you wish to run each endpoint individually, simply activate the deactivated headers and ensure each endpoint has the necessary data (whether from global variables or directly entered into their endpoint specific locations). You can view our general Postman guide here.