API Base URL: https://api-platform.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.
With the release of the new VNTANA Viewer, additional functionality was added to simplify the process of editing and applying viewer settings to all of your assets. Presets can be created and applied at creation to ensure each asset automatically has the correct viewer settings without the need to revisit once Optimization is complete. Additionally, these presets can be saved on multiple levels to reach all assets or just a certain collection: System/Global level, Organization level, and Workspace level.
Creating a Viewer Preset
To create a viewer preset, you simply pass the stringified JSON object of viewer settings and indicate what type of preset it is. Use the following endpoint to create a preset:
- type: [Required] Indicates the level of access for the preset. Can be ORGANIZATION or CLIENT. Passing CLIENT will change the requirements of the endpoint, see below for an example of the difference.
- name: [Required] Provides a name for the preset for easy identification on the Platform.
- isDefault: [Required] Indicates whether the preset should be set as the default preset for the type that it is.
- For example, if it is a CLIENT preset, making it the default will mean that all assets in the designated Workspace will have this preset by default.
- value: [Required] Stringified JSON object of the viewer settings making up the preset. See below for an example of the full object.
A successful preset creation will return the following response:
Updating a Preset
Similar to updating an Asset or a Project, you can update a Viewer Preset so long as you have the presetUuid. Additionally, when updating a preset you can opt to have it apply the changes to every Product that is currently using the preset.
To update a Preset, you can call the following endpoint:
When updating, you do not need the type parameter, nor clientUuid in the case of a CLIENT preset as the uuid parameter carries this information with it. The updateProducts parameter indicates whether or not to apply the new values in the preset to any Products currently using this preset.
Retrieving Preset Information
There are a number of methods to retrieve a presets information, by its uuid, searching within an organization, searching within a Workspace, or getting just the default of a specific Workspace. To begin, lets look at retrieving by the uuid.
This endpoint is a straightforward GET request with the uuid passed in the URL.
A successful request will return the following data:
The key parameter in the response is the value parameter. This is the stringified version of the viewer settings which can be parsed into a JSON object and updated if needed.
While retrieving by uuid is always the simplest solution, the requirement that you already have the uuid means it isn’t always going to be an option. To find the uuid or other information you can employ a number of additional search endpoints. To begin, a simple search request for viewer presets would look like the following:
-
page: [REQUIRED] Indicates the page of results to return, with 0 representing the first page.
-
size: [REQUIRED] Indicates the number of results to be included in each page.
-
type: [OPTIONAL] Indicates the type with possible values being:
SYSTEM, ORGANIZATION, CLIENT. -
clientUuid: [OPTIONAL] Required if
typeisCLIENT, indicates the Workspace to search. -
nameSearchTerm: [OPTIONAL] A search term to filter results by, only checks against the name of the Presets.
value parameter which contains the actual viewer settings. One thing to note is that the request parameters act to filter the response, however a fuzzy search is employed meaning results are returned based on relevancy. This means the results will still include presets of the other types than what was passed, however the type that is passed will be returned first. Get All Presets in Organization / Workspace
For a quick method to retrieve all presets in an Organization, the following endpoint can be called:
clientUuid as a query param: Get Workspace Default
clientUuid passed as a query parameter: