paramate REST API

Endpoints

All endpoints take parameters as Content-Type: application/json encoded data unless mentioned otherwise.


Configurator Admin API

POST /configurators

Creates a new configurator for the current user or the user specified by the userId when called by an admin.

Requires

  • User Token

Parameters

Configurator to be created

Example
{
    "name": "Test",
    "mainFile": "main.sps",
    "private": "true,
    "cadType": "trcad",
    "cadVersion": "1.0",
    "rendererType": "mview",
    "rendererVersion": "1.0"
}

Returns

Newly created configurator

Example
{
    "name": "Test",
    "UUID": "627fe099-cb40-41c8-831c-fbb28c07b4db",
    "mainFile": "main.sps",
    "private": "true,
    "cadType": "trcad",
    "cadVersion": "1.0",
    "rendererType": "mview",
    "rendererVersion": "1.0"
}

PUT /configurators/{UUID}

Updates an existing configurator with the given UUID.

Requires

  • User Token for the owner of the configurator with the given UUID

Parameters

New values for the configurator.

Example
{
    "mainFile": "main_new.sps",
    "cadVersion": "1.1"
}

Returns

Configurator with updated values

Example
{
    "name": "Test",
    "mainFile": "main_new.sps",
    "cadType": "trcad",
    "cadVersion": "1.1",
    "rendererType": "mview",
    "rendererVersion": "1.0"
}

GET /configurators/{UUID}

Returns the configurator with the given UUID.

Requires

  • User Token for the owner of the configurator with the given UUID

Parameters

None

Returns

The requested configurator

Example
{
    "name": "Test",
    "mainFile": "main_new.sps",
    "cadType": "trcad",
    "cadVersion": "1.1",
    "rendererType": "mview",
    "rendererVersion": "1.0"
}

GET /configurators/{UUID}/applications

Returns the applications registered to the configurator with the given UUID.

Requires

  • User Token for the owner of the configurator with the given UUID

Parameters

None

Returns

List of applications registered to the configurator.

Example
[
    "367914e5-b0b9-4755-8e32-4f883be60c0b"
]

GET configurators/{UUID}/applications/{UUID}

Returns the application with the given UUID.

Requires

  • User Token for the owner of the configurator with the given UUID

Parameters

None

Returns

The requested application information

Example
{
    "UUID": "b84cfedb-1ef0-4972-9b45-eb02bf2f77d4",
    "domain": "www.trinckle.com",
    "key": "441c531457cf7d2146d52c0c4ba54e0b",
    "secretKey": "91937865a60ba661ddd24370fb8560cc",
    "licenseUUID": "b84cfedb-1ef0-4972-9b45-eb02bf2f77d4",
    "configuratorUUID": "1ec1cd1e-215a-46c4-949a-16d9c49482a7",
    "secureInit": false,
    "secureModel": false
}

POST configurators/{UUID}/applications

Creates a new application registration to the configurator with the given UUID.

Requires

  • User Token for the owner of the configurator with the given UUID

Parameters

The application parameters

{
    "domain": "www.trinckle.com",
    "licenseUUID": "b84cfedb-1ef0-4972-9b45-eb02bf2f77d4",
    "secureInit": false,
    "secureModel": false
}

Returns

The requested application information

Example
{
    "UUID": "b84cfedb-1ef0-4972-9b45-eb02bf2f77d4",
    "domain": "www.trinckle.com",
    "key": "441c531457cf7d2146d52c0c4ba54e0b",
    "secretKey": "91937865a60ba661ddd24370fb8560cc",
    "licenseUUID": "b84cfedb-1ef0-4972-9b45-eb02bf2f77d4",
    "configuratorUUID": "1ec1cd1e-215a-46c4-949a-16d9c49482a7",
    "secureInit": false,
    "secureModel": false
}

DELETE configurators/{UUID}/applications/{UUID}

Deletes the application with the given UUID.

Requires

  • User Token for the owner of the configurator with the given UUID

Parameters

None

Returns

Nothing


PUT /configurators/{UUID}/files/{type}/{fileWithPath}

Upload a file to path {fileWithPath} to the configurator with id {UUID} in the {type} section where {type} can be configurator or renderer

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

None

Returns

The file information

Example
{
    "token": "ETag": "\"d6a8d38967fe7439d763843674223409\""
}

GET /configurators/{UUID}/files/{type}/{fileWithPath}

Return the file {fileWithPath} from the configurator with id {UUID} in the {type} section where {type} can be configurator or renderer

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

None

Returns

The file


DELETE /configurators/{UUID}/files/{type}/{fileWithPath}

Delete the file {fileWithPath} from the configurator with id {UUID} in the {type} section where {type} can be configurator or renderer

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

None

Returns

Nothing


License API

GET /licenses/{UUID}

Returns the license with the given UUID.

