Get shared model
Get shared models. You can get the model url from 3D Portal using 'Copy link' -feature. This is a protected endpoint and user must provide Tenent Access token in either URL query-parameter or as a HTTP-header.
URL : /cdn/models/...
Headers : authorization: Bearer [TOKEN]
OR
URL : /cdn/models/...?token=[TOKEN]
Method : GET
Auth required : YES
Permissions required : YES: Token's audience must match with the requested model
Success Responses
Condition : token is valid and it is allowed to access the model.
Code : 200 OK
Content : Model data
Error Responses
Condition : Token is not valid.
- Code : - 401 Authorized
- Content : Reason 
Condition : Model not found.
- Code : - 404 Not Found
- Content : Reason 
Validate token
This endpoint enabled user to check if token is valid.
URL : /cdn/auth
Headers : authorization: Bearer [TOKEN]
OR
URL : /cdn/auth?token=[TOKEN]
Method : GET
Auth required : YES
Success Responses
Condition : Token is valid
Code : 200 OK
Content :
{
  "iat": 1605873391,
  "exp": 1637409388,
  "aud": "common,1234567890",
  "iss": "http://localhost:3000",
  "sub": "1234567890"
}
Error Responses
Condition : Token is not valid.
Code : 401 Authorized
Content : Reason
List models
This endpoint allows user to see models given token is allowed to access
URL : /cdn/models
Headers : authorization: Bearer [TOKEN]
OR
URL : /cdn/auth?token=[TOKEN]
Method : GET
Auth required : YES
Success Responses
Condition : Token is valid
Code : 200 OK
Content :
{
  {
    "6463b52e-a7fb-48e6-835f-c2d631aa36d0": {
      "models": []
  },
  {
    "common": {
      "models": [
        {
        "name": "Conveyor_Sanitary",
        "variant": "default",
        "lastModified": 1604316535,
        "lastDeployed": null,
        "isAsset": true,
        "friendlyName": "Conveyor Sanitary",
        "latestVersion": 0,
        "categories": "Conveyors/Sanitary",
        "thumbnailUrl": "/common/Conveyor_Sanitary/default/0/thumbnail.png",
        "modelUrl": "/common/Conveyor_Sanitary/default/0/Conveyor_Sanitary.babylon",
        "versions": [
          {
            "version": 0,
            "lastModified": 1604316535,
            "lastDeployed": null,
            "isAsset": true,
            "friendlyName": "Conveyor Sanitary",
            "categories": "Conveyors/Sanitary",
            "thumbnailUrl": "/common/Conveyor_Sanitary/default/0/thumbnail.png",
            "modelUrl": "/common/Conveyor_Sanitary/default/0/Conveyor_Sanitary.babylon"
          }
        ]
      },        
      ]
  },
}
Error Responses
Condition : Token is not valid.
Code : 401 Authorized
Content : Reason