Requires

  • User Token for the owner of the configurator with the given UUID

Parameters

None

Returns

The requested license

Example
{
    "UUID": "b84cfedb-1ef0-4972-9b45-eb02bf2f77d4",
    "type": "free",
    "numKeys": "3",
    "createdAt": "2018-01-18T18:38:54.000Z"
}

Token API

GET /tokens/user

Requests a new user token.

Requires

  • Basic Auth authentication of the user

Parameters

None

Returns

A token that identifies the user and the user's UUID.

Example
{
    "token": "eyJhbGciOiJIUzI1N ... _zjtxYWKsiwYctvNNU",
    "userUUID": "dbab7dc0-a911-4497-8a65-3a6e1dd777d8"
}

GET /tokens/anonymous

Requests a new anonymous token.

Requires

  • API Key of the owner of the configurator

Parameters

None

Returns

A token that identifies the anonymous user.

Example
{
    "token": "eyJhbGciOiJIUzI1NiI ... fGdWOZiTKJSgARMFvvJ8"
}

User Admin API

POST /users

Creates a new user

Requires

  • User Token for admin user

Parameters

User to be created

Example
{
    "userName":"Test User",
    "password":"hunter2"
}

Returns

Basic info of newly created user

Example
{
    "userName": "Test User",
    "UUID": "305bdb5c-cf8f-4256-9180-fe050d119f03"
}

GET /users/{UUID}

Retrieves the user info of the user with the given UUID

Requires

  • User token for the user with the given UUID or admin user

Parameters

None

Returns

Information about the user.

Example
{
    "userName": "Test User",
    "UUID": "305bdb5c-cf8f-4256-9180-fe050d119f03",
    "apiKey": "fe70544fd9ddb427149cd1ffda3db67f",
    "apiSecret": "7032987b6c60d2bb9eee8050eb8a8bf095d80ec0af581b0a26b45be786259ea8"
}

GET /users/{UUID}/configurators

Retrieves the list of configurators of the user with the given UUID

Requires

  • User token for the user with the given UUID or admin user

Parameters

None

Returns

List of configurators owned by the user.

Example
[
    "d562627c-4224-4cc4-9e62-2419933e6960",
    "4300ee92-3645-449b-beda-bf886f6abcaa",
    "f4b5f2a8-e9e0-442f-baf4-e01900abebda",
    "832fef63-7318-411f-9cf5-c3f6cd7b58ae",
    "0c3e48fa-40ec-46ea-957e-c6bfaaf5bf97",
    "f8f88e4a-e9c2-40ce-8b0d-2c5f8086550a",
    "627fe099-cb40-41c8-831c-fbb28c07b4db"
]

GET /users/{UUID}/licenses

Retrieves the list of licenses of the user with the given UUID

Requires

  • User token for the user with the given UUID or admin user

Parameters

None

Returns

List of licenses owned by the user.

Example
[
    "d562627c-4224-4cc4-9e62-2419933e6960",
    "4300ee92-3645-449b-beda-bf886f6abcaa"
]

Configurator Sessions API

POST /configSessions

Creates a new configurator session

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

The ID of the configurator

Example
{
    "configuratorId": "627fe099-cb40-41c8-831c-fbb28c07b4db"
}

Returns

The ID of the created configurator session. 2 resource keys (renderingKey and modelKey) for resource authentication. List of associated rendering sessions

Example
{
    "id": "305bdb5c-cf8f-4256-9180-fe050d119f03",
    "renderingKey": "eyJhbGciOiJIUzI1NiI ... fGdWOZiTKJSgARMFvvJ8",
    "modelKey": "eyJhbGciOiJIUzI1NiI ... fGdWOZiTKJSgARMFvvJ8",
    "renderSessions":
    [
        {
            "rendererType": "mview",
            "sessionId": "6cfa2943-59b3-4d29-9a42-df601bdb4c8e"
        }
    ]
}

GET /configSessions/{id}/parameters

Get the parameters of the thing in the session with id {id}

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Returns

Parameters of the session with the id {id}

Example
{
    "diameter": {
        "name": "Diameter",
        "min": 10.0,
        "default": 26.0,
        "max": 30.0,
        "value": 26.0,
        "unit": "mm"
    },
    "bladePitch": {
        "name": "Blade Pitch",
        "min": 0.0,
        "default": 30.0,
        "max": 45.0,
        "value": 30.0,
        "unit": "deg"
    }
}
Info

The attributes of a parameter can vary by CAD tool or even by parameter type. Some attributes are always present, these are the following:

  • name
  • type
  • descr
  • default
  • value

For parameters of type "array" there is another important attribute, called "elementType".

The value is an actual JSON value of the type of the parameters in the case of the primitive types (int, float, string, array)


PUT /configSessions/{id}/parameters

Update the parameter values of the session with the id {id}.

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

Parameter array with updated value fields. Readonly fields are optional and ignored.

Example
{
    "diameter": {
        "value": 26.0
    },
    "bladePitch": {
        "value": 30.0
    }
}

Returns

Parameters of the session with the id {id} (see at parameters GET)


GET /configSessions/{id}/model?type={type}&res={resolution}

Return the generated model of the session with the id {id}

Requires

  • modelKey when not using token authentication

Parameters

  • type - File type (STL, 3mf, mfile, etc)
  • res - Resolution of the triangulation

Returns

The generated model


GET /configSessions/{id}/finalizedmodel?type={type}&res={resolution}

Return the generated finalized model of the session with the id {id}

Requires

  • modelKey when not using token authentication

Parameters

  • type - File type (STL, 3mf, mfile, etc)
  • res - Resolution of the triangulation

Returns

The generated finalized model


GET /configSessions/{id}/objectinfo

Gets size information of the model in the session with id {id}

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Returns

size information of the model with the id {id}

Example
{
    "volume": 120.5,
    "boundingBox": 
        {
        "minX": -2,
        "maxX":  2,
        "minY": -2,
        "maxY":  2,
        "minZ": -2,
        "maxZ":  2
    }
}

POST /configSessions/{id}/files

Upload a file to the config session with id {id}

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

None

Returns

The file ID

Example
{
    "token": "bnVsbAsD"
}

PUT /configSessions/{id}/files/{fileId}

Upload a file with {fileId} to the config session with id {id}

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

None

Returns

The file ID

Example
{
    "token": "bnVsbAsD"
}

GET /configSessions/{id}/files

Return a list of uploaded files from the config session with id {id}

Requires

  • Anonymous Token
  • X-API-KEY

Parameters

None

Returns

The list of files

Example
[
    {
        "name": "bnVsbAsD"
        "ext": "stl"
        "contentType": "application/sla"
    }
]

GET /configSessions/{id}/files/{fileId}

Return the uploaded file with {fileId} from the config session with id {id}

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

None

Returns

The file


DELETE /configSessions/{id}/files/{fileId}

Delete the uploaded file with {fileId} from the config session with id {id}

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

None

Returns

Nothing


GET /configSessions/{id}/renderers/{renderSessionId}/scene

Gets the scene information of the renderer in the config session with id {id} and renderer session with id {renderSessionId}

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Returns

scene information of the renderer in the config session with id {id} and renderer session with id {renderSessionId}

Example
{
    "camera":
    {
        "aperture": 25,
        "focus":  [-49.57725, -143.041438, 420.42104],
        "origin": [38.75818, -0.47438, -6.788354],
        "right":  [0.98098, -0.08491, 0.17450],
        "top":    [0.02483, 0.94672, 0.32107],
        "view":   [0.19247, 0.31063, -0.93083]
    }
}

GET /configSessions/{id}/renderers/{renderSessionId}/model

Return the model for visualization from the renderer in the config session with id {id} and renderer session with id {renderSessionId}

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

None

Returns

The model for visualization


GET /configSessions/{id}/renderers/{renderSessionId}/files/{fileWithPath}

Return a file for visualization from the renderer in the config session with id {id} and renderer session with id {renderSessionId}

Requires

  • Anonymous Token
  • X-API-KEY
  • X-API-SECRET for private configurators

Parameters

None

Returns

The file


GET /configSessions/{id}/renderers/{renderSessionId}/image?type={type}&w={width}&h={height}&px={posX}&py={posY}&pz={posZ}&vx={viewX}&vy={viewY}&vz={viewZ}&tx={topX}&ty={topY}&tz={topZ}&rx={rightX}&ry={rightY}&rz={rightZ}&a={aperture}&s={scale}

Returns the rendered image in {ext} format of the model of the session with the id {id}

Requires

  • renderingKey when not using token authentication

Parameters

  • type - File type (supported: png)
  • w - width of the image
  • h - height of the image
  • px - camera position X
  • py - camera position Y
  • pz - camera position Z
  • vx - camera view X
  • vy - camera view Y
  • vz - camera view Z
  • tx - camera top X
  • ty - camera top Y
  • tz - camera top Z
  • rx - camera right X
  • ry - camera right Y
  • rz - camera right Z
  • a - camera min aperture
  • s - scale (distance of the camera from the "look at" point)

Returns

The image


GET /configSessions/{id}/save

Return a zipped folder of the uploaded files and the parameters in the config session with id {id}

Requires

  • Anonymous Token
  • X-API-KEY

Parameters

None

Returns

The backup zip file


PUT /configSessions/{id}/restore

Restore a config session from a zipped file into the config session with id {id}

Requires

  • Anonymous Token
  • X-API-KEY

Parameters

The file as content of the request

Returns

The backup zip file