Skip to content

File API

Behavior

Create a Behavior

Parameter /file/behavior/:file

Name Type Description
file String File id

POST /file/behavior/:file

Name Type Description
name String Name of the Behavior
search String SmartShapeQL query that determines which nodes are affected by this Behavior
modifiers [Object] Modifiers to apply to the nodes that match the search query
enabledByDefault Boolean optional Specify whether or not the behavior must be enabled on newly created configurations
readPermissions String[] optional Permissions required to read this Behavior
writePermissions String[] optional Permissions required to enable or disable this Behavior from a Configuration
order Number optional Value used to sort Behaviors when listed
folders String[] optional Ids of folders to put this Behavior in
Example usage:
curl -X POST -H 'Authorization: Bearer <auth_token>' -H 'Content-Type: application/json' --data '{ "name": "Transparent cubes", "search": "cubes", "modifiers":[{"type":"transparent","details":{"enabled":true}}]}' 'https://smartshape.io/file/behavior/587ca29dd564001b7cfc1196'
Behavior example: Add an icon in the Scene tree to nodes that have a “status” attribute equal to “complete”.
{
    "name": "Add icon to complete objects",
    "search": "@\"status\"=\"complete\"",
    "enabledByDefault": true,
    "modifiers": [
        {
            "type": "icon",
            "details": {
                "colorId": 2,
                "code": "wifi-strength-4",
                "enabled": true
            }
        }
    ]
}
Success-Response:
HTTP/1.1 200 OK
"58a492d6a20f5c201009750e"

Success 200

Name Type Description
id String New Behavior id

Delete a Behavior

Parameter /file/behavior/:file/:behavior

Name Type Description
file String File id
behavior String Behavior id
Example usage:
curl -X DELETE -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/behavior/587ca29dd564001b7cfc1196/58a492d6a20f5c201009750e/'
Success-Response:
HTTP/1.1 200 OK
{
  "success": true
}

Success 200

Name Type Description
success Bool

List behaviors

Parameter /file/behavior/:file

Name Type Description
file String File id
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/behavior/587ca29dd564001b7cfc1196/'
Success-Response:
HTTP/1.1 200 OK
{
    [{
        "file":"596e2c99669d9a289f58beae",
        "name":"Transparent cubes",
        "search":"cubes",
        "modifiers":[{"type":"transparent","details":{"enabled":true}}],
        "id":"596e46506baa363cb440805f"
    }]
}

Success 200

Name Type Description
data Object Behavior list

Configuration

Add or update a modifier

Add or update a modifier.

Parameter /file/configuration/modifier/:file/:configuration

Name Type Description
file String File id
configuration String Configuration id

PUT /file/configuration/modifier/:file/:configuration

Name Type Description
data [Object] Array of one or more modifiers to add
data.0.type String Determines the type of the modifier.
Possible values:
- hidden: Hides the node in the 3D view.
- color: Colors the node in the 3D view according to the color index in data.details.colorId.
- transparent: Makes the node transparent in the 3D view.
- lock: Makes the node impossible to either select, annotate or quote in the 3D view according to the values stored in data.details.lockedActions.
- highlighted: Highlights the node in the 3D view according to the color index in data.details.colorId.
- icon: Shows an icon next to the node's name in the Scene tree. The icon is defined by data.details.code. This type is only available when the modifier is applied by a Behavior, and not when using the current endpoint.
data.0.node String Id of the node the modifier applies to
data.0.details Object Details of the modifier
data.0.details.enabled Boolean optional Whether or not the modifier is enabled
Default value: true
data.0.details.colorId Number optional Index in the color palette of the color to apply to the node
data.0.details.code String optional Name of the icon to show in the Scene tree. The list of available icons is here: http://materialdesignicons.com/cdn/3.8.95/. The mdi- prefix is automatically added and should not be specified here
data.0.details.lockedActions [String] optional Actions locked by lock modifiers.
Possible values:
- select: Prevents the node from being selected.
- annotate: Prevents annotations from being put on the node.
- quote: Prevents quotations from being put on the node.
Modifier that locks the node to prevent users from interacting with it:
{
    "type": "lock",
    "node": "58a1c90277449a1d2569f3fc",
    "details": {
        "enabled": true,
        "lockedActions": ["select", "annotate", "quote"]
    }
}
Modifier that colors the node using the color at index 3 in the color palette.
{
    "type": "color",
    "node": "58a1c90277449a1d2569f3fc",
    "details": {
        "enabled": true,
        "colorId": 3
    }
}
Example usage:
curl -X PUT 'https://smartshape.io/file/configuration/modifier/600aa6b7aca16a05a62b9758/600aa77daca16a05a62b982d' \
    -H 'Authorization: Bearer <auth_token>' \
    -H 'Content-Type: application/json' \
    -d '{
        "data": [
            {
                "type": "transparent",
                "node": "600aa6b804238a16a6934f26",
                "details": {
                    "code": "mdi-alarm",
                    "enabled": true,
                    "colorId": 2
                }
            }
        ]
    }'
Success-Response:
HTTP/1.1 200 OK
{
    "success": true,
    "data": {
        "_id": "600aa77daca16a05a62b982d",
        "file": "600aa6b7aca16a05a62b9758",
        "date": 1611310973457,
        "lastModificationDate": 1611311819111,
        "writePermissions": [],
        "readPermissions": [],
        "quotationsEnabled": false,
        "enabledQuotations": [],
        "clippingPlanesEnabled": false,
        "enabledClippingPlanes": [],
        "collaborativeSelectionEnabled": true,
        "collaborativeAvatarsEnabled": true,
        "collaborationEnabled": true,
        "autosaveCameraPosition": false,
        "selectedNodes": [
            "600aa6b804238a16a6934f26"
        ],
        "sceneTree": 0,
        "rememberSelection": false,
        "sceneEnabled": false,
        "modifiers": [
            {
                "node": "600aa6b804238a16a6934f26",
                "details": {
                    "code": "mdi-alarm",
                    "colorId": 2,
                    "enabled": true,
                    "lockedActions": [
                        "select",
                        "annotate",
                        "quote"
                    ],
                    "id": null
                },
                "_id": "600aaacbaca16a05a62b9f78",
                "type": "transparent",
                "nodeName": "cube_blue_01",
                "depth": 5,
                "nodeName": "SOLID"
            }
        ],
        "modifiersEnabled": true,
        "activeOnStart": false,
        "cameraFoVIndex": 0,
        "zNear": 0.1,
        "upVector": "Y+",
        "iblEnabled": true,
        "skyboxEnabled": true,
        "environmentEnabled": true,
        "explodedViewEnabled": false,
        "explodedViewDistance": 0,
        "transparencyEffectParameters": {
            "alphaCoefficient": 0,
            "_id": "600aa77daca16a05a62b982c"
        },
        "enabledEffects": [],
        "enabledBehaviors": [],
        "behaviorsEnabled": true,
        "enabledLayers": [],
        "layersEnabled": true,
        "environmentOrientation": 0,
        "environmentBrightness": 1,
        "environmentFile": null,
        "cameraType": null,
        "cameraPosition": [],
        "disableCamera": true,
        "lockedBy": null,
        "lastActivationDate": "2021-01-22T10:36:07.320Z",
        "lastModificationAuthor": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
        "author": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
        "name": "My configuration",
        "id": "600aa77daca16a05a62b982d"
    }
}

Success 200

Name Type Description
success Bool
data Object Updated configuration
data._id ObjectId The configuration id
data.date number The configuration creation date
data.writePermissions [String] The permissions to write in the configuration
data.readPermissions [String] The permissions to read the configuration
data.quotationEnabled boolean Enable the quotation feature
data.enabledQuotations [String] The quotations enabled by the configuration
data.clippingPlanesEnabled boolean Enable the clippingPlane feature
data.enabledClippingPlanes [String] The clippingPlanes enabled by the configuration
data.collaborativeSelectionEnabled boolean Enable the collaborative selection feature
data.collaborativeAvatarsEnabled boolean Enable the collaborative avatars feature
data.collaborationEnabled boolean Enable the collaboration features feature
data.autosaveCameraPosition boolean Automatically save the position of the camera
data.selectedNodes [ObjectId] The list of selected Nodes
data.sceneTree number The index of the default Scene Tree
data.rememberSelection boolean Remember the selection when re-opening the file
data.sceneEnabled boolean Enable the scene features feature
data.modifierPriority String One of ["highest", "lowest", "oldest", "latest"]
data.modifiers [Modifiers] The list of modifiers
data.modifiers.created Number Modifier creation time
data.modifiers.updated Number Modifier creation or last update time
data.modifiers.type String One of ['hidden', 'color', 'transparent', 'lock', 'icon', 'highlighted']
data.modifiers.node ObjectId The node to which the modifier applies
data.modifiers.depth Number The max depth of the node of the modifier
data.modifiers.nodeName string The name of the node of the modifier
data.modifiers.details ModifierDetails The details of the modifier
data.modifiers.details.enabled boolean Enable the modifier
data.modifiers.details.colorId number Used by color modifiers
data.modifiers.details.code String Used by icon modifiers
data.modifiers.details.lockActions number Used by lock modifiers
data.modifiersEnabled boolean Enable the modifiers feature
data.activeOnStart boolean Make the configuration active when opening a file
data.cameraFoVIndex number Index of the Camera field of view
data.zNear number Nearest distance from the camera at which 3D objects are rendered to the screen
data.upVector String Which vector is "up" in the 3D view. One of X+, X-, Y+, Y-, Z+ or Z-
data.iblEnabled boolean Enable the "Environment lighting" feature: the light of the skybox reflects on the model, giving the scene a more realistic look
data.skyboxEnabled boolean Enable the skybox feature: which is the image shown in the background of the scene
data.environmentEnabled boolean Enable the environment features feature
data.explodedViewEnabled boolean Enable the exploded view feature
data.explodedViewDistance number The distance of the exploded view
data.transparencyEffectParameters TransparencyEffectParameters Parameters of the Transparency effect
data.transparencyEffectParameters.transparencyIntensityIndex number An index between 0 and 2 that describes the intensity of the transparency.
data.enabledEffects [String] The effects enabled
data.enabledBehaviors [ObjectId] The list of enabled behaviors
data.behaviorsEnabled boolean Enable the behaviors feature
data.enabledLayers [ObjectId] The enabled layers
data.layersEnabled boolean Enable the layers feature
data.environmentOrientation number Orientation of the skybox in degrees
data.environmentBrightness number Brightness of the environment light. 1 is the nominal value
data.environmentFile String Path to the file representing the skybox. Available skybox files are described in the server settings at "lights settings"."image based light"."sources"
data.cameraType String Type of camera used by the user to navigate in the 3D scene. Available types are: third person,first person,physics FPS`
data.cameraPosition [number] A list of 6 numbers. The first 3 numbers are the camera's position and the last 3 numbers are the camera's lookAt
data.disableCamera boolean Enable the camera feature
data.lockedBy ObjectId optional The user who locked the configuration
data.lastActivationDate number The last time the configuration was activated
data.lastModificationAuthor.id boolean Id of the last Account to have modified the configuration
data.lastModificationAuthor.username boolean Username of the last Account to have modified the configuration
data.author.id String Id of the author of the configuration
data.author.username String Username of the author of the configuration
data.name String The configuration name
data.id ObjectId The id of the configuration

Create a new configuration

Parameter /file/configuration/:file

Name Type Description
file String File id

POST /file/configuration/:file

Name Type Description
name String New configuration name
Example usage:
curl -X POST https://smartshape.io/file/configuration/6005abef8b285b05c358faa6 \
  -H 'Authorization: Bearer <auth_token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My configuration",
  }'
Success-Response:
HTTP/1.1 200 OK
{
     "success": true,
     "data": {
         "file": "6005abef8b285b05c358faa6",
         "date": 1611239293136,
         "_id": "60098f7dfedf4005c43c53ff",
         "writePermissions": [],
         "readPermissions": [],
         "quotationsEnabled": false,
         "enabledQuotations": [],
         "clippingPlanesEnabled": false,
         "enabledClippingPlanes": [],
         "collaborativeSelectionEnabled": true,
         "collaborativeAvatarsEnabled": true,
         "collaborationEnabled": true,
         "autosaveCameraPosition": false,
         "selectedNodes": [],
         "sceneTree": 0,
         "rememberSelection": false,
         "sceneEnabled": false,
         "modifiers": [],
         "modifiersEnabled": false,
         "activeOnStart": false,
         "cameraFoVIndex": 0,
         "zNear": 0.1,
         "upVector": "Y+",
         "iblEnabled": true,
         "skyboxEnabled": true,
         "environmentEnabled": true,
         "explodedViewEnabled": false,
         "explodedViewDistance": null,
         "transparencyEffectParameters": {
             "transparencyIntensityIndex": 0,
             "_id": "60098f7dfedf4005c43c53fe"
         },
         "enabledEffects": [],
         "enabledBehaviors": [],
         "behaviorsEnabled": true,
         "enabledLayers": [],
         "layersEnabled": true,
         "environmentOrientation": 0,
         "environmentBrightness": 1,
         "environmentFile": null,
         "cameraType": null,
         "cameraPosition": [],
         "disableCamera": true,
         "lockedBy": null,
         "lastActivationDate": "1970-01-01T00:00:00.000Z",
         "lastModificationAuthor": null,
         "author": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
         "name": "My configuration",
         "id": "60098f7dfedf4005c43c53ff"
     }
 }

Success 200

Name Type Description
success Bool
data Object Newly created configuration
data._id ObjectId The configuration id
data.date number The configuration creation date
data.writePermissions [String] The permissions to write in the configuration
data.readPermissions [String] The permissions to read the configuration
data.quotationEnabled boolean Enable the quotation feature
data.enabledQuotations [String] The quotations enabled by the configuration
data.clippingPlanesEnabled boolean Enable the clippingPlane feature
data.enabledClippingPlanes [String] The clippingPlanes enabled by the configuration
data.collaborativeSelectionEnabled boolean Enable the collaborative selection feature
data.collaborativeAvatarsEnabled boolean Enable the collaborative avatars feature
data.collaborationEnabled boolean Enable the collaboration features feature
data.autosaveCameraPosition boolean Automatically save the position of the camera
data.selectedNodes [ObjectId] The list of selected Nodes
data.sceneTree number The index of the default Scene Tree
data.rememberSelection boolean Remember the selection when re-opening the file
data.sceneEnabled boolean Enable the scene features feature
data.modifierPriority String One of ["highest", "lowest", "oldest", "latest"]
data.modifiers [Modifiers] The list of modifiers
data.modifiers.created Number Modifier creation time
data.modifiers.updated Number Modifier creation or last update time
data.modifiers.type String One of ['hidden', 'color', 'transparent', 'lock', 'icon', 'highlighted']
data.modifiers.node ObjectId The node to which the modifier applies
data.modifiers.depth Number The max depth of the node of the modifier
data.modifiers.nodeName string The name of the node of the modifier
data.modifiers.details ModifierDetails The details of the modifier
data.modifiers.details.enabled boolean Enable the modifier
data.modifiers.details.colorId number Used by color modifiers
data.modifiers.details.code String Used by icon modifiers
data.modifiers.details.lockActions number Used by lock modifiers
data.modifiersEnabled boolean Enable the modifiers feature
data.activeOnStart boolean Make the configuration active when opening a file
data.cameraFoVIndex number Index of the Camera field of view
data.zNear number Nearest distance from the camera at which 3D objects are rendered to the screen
data.upVector String Which vector is "up" in the 3D view. One of X+, X-, Y+, Y-, Z+ or Z-
data.iblEnabled boolean Enable the "Environment lighting" feature: the light of the skybox reflects on the model, giving the scene a more realistic look
data.skyboxEnabled boolean Enable the skybox feature: which is the image shown in the background of the scene
data.environmentEnabled boolean Enable the environement features feature
data.explodedViewEnabled boolean Enable the exploded view feature
data.explodedViewDistance number The distance of the exploded view
data.transparencyEffectParameters TransparencyEffectParameters Parameters of the Transparency effect
data.transparencyEffectParameters.transparencyIntensityIndex number An index between 0 and 2 that describes the intensity of the transparency.
data.enabledEffects [String] The effects enabled
data.enabledBehaviors [ObjectId] The list of enabled behaviors
data.behaviorsEnabled boolean Enable the behaviors feature
data.enabledLayers [ObjectId] The enabled layers
data.layersEnabled boolean Enable the layers feature
data.environmentOrientation number Orientation of the skybox in degrees
data.environmentBrightness number Brightness of the environment light. 1 is the nominal value
data.environmentFile String Path to the file representing the skybox. Available skybox files are described in the server settings at "lights settings"."image based light"."sources"
data.cameraType String Type of camera used by the user to navigate in the 3D scene. Available types are: third person,first person,physics FPS`
data.cameraPosition [number] A list of 6 numbers. The first 3 numbers are the camera's position and the last 3 numbers are the camera's lookAt
data.disableCamera boolean Enable the camera feature
data.lockedBy ObjectId optional The user who locked the configuration
data.lastActivationDate number The last time the configuration was activated
data.lastModificationAuthor.id boolean Id of the last Account to have modified the configuration
data.lastModificationAuthor.username boolean Username of the last Account to have modified the configuration
data.author.id String Id of the author of the configuration
data.author.username String Username of the author of the configuration
data.name String The configuration name
data.id ObjectId The id of the configuration

Delete a configuration

Parameter /file/configuration/:file/:configuration

Name Type Description
file String File id
configuration String Configuration id
Example usage:
curl -X DELETE -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/configuration/6005abef8b285b05c358faa6/60098f7dfedf4005c43c53ff'
Success-Response:
HTTP/1.1 200 OK
{
    "success": true,
    "data": {
        "_id": "60098f7dfedf4005c43c53ff",
        "file": "6005abef8b285b05c358faa6",
        "date": 1611239293136,
        "__v": 1,
        "lastModificationDate": 1611240346777,
        "writePermissions": [],
        "readPermissions": [],
        "quotationsEnabled": false,
        "enabledQuotations": [],
        "clippingPlanesEnabled": false,
        "enabledClippingPlanes": [],
        "collaborativeSelectionEnabled": true,
        "collaborativeAvatarsEnabled": true,
        "collaborationEnabled": true,
        "autosaveCameraPosition": false,
        "selectedNodes": [],
        "sceneTree": 0,
        "rememberSelection": false,
        "sceneEnabled": false,
        "modifiers": [],
        "modifiersEnabled": false,
        "activeOnStart": true,
        "cameraFoVIndex": 0,
        "zNear": 0.1,
        "upVector": "Z+",
        "iblEnabled": true,
        "skyboxEnabled": true,
        "environmentEnabled": true,
        "explodedViewEnabled": false,
        "explodedViewDistance": null,
        "transparencyEffectParameters": {
            "transparencyIntensityIndex": 0,
            "_id": "60098f7dfedf4005c43c53fe"
        },
        "enabledEffects": [
            "Edges"
        ],
        "enabledBehaviors": [],
        "behaviorsEnabled": true,
        "enabledLayers": [],
        "layersEnabled": true,
        "environmentOrientation": 0,
        "environmentBrightness": 1,
        "environmentFile": "scene/envmap_apartment.light.scene",
        "cameraType": "third person",
        "cameraPosition": [],
        "disableCamera": false,
        "lockedBy": null,
        "lastActivationDate": "1970-01-01T00:00:00.000Z",
        "lastModificationAuthor": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
        "author": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
        "name": "My configuration"
    }
}

Success 200

Name Type Description
success Bool

List configurations from a file

Parameter /file/configuration/:file

Name Type Description
file String File id
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' https://smartshape.io/file/configuration/6005abef8b285b05c358faa6
Success-Response:
HTTP/1.1 200 OK
{
     "success": true,
     "data": [
         {
             "_id": "60098f7dfedf4005c43c53ff",
             "date": 1611239293136,
             "writePermissions": [],
             "readPermissions": [],
             "quotationsEnabled": false,
             "enabledQuotations": [],
             "clippingPlanesEnabled": false,
             "enabledClippingPlanes": [],
             "collaborativeSelectionEnabled": true,
             "collaborativeAvatarsEnabled": true,
             "collaborationEnabled": true,
             "autosaveCameraPosition": false,
             "selectedNodes": [],
             "sceneTree": 0,
             "rememberSelection": false,
             "sceneEnabled": false,
             "modifiers": [],
             "modifiersEnabled": false,
             "activeOnStart": false,
             "cameraFoVIndex": 0,
             "zNear": 0.1,
             "upVector": "Y+",
             "iblEnabled": true,
             "skyboxEnabled": true,
             "environmentEnabled": true,
             "explodedViewEnabled": false,
             "explodedViewDistance": null,
             "transparencyEffectParameters": {
                 "transparencyIntensityIndex": 0,
                 "_id": "60098f7dfedf4005c43c53fe"
             },
             "enabledEffects": [],
             "enabledBehaviors": [],
             "behaviorsEnabled": true,
             "enabledLayers": [],
             "layersEnabled": true,
             "environmentOrientation": 0,
             "environmentBrightness": 1,
             "environmentFile": null,
             "cameraType": null,
             "cameraPosition": [],
             "disableCamera": true,
             "lockedBy": null,
             "lastActivationDate": "1970-01-01T00:00:00.000Z",
             "lastModificationAuthor": null,
             "author": {
                 "id": "60098f7dfedf4005c43c53fe",
                 "username": "test"
             },
             "name": "My configuration",
             "id": "60098f7dfedf4005c43c53ff"
         },
         {
             "_id": "60099066fedf4005c43c562d",
             "date": 1611239526246,
             "writePermissions": [],
             "readPermissions": [],
             "quotationsEnabled": false,
             "enabledQuotations": [],
             "clippingPlanesEnabled": false,
             "enabledClippingPlanes": [],
             "collaborativeSelectionEnabled": true,
             "collaborativeAvatarsEnabled": true,
             "collaborationEnabled": true,
             "autosaveCameraPosition": false,
             "selectedNodes": [],
             "sceneTree": 0,
             "rememberSelection": false,
             "sceneEnabled": false,
             "modifiers": [],
             "modifiersEnabled": false,
             "activeOnStart": false,
             "cameraFoVIndex": 0,
             "zNear": 0.1,
             "upVector": "Y+",
             "iblEnabled": true,
             "skyboxEnabled": true,
             "environmentEnabled": true,
             "explodedViewEnabled": false,
             "explodedViewDistance": null,
             "transparencyEffectParameters": {
                 "transparencyIntensityIndex": 0,
                 "_id": "60099066fedf4005c43c562c"
             },
             "enabledEffects": [],
             "enabledBehaviors": [],
             "behaviorsEnabled": true,
             "enabledLayers": [],
             "layersEnabled": true,
             "environmentOrientation": 0,
             "environmentBrightness": 1,
             "environmentFile": null,
             "cameraType": null,
             "cameraPosition": [],
             "disableCamera": true,
             "lockedBy": null,
             "lastActivationDate": "1970-01-01T00:00:00.000Z",
             "lastModificationAuthor": null,
             "author": {
                 "id": "60098f7dfedf4005c43c53fe",
                 "username": "test"
             },
             "name": "My second configuration",
             "id": "60099066fedf4005c43c562d"
         }
     ]
 }

Success 200

Name Type Description
success Bool
data Object Configurations list
data._id ObjectId The configuration id
data.date number The configuration creation date
data.writePermissions [String] The permissions to write in the configuration
data.readPermissions [String] The permissions to read the configuration
data.quotationEnabled boolean Enable the quotation feature
data.enabledQuotations [String] The quotations enabled by the configuration
data.clippingPlanesEnabled boolean Enable the clippingPlane feature
data.enabledClippingPlanes [String] The clippingPlanes enabled by the configuration
data.collaborativeSelectionEnabled boolean Enable the collaborative selection feature
data.collaborativeAvatarsEnabled boolean Enable the collaborative avatars feature
data.collaborationEnabled boolean Enable the collaboration features feature
data.autosaveCameraPosition boolean Automatically save the position of the camera
data.selectedNodes [ObjectId] The list of selected Nodes
data.sceneTree number The index of the default Scene Tree
data.rememberSelection boolean Remember the selection when re-opening the file
data.sceneEnabled boolean Enable the scene features feature
data.modifierPriority String One of ["highest", "lowest", "oldest", "latest"]
data.modifiers [Modifiers] The list of modifiers
data.modifiers.created Number Modifier creation time
data.modifiers.updated Number Modifier creation or last update time
data.modifiers.type String One of ['hidden', 'color', 'transparent', 'lock', 'icon', 'highlighted']
data.modifiers.node ObjectId The node to which the modifier applies
data.modifiers.details ModifierDetails The details of the modifier
data.modifiers.details.enabled boolean Enable the modifier
data.modifiers.details.colorId number Used by color modifiers
data.modifiers.details.code String Used by icon modifiers
data.modifiers.details.lockActions number Used by lock modifiers
data.modifiersEnabled boolean Enable the modifiers feature
data.activeOnStart boolean Make the configuration active when opening a file
data.cameraFoVIndex number Index of the Camera field of view
data.zNear number Nearest distance from the camera at which 3D objects are rendered to the screen
data.upVector String Which vector is "up" in the 3D view. One of X+, X-, Y+, Y-, Z+ or Z-
data.iblEnabled boolean Enable the "Environment lighting" feature: the light of the skybox reflects on the model, giving the scene a more realistic look
data.skyboxEnabled boolean Enable the skybox feature: which is the image shown in the background of the scene
data.environmentEnabled boolean Enable the environement features feature
data.explodedViewEnabled boolean Enable the exploded view feature
data.explodedViewDistance number The distance of the exploded view
data.transparencyEffectParameters TransparencyEffectParameters Parameters of the Transparency effect
data.transparencyEffectParameters.transparencyIntensityIndex number Used for 3d rendering
data.enabledEffects [String] The effects enabled
data.enabledBehaviors [ObjectId] The list of enabled behaviors
data.behaviorsEnabled boolean Enable the behaviors feature
data.enabledLayers [ObjectId] The enabled layers
data.layersEnabled boolean Enable the layers feature
data.environmentOrientation number Orientation of the skybox in degrees
data.environmentBrightness number Brightness of the environment light. 1 is the nominal value
data.environmentFile String Path to the file representing the skybox. Available skybox files are described in the server settings at "lights settings"."image based light"."sources"
data.cameraType String Type of camera used by the user to navigate in the 3D scene. Available types are: third person,first person,physics FPS`
data.cameraPosition [number] A list of 6 numbers. The first 3 numbers are the camera's position and the last 3 numbers are the camera's lookAt
data.disableCamera boolean Enable the camera feature
data.lockedBy ObjectId optional The user who locked the configuration
data.lastActivationDate number The last time the configuration was activated
data.lastModificationAuthor.id boolean Id of the last Account to have modified the configuration
data.lastModificationAuthor.username boolean Username of the last Account to have modified the configuration
data.author.id String Id of the author of the configuration
data.author.username String Username of the author of the configuration
data.name String The configuration name
data.id ObjectId The id of the configuration

List configurations from a public shared file

Parameter /file/configuration/:shareToken/:path

Name Type Description
shareToken String Public share token
path String optional File path
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' https://smartshape.io/file/configuration/6005b22b8b285b05c358faae/
Success-Response:
HTTP/1.1 200 OK
{
    "success": true,
    "data": [
        {
            "_id": "600993b3fedf4005c43c599b",
            "date": 1611240371350,
            "writePermissions": [],
            "readPermissions": [],
            "quotationsEnabled": false,
            "enabledQuotations": [],
            "clippingPlanesEnabled": false,
            "enabledClippingPlanes": [],
            "collaborativeSelectionEnabled": true,
            "collaborativeAvatarsEnabled": true,
            "collaborationEnabled": true,
            "autosaveCameraPosition": false,
            "selectedNodes": [],
            "sceneTree": 0,
            "rememberSelection": false,
            "sceneEnabled": false,
            "modifiers": [],
            "modifiersEnabled": false,
            "activeOnStart": true,
            "cameraFoVIndex": 0,
            "zNear": 0.1,
            "upVector": "Y+",
            "iblEnabled": true,
            "skyboxEnabled": true,
            "environmentEnabled": true,
            "explodedViewEnabled": false,
            "explodedViewDistance": null,
            "transparencyEffectParameters": {
                "transparencyIntensityIndex": 0,
                "_id": "600993b3fedf4005c43c599a"
            },
            "enabledEffects": [],
            "enabledBehaviors": [],
            "behaviorsEnabled": true,
            "enabledLayers": [],
            "layersEnabled": true,
            "environmentOrientation": 0,
            "environmentBrightness": 1,
            "environmentFile": null,
            "cameraType": null,
            "cameraPosition": [],
            "disableCamera": true,
            "lockedBy": null,
            "lastActivationDate": "1970-01-01T00:00:00.000Z",
            "lastModificationAuthor": null,
            "author": null,
            "name": "default",
            "id": "600993b3fedf4005c43c599b"
        }
    ]
}

Success 200

Name Type Description
success Bool
data Object Configurations list

Remove modifiers

Parameter /file/configuration/modifier/:file/:configuration

Name Type Description
file String File id
configuration String Configuration id

PUT /file/configuration/modifier/:file/:configuration

Name Type Description
data [Object] Array of one or more modifiers to add
data.0.type String Determines the type of the modifier.
Possible values:
- hidden: Hides the node in the 3D view.
- color: Colors the node in the 3D view according to the color index in data.details.colorId.
- transparent: Makes the node transparent in the 3D view.
- lock: Makes the node impossible to either select, annotate or quote in the 3D view according to the values stored in data.details.lockedActions.
- highlighted: Highlights the node in the 3D view according to the color index in data.details.colorId.
- icon: Shows an icon next to the node's name in the Scene tree. The icon is defined by data.details.code. This type is only available when the modifier is applied by a Behavior, and not when using the current endpoint.
data.0.node String Id of the node the modifier applies to

Success 200

Name Type Description
success Bool
data Object Updated configuration
data._id ObjectId The configuration id
data.date number The configuration creation date
data.writePermissions [String] The permissions to write in the configuration
data.readPermissions [String] The permissions to read the configuration
data.quotationEnabled boolean Enable the quotation features
data.enabledQuotations [String] The quotations enabled by the configuration
data.clippingPlanesEnabled boolean Enable the clippingPlane features
data.enabledClippingPlanes [String] The clippingPlanes enabled by the configuration
data.collaborativeSelectionEnabled boolean Enable the collaborative selection
data.collaborativeAvatarsEnabled boolean Enable the collaborative avatars feature
data.collaborationEnabled boolean Enable the collaboration features feature
data.autosaveCameraPosition boolean Automatically save the position of the camera
data.selectedNodes [ObjectId] The list of selected Nodes
data.sceneTree number The index of the default Scene Tree
data.rememberSelection boolean Remember the selection when re-opening the file
data.sceneEnabled boolean Enable the scene features feature
data.modifierPriority String One of ["highest", "lowest", "oldest", "latest"]
data.modifiers [Modifiers] The list of modifiers
data.modifiers.created Number Modifier creation time
data.modifiers.updated Number Modifier creation or last update time
data.modifiers.type String One of ['hidden', 'color', 'transparent', 'lock', 'icon', 'highlighted']
data.modifiers.node ObjectId The node to which the modifier applies
data.modifiers.depth Number The max depth of the node of the modifier
data.modifiers.nodeName string The name of the node of the modifier
data.modifiers.details ModifierDetails The details of the modifier
data.modifiers.details.enabled boolean Enable the modifier
data.modifiers.details.colorId number Used by color modifiers
data.modifiers.details.code String Used by icon modifiers
data.modifiers.details.lockActions number Used by lock modifiers
data.modifiersEnabled boolean Enable the modifiers feature
data.activeOnStart boolean Make the configuration active when opening a file
data.cameraFoVIndex number Index of the Camera field of view
data.zNear number Nearest distance from the camera at which 3D objects are rendered to the screen
data.upVector String Which vector is "up" in the 3D view. One of X+, X-, Y+, Y-, Z+ or Z-
data.iblEnabled boolean Enable the "Environment lighting" feature: the light of the skybox reflects on the model, giving the scene a more realistic look
data.skyboxEnabled boolean Enable the skybox feature: which is the image shown in the background of the scene
data.environmentEnabled boolean Enable the environement features feature
data.explodedViewEnabled boolean Enable the exploded view feature
data.explodedViewDistance number The distance of the exploded view
data.transparencyEffectParameters TransparencyEffectParameters Parameters of the Transparency effect
data.transparencyEffectParameters.transparencyIntensityIndex number An index between 0 and 2 that describes the intensity of the transparency.
data.enabledEffects [String] The effects enabled
data.enabledBehaviors [ObjectId] The list of enabled behaviors
data.behaviorsEnabled boolean Enable the behaviors feature
data.enabledLayers [ObjectId] The enabled layers
data.layersEnabled boolean Enable the layers feature
data.environmentOrientation number Orientation of the skybox in degrees
data.environmentBrightness number Brightness of the environment light. 1 is the nominal value
data.environmentFile String Path to the file representing the skybox. Available skybox files are described in the server settings at "lights settings"."image based light"."sources"
data.cameraType String Type of camera used by the user to navigate in the 3D scene. Available types are: third person,first person,physics FPS`
data.cameraPosition [number] A list of 6 numbers. The first 3 numbers are the camera's position and the last 3 numbers are the camera's lookAt
data.disableCamera boolean Enable the camera feature
data.lockedBy ObjectId optional The user who locked the configuration
data.lastActivationDate number The last time the configuration was activated
data.lastModificationAuthor.id boolean Id of the last Account to have modified the configuration
data.lastModificationAuthor.username boolean Username of the last Account to have modified the configuration
data.author.id String Id of the author of the configuration
data.author.username String Username of the author of the configuration
data.name String The configuration name
data.id ObjectId The id of the configuration
 HTTP/1.1 200 OK
  {
      "success": true,
      "data": {
          "_id": "600aa77daca16a05a62b982d",
          "file": "600aa6b7aca16a05a62b9758",
          "date": 1611310973457,
          "lastModificationDate": 1611313277130,
          "writePermissions": [],
          "readPermissions": [],
          "quotationsEnabled": false,
          "enabledQuotations": [],
          "clippingPlanesEnabled": false,
          "enabledClippingPlanes": [],
          "collaborativeSelectionEnabled": true,
          "collaborativeAvatarsEnabled": true,
          "collaborationEnabled": true,
          "autosaveCameraPosition": false,
          "selectedNodes": [
              "600aa6b804238a16a6934f26"
          ],
          "sceneTree": 0,
          "rememberSelection": false,
          "sceneEnabled": false,
          "modifiers": [
              {
                  "node": "600aa6b804238a16a6934f26",
                  "details": {
                      "enabled": false,
                      "lockedActions": [
                          "select",
                          "annotate",
                          "quote"
                      ],
                      "id": null
                  },
                  "_id": "600aaacbaca16a05a62b9f78",
                  "type": "transparent",
                  "depth": 5,
                  "nodeName": "SOLID"
              }
          ],
          "modifiersEnabled": true,
          "activeOnStart": false,
          "cameraFoVIndex": 0,
          "zNear": 0.1,
          "upVector": "Y+",
          "iblEnabled": true,
          "skyboxEnabled": true,
          "environmentEnabled": true,
          "explodedViewEnabled": false,
          "explodedViewDistance": 0,
          "transparencyEffectParameters": {
              "alphaCoefficient": 0,
              "_id": "600aa77daca16a05a62b982c"
          },
          "enabledEffects": [],
          "enabledBehaviors": [],
          "behaviorsEnabled": true,
          "enabledLayers": [],
          "layersEnabled": true,
          "environmentOrientation": 0,
          "environmentBrightness": 1,
          "environmentFile": null,
          "cameraType": null,
          "cameraPosition": [],
          "disableCamera": true,
          "lockedBy": null,
          "lastActivationDate": "2021-01-22T11:01:18.893Z",
          "lastModificationAuthor": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
          "author": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
          "name": "My configuration",
          "id": "600aa77daca16a05a62b982d"
      }
  }|

Update a configuration

Parameter /file/configuration/:file/:configuration

Name Type Description
file String File id
configuration String Configuration id

POST /file/configuration/:file/:configuration

Name Type Description
data String JSON object describing the new configuration
Example usage:
curl -X POST https://smartshape.io/file/configuration/6005abef8b285b05c358faa6/60098f7dfedf4005c43c53ff \
  -H 'Authorization: Bearer <auth_token>' \
  -H 'Content-Type: application/json' \
  -d '{
          "data": {
              "activeOnStart": true,
              "enabledEffects": [
                  "Edges"
              ],
              "upVector": "Z+",
              "layersEnabled": true,
              "disableCamera": false,
              "cameraType": "third person",
              "environmentFile": "scene/envmap_apartment.light.scene",
              "environmentBrightness": 1,
              "behaviorsEnabled": true
          }
      }'
Success-Response:
HTTP/1.1 200 OK
{
    "success": true,
    "data": {
        "lastModificationDate": 1611240270553,
        "_id": "60098f7dfedf4005c43c53ff",
        "file": "6005abef8b285b05c358faa6",
        "date": 1611239293136,
        "__v": 1,
        "writePermissions": [],
        "readPermissions": [],
        "quotationsEnabled": false,
        "enabledQuotations": [],
        "clippingPlanesEnabled": false,
        "enabledClippingPlanes": [],
        "collaborativeSelectionEnabled": true,
        "collaborativeAvatarsEnabled": true,
        "collaborationEnabled": true,
        "autosaveCameraPosition": false,
        "selectedNodes": [],
        "sceneTree": 0,
        "rememberSelection": false,
        "sceneEnabled": false,
        "modifiers": [],
        "modifiersEnabled": false,
        "activeOnStart": true,
        "cameraFoVIndex": 0,
        "zNear": 0.1,
        "upVector": "Z+",
        "iblEnabled": true,
        "skyboxEnabled": true,
        "environmentEnabled": true,
        "explodedViewEnabled": false,
        "explodedViewDistance": null,
        "transparencyEffectParameters": {
            "transparencyIntensityIndex": 0,
            "_id": "60098f7dfedf4005c43c53fe"
        },
        "enabledEffects": [
            "Edges"
        ],
        "enabledBehaviors": [],
        "behaviorsEnabled": true,
        "enabledLayers": [],
        "layersEnabled": true,
        "environmentOrientation": 0,
        "environmentBrightness": 1,
        "environmentFile": "scene/envmap_apartment.light.scene",
        "cameraType": "third person",
        "cameraPosition": [],
        "disableCamera": false,
        "lockedBy": null,
        "lastActivationDate": "1970-01-01T00:00:00.000Z",
        "lastModificationAuthor": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
        "author": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
        "name": "My configuration"
    }
}

Success 200

Name Type Description
success Bool
data Object Updated configuration
data._id ObjectId The configuration id
data.date number The configuration creation date
data.writePermissions [String] The permissions to write in the configuration
data.readPermissions [String] The permissions to read the configuration
data.quotationEnabled boolean Enable the quotation feature
data.enabledQuotations [String] The quotations enabled by the configuration
data.clippingPlanesEnabled boolean Enable the clippingPlane feature
data.enabledClippingPlanes [String] The clippingPlanes enabled by the configuration
data.collaborativeSelectionEnabled boolean Enable the collaborative selection feature
data.collaborativeAvatarsEnabled boolean Enable the collaborative avatars feature
data.collaborationEnabled boolean Enable the collaboration features feature
data.autosaveCameraPosition boolean Automatically save the position of the camera
data.selectedNodes [ObjectId] The list of selected Nodes
data.sceneTree number The index of the default Scene Tree
data.rememberSelection boolean Remember the selection when re-opening the file
data.sceneEnabled boolean Enable the scene features feature
data.modifierPriority String One of ["highest", "lowest", "oldest", "latest"]
data.modifiers [Modifiers] The list of modifiers
data.modifiers.created Number Modifier creation time
data.modifiers.updated Number Modifier creation or last update time
data.modifiers.type String One of ['hidden', 'color', 'transparent', 'lock', 'icon', 'highlighted']
data.modifiers.node ObjectId The node to which the modifier applies
data.modifiers.depth Number The max depth of the node of the modifier
data.modifiers.nodeName string The name of the node of the modifier
data.modifiers.details ModifierDetails The details of the modifier
data.modifiers.details.enabled boolean Enable the modifier
data.modifiers.details.colorId number Used by color modifiers
data.modifiers.details.code String Used by icon modifiers
data.modifiers.details.lockActions number Used by lock modifiers
data.modifiersEnabled boolean Enable the modifiers feature
data.activeOnStart boolean Make the configuration active when opening a file
data.cameraFoVIndex number Index of the Camera field of view
data.zNear number Nearest distance from the camera at which 3D objects are rendered to the screen
data.upVector String Which vector is "up" in the 3D view. One of X+, X-, Y+, Y-, Z+ or Z-
data.iblEnabled boolean Enable the "Environment lighting" feature: the light of the skybox reflects on the model, giving the scene a more realistic look
data.skyboxEnabled boolean Enable the skybox feature: which is the image shown in the background of the scene
data.environmentEnabled boolean Enable the environement features feature
data.explodedViewEnabled boolean Enable the exploded view feature
data.explodedViewDistance number The distance of the exploded view
data.transparencyEffectParameters TransparencyEffectParameters Parameters of the Transparency effect
data.transparencyEffectParameters.transparencyIntensityIndex number An index between 0 and 2 that describes the intensity of the transparency.
data.enabledEffects [String] The effects enabled
data.enabledBehaviors [ObjectId] The list of enabled behaviors
data.behaviorsEnabled boolean Enable the behaviors feature
data.enabledLayers [ObjectId] The enabled layers
data.layersEnabled boolean Enable the layers feature
data.environmentOrientation number Orientation of the skybox in degrees
data.environmentBrightness number Brightness of the environment light. 1 is the nominal value
data.environmentFile String Path to the file representing the skybox. Available skybox files are described in the server settings at "lights settings"."image based light"."sources"
data.cameraType String Type of camera used by the user to navigate in the 3D scene. Available types are: third person,first person,physics FPS`
data.cameraPosition [number] A list of 6 numbers. The first 3 numbers are the camera's position and the last 3 numbers are the camera's lookAt
data.disableCamera boolean Enable the camera feature
data.lockedBy ObjectId optional The user who locked the configuration
data.lastActivationDate number The last time the configuration was activated
data.lastModificationAuthor.id boolean Id of the last Account to have modified the configuration
data.lastModificationAuthor.username boolean Username of the last Account to have modified the configuration
data.author.id String Id of the author of the configuration
data.author.username String Username of the author of the configuration
data.name String The configuration name
data.id ObjectId The id of the configuration

Update one or multiple modifiers

Parameter /file/configuration/modifier/:file/:configuration

Name Type Description
file String File id
configuration String Configuration id

PUT /file/configuration/modifier/:file/:configuration

Name Type Description
data [Object] Array of one or more modifiers to add
data.0.type String Determines the type of the modifier.
Possible values:
- hidden: Hides the node in the 3D view.
- color: Colors the node in the 3D view according to the color index in data.details.colorId.
- transparent: Makes the node transparent in the 3D view.
- lock: Makes the node impossible to either select, annotate or quote in the 3D view according to the values stored in data.details.lockedActions.
- highlighted: Highlights the node in the 3D view according to the color index in data.details.colorId.
- icon: Shows an icon next to the node's name in the Scene tree. The icon is defined by data.details.code. This type is only available when the modifier is applied by a Behavior, and not when using the current endpoint.
data.0.node String Id of the node the modifier applies to
data.0.details Object Details of the modifier
data.0.details.enabled Boolean optional Whether or not the modifier is enabled
Default value: true
data.0.details.colorId Number optional Index in the color palette of the color to apply to the node
data.0.details.code String optional Name of the icon to show in the Scene tree. The list of available icons is here: http://materialdesignicons.com/cdn/3.8.95/. The mdi- prefix is automatically added and should not be specified here
data.0.details.lockedActions [String] optional Actions locked by lock modifiers.
Possible values:
- select: Prevents the node from being selected.
- annotate: Prevents annotations from being put on the node.
- quote: Prevents quotations from being put on the node.
Example usage:
curl -L -X POST 'https://smartshape.io//file/configuration/modifier/600aa6b7aca16a05a62b9758/600aa77daca16a05a62b982d' \
         -H 'Authorization: Bearer <auth_token>' \
         -H 'Content-Type: application/json' \
         -d '{
             "data": [
                 {
                     "type": "transparent",
                     "node": "600aa6b804238a16a6934f26",
                     "details": {
                         "enabled": false
                     }
                 },
                 {
                     "type": "color",
                     "node": "600aa6b804238a16a6934f26",
                     "details": {
                         "colorId": "5"
                     }
                 }
             ]
         }'
Success-Response:
HTTP/1.1 200 OK
{
    "success": true,
    "data": {
        "_id": "600aa77daca16a05a62b982d",
        "file": "600aa6b7aca16a05a62b9758",
        "date": 1611310973457,
        "lastModificationDate": 1611312767182,
        "writePermissions": [],
        "readPermissions": [],
        "quotationsEnabled": false,
        "enabledQuotations": [],
        "clippingPlanesEnabled": false,
        "enabledClippingPlanes": [],
        "collaborativeSelectionEnabled": true,
        "collaborativeAvatarsEnabled": true,
        "collaborationEnabled": true,
        "autosaveCameraPosition": false,
        "selectedNodes": [
            "600aa6b804238a16a6934f26"
        ],
        "sceneTree": 0,
        "rememberSelection": false,
        "sceneEnabled": false,
        "modifiers": [
            {
                "_id": "600aaacbaca16a05a62b9f78",
                "details": {
                    "enabled": false
                },
                "node": "600aa6b804238a16a6934f26",
                "type": "transparent",
                "depth": 5,
                "nodeName": "SOLID"
            },
            {
                "node": "600aa6b804238a16a6934f26",
                "details": {
                    "colorId": "5"
                },
                "_id": "600aae76aca16a05a62ba503",
                "type": "color",
                "depth": 5,
                "nodeName": "SOLID"
            }
        ],
        "modifiersEnabled": true,
        "activeOnStart": false,
        "cameraFoVIndex": 0,
        "zNear": 0.1,
        "upVector": "Y+",
        "iblEnabled": true,
        "skyboxEnabled": true,
        "environmentEnabled": true,
        "explodedViewEnabled": false,
        "explodedViewDistance": 0,
        "transparencyEffectParameters": {
            "alphaCoefficient": 0,
            "_id": "600aa77daca16a05a62b982c"
        },
        "enabledEffects": [],
        "enabledBehaviors": [],
        "behaviorsEnabled": true,
        "enabledLayers": [],
        "layersEnabled": true,
        "environmentOrientation": 0,
        "environmentBrightness": 1,
        "environmentFile": null,
        "cameraType": null,
        "cameraPosition": [],
        "disableCamera": true,
        "lockedBy": null,
        "lastActivationDate": "2021-01-22T10:52:47.617Z",
        "lastModificationAuthor": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
        "author": {
             "id": "60098f7dfedf4005c43c53fe",
             "username": "test"
         },
        "name": "My configuration",
        "id": "600aa77daca16a05a62b982d"
    }
}

Success 200

Name Type Description
success Bool
data Object Updated configuration
data._id ObjectId The configuration id
data.date number The configuration creation date
data.writePermissions [String] The permissions to write in the configuration
data.readPermissions [String] The permissions to read the configuration
data.quotationEnabled boolean Enable the quotation feature
data.enabledQuotations [String] The quotations enabled by the configuration
data.clippingPlanesEnabled boolean Enable the clippingPlane feature
data.enabledClippingPlanes [String] The clippingPlanes enabled by the configuration
data.collaborativeSelectionEnabled boolean Enable the collaborative selection feature
data.collaborativeAvatarsEnabled boolean Enable the collaborative avatars feature
data.collaborationEnabled boolean Enable the collaboration features feature
data.autosaveCameraPosition boolean Automatically save the position of the camera
data.selectedNodes [ObjectId] The list of selected Nodes
data.sceneTree number The index of the default Scene Tree
data.rememberSelection boolean Remember the selection when re-opening the file
data.sceneEnabled boolean Enable the scene features feature
data.modifierPriority String One of ["highest", "lowest", "oldest", "latest"]
data.modifiers [Modifiers] The list of modifiers
data.modifiers.created Number Modifier creation time
data.modifiers.updated Number Modifier creation or last update time
data.modifiers.type String One of ['hidden', 'color', 'transparent', 'lock', 'icon', 'highlighted']
data.modifiers.node ObjectId The node to which the modifier applies
data.modifiers.depth Number The max depth of the node of the modifier
data.modifiers.nodeName string The name of the node of the modifier
data.modifiers.details ModifierDetails The details of the modifier
data.modifiers.details.enabled boolean Enable the modifier
data.modifiers.details.colorId number Used by color modifiers
data.modifiers.details.code String Used by icon modifiers
data.modifiers.details.lockActions number Used by lock modifiers
data.modifiersEnabled boolean Enable the modifiers feature
data.activeOnStart boolean Make the configuration active when opening a file
data.cameraFoVIndex number Index of the Camera field of view
data.zNear number Nearest distance from the camera at which 3D objects are rendered to the screen
data.upVector String Which vector is "up" in the 3D view. One of X+, X-, Y+, Y-, Z+ or Z-
data.iblEnabled boolean Enable the "Environment lighting" feature: the light of the skybox reflects on the model, giving the scene a more realistic look
data.skyboxEnabled boolean Enable the skybox feature: which is the image shown in the background of the scene
data.environmentEnabled boolean Enable the environment features feature
data.explodedViewEnabled boolean Enable the exploded view feature
data.explodedViewDistance number The distance of the exploded view
data.transparencyEffectParameters TransparencyEffectParameters Parameters of the Transparency effect
data.transparencyEffectParameters.transparencyIntensityIndex number An index between 0 and 2 that describes the intensity of the transparency.
data.enabledEffects [String] The effects enabled
data.enabledBehaviors [ObjectId] The list of enabled behaviors
data.behaviorsEnabled boolean Enable the behavior features
data.enabledLayers [ObjectId] The enabled layers
data.layersEnabled boolean Enable the layer features
data.environmentOrientation number Orientation of the skybox in degrees
data.environmentBrightness number Brightness of the environment light. 1 is the nominal value
data.environmentFile String Path to the file representing the skybox. Available skybox files are described in the server settings at "lights settings"."image based light"."sources"
data.cameraType String Type of camera used by the user to navigate in the 3D scene. Available types are: third person,first person,physics FPS`
data.cameraPosition [number] A list of 6 numbers. The first 3 numbers are the camera's position and the last 3 numbers are the camera's lookAt
data.disableCamera boolean Enable the camera features
data.lockedBy ObjectId optional The user who locked the configuration
data.lastActivationDate number The last time the configuration was activated
data.lastModificationAuthor.id boolean Id of the last Account to have modified the configuration
data.lastModificationAuthor.username boolean Username of the last Account to have modified the configuration
data.author.id String Id of the author of the configuration
data.author.username String Username of the author of the configuration
data.name String The configuration name
data.id ObjectId The id of the configuration

File

Copy a file

Copy a file and its dependencies to the specified destination. Fails if the source file does not exits, if the destination directory does not exist or if the destination file already exists. This endpoint is asynchronous, to check that the copy is complete you must query the file's state (using GET /file/:file). The state of the copy will be: "queued", then "copying" and finally it will be set to the same state as the copied file.

Parameter /file/copy/:fileId

Name Type Description
:fileId String Id of the file to copy

POST /file/copy/:fileId

Name Type Description
destination String The destination path of the file to copy from the source.
Example usage:
curl -X POST https://smartshape.io/file/copy/5b5f4801194b7c76fb5495fa \
     -H 'Authorization: Bearer <auth_token>' \
     -H 'Content-Type: application/json' \
     -d '{
         "destination": "/my-folder/my-copy-1.fbx"
  }'
Success-Response:
HTTP/1.1 200 OK
{
   "fileId": "587ca29dd564001b7cfc1196"
}

Success 200

Name Type Description
fileId String New file id of the destination file.

Create a directory

Create a new directory.

Parameter /file/dir/private/:path

Name Type Description
path String Path of the new directory.
Example usage:
curl -X POST -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/dir/private/my/new/folder'
Success-Response:
HTTP/1.1 200 OK
{
   "id":"587ca29dd564001b7cfc1195",
   "type":"dir",
   "parent":"/",
   "path":"/test",
   "name":"test",
   "created":1484563101652,
   "updated":1484563101653,
   "size":0,
   "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
   "user":"4001b7cfc1190587ca29dd56"
}

Success 200

Name Type Description
id String New directory id
type String New directory type (will always be "dir").
parent String New directory parent path.
name String New directory name.
created Number New directory creation time.
updated Number New directory update time.
size Number New directory size.
owner Number New directory owner.
user Number New directory user.

Create a file search form

POST /file/search-form/

Name Type Description
name Object Name of the file search form
files [String] optional IDs of the folders to restrict this file search form to
searchQuery String Template of search query generated by the search form. The query can contain variables like $name that will be replaced by what the user put in the field named name
description Object optional Description of the file search form
fields [Object] optional Fields of the search form
fields.type String Determines the type of field shown in the UI.
Possible values:
- textinput: Shows a text area which allows the user to enter any string
- select: Shows a drop down menu which lets the user choose among the values of the fields.data field
- number: Shows a number selector which lets the user to enter a valid number
- switch: Shows a switch which allows the user to enable or disable it
fields.data [String] optional Values showed in the drop down menu when the type is select
fields.label String Label shown next to the field in the UI
readPermissions [String] optional Permissions required to read this file search form
Example usage:
curl -X POST \
    -H 'Authorization: Bearer <auth_token>' \
    -H 'Content-Type: application/json' \
    'https://smartshape.io/file/search-form/' \
    -d '
    {
        "name": {
            "en_US": "Search files by layer",
            "fr_FR": "Rechercher des fichiers par calque"
        },
        "searchQuery": "($layer1 and layer:\"First floor\") or ($layer2 and layer:\"Second floor\")",
        "description": {
            "en_US": "Search for files that feature at least one of the selected layers.",
            "fr_FR": "Rechercher les fichiers qui présentent au moins un des calques sélectionnés."
        },
        "fields": [
            {
                "type": "switch",
                "name": "layer1",
                "label": "First floor"
            },
            {
                "type": "switch",
                "name": "layer2",
                "label": "Second floor"
            }
        ]
    }'
Success-Response:
HTTP/1.1 200 OK
{
    "name": {
        "fr_FR": "Rechercher des fichiers par calque",
        "en_US": "Search files by layer"
    },
    "searchQuery": "($layer1 and layer:\"First floor\") or ($layer2 and layer:\"Second floor\")",
    "description": {
        "fr_FR": "Rechercher les fichiers qui présentent au moins un des calques sélectionnés.",
        "en_US": "Search for files that feature at least one of the selected layers."
    },
    "readPermissions": [],
    "fields": [
        {
            "type": "switch",
            "name": "layer1",
            "label": "First floor",
            "_id": "5c4ae373c97a4b690dd4caa9"
        },
        {
            "type": "switch",
            "name": "layer2",
            "label": "Second floor",
            "_id": "5c4ae373c97a4b690dd4caa8"
        }
    ],
    "files": [],
    "id": "5c4ae373c97a4b690dd4caa7"
}

Success 200

Name Type Description
result json JSON object of the created file search forms

Delete a file or directory

Delete a file or a directory. All shares will also be deleted.

Parameter /file/delete/:path

Name Type Description
path String Path of the file or directory to delete.
Example usage:
curl -X DELETE -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/delete/path/to/file'
Success-Response:
HTTP/1.1 200 OK
{
   "success": true
}

Success 200

Name Type Description
success Boolean

Delete a file search form

Parameter /file/search-form/:searchform

Name Type Description
searchform String ID of the search form to delete
Example usage:
curl -X DELETE \
    -H 'Authorization: Bearer <auth_token>' \
    'https://smartshape.io/file/search-form/5fff02ed87d3c866709c16a4'
Success-Response:
 HTTP/1.1 200 OK
"5c4ae40dc97a4b690dd4caad"

Success 200

Name Type Description
ID String of the deleted search form

Download a file

Download a private file.

Parameter /file/download/private/:path

Name Type Description
path String Path of the file.
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/download/private/my/folder/file1.fbx'

Download a private shared file

Download a private shared file. The fileId is the one from the root private share. The path will contain the name of the root private share. (Ex: to download the file file1.fbx from a shared directory sharefolder, the path will be /sharedfolder/file1.fbx)

Parameter /file/download/:fileId/:path

Name Type Description
fileId String File id of the shared directory.
path String Path of the file.
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/download/587ca29dd564001b7cfc1190/sharedfolder/file1.fbx'

Download a public shared file

Download a public shared file.

Parameter /file/download/:shareToken/:path

Name Type Description
path String Path of the file.
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/download/8f2890eb05/file1.fbx'

Get file details

Get all information related to a file.

Parameter /file/:file

Name Type Description
file String File ID.
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/59b01a2f99b3cd2e260b0bdc/'
Success-Response:
HTTP/1.1 200 OK
{
   {
       "data": {
           "id": "59b01a2f99b3cd2e260b0bdc",
           "name": "cube.scene",
           "bucket": "7727e3b569716326",
           "type": "file",
           "nodePuidAttributeKey": "smartshape.scene.node.uid",
           "favoritedBy": [],
           "sceneTreeRoots": [
               "5e8018fd-251c-4a53-7ff2-58294963672b"
           ],
           "sceneTreeNames": [
               "default"
           ],
           "error": "",
           "state": "converted",
           "allowLivePublicMeetings": false,
           "updated": 1504713316948,
           "created": 1504713263521,
           "size": 8682008,
           "shareToken": "",
           "isLink": false,
           "user": "4001b7cfc1190587ca29dd56",
           "owner": {"id": "4001b7cfc1190587ca29dd56", "username": "test"},
           "key": "/Cubes/cube.scene",
           "parent": "/Cubes",
           "path": "/Cubes/cube.scene"
       }
   }
}

Success 200

Name Type Description
data Object JSON object that contains all file's information.

Get file path

Get file complete path based to current user permission. For private files, the path will contain the actual path including the filename. For public shared files, the path will be the public share token. For private shared files, the path will be based on the linked file ID.

Parameter /file/path/:file

Name Type Description
file String File id.
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/path/59649f408a80401d4d98a7ae/'
Success-Response (for a private file):
HTTP/1.1 200 OK
{
   "data": {
     "name": "filename.scene",
     "path": "/Folder/filename.scene"
   }
}

Success 200

Name Type Description
data Object JSON object that contains a field "name" for the filename and a field "path" with the file path.

List a directory

List files from a private directory

Parameter /file/dir/private/:path

Name Type Description
path String Path of the directory.

GET /file/dir/private/:path

Name Type Description
includeLastConfigurationUsed String Return last configuration used on all files
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/dir/private/my/folder'
Success-Response:
HTTP/1.1 200 OK
[
     {
         "id":"587ca29dd564001b7cfc1195",
         "type":"dir",
         "parent":"/",
         "path":"/aDirectory",
         "name":"aDirectory",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"4001b7cfc1190587ca29dd56"
     },
     {
         "id":"587ca29dd564001b7cfc1196",
         "type":"file",
         "parent":"/",
         "path":"/file1.fbx",
         "name":"file1.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converted",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"4001b7cfc1190587ca29dd56"
     },
     {
         "id":"587ca29dd564001b7cfc1196",
         "type":"file",
         "parent":"/",
         "path":"/file2.fbx",
         "name":"file2.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converting",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"4001b7cfc1190587ca29dd56"
     }
]

Success 200

Name Type Description
id String File id
type String File type (can be either dir or file).
parent String File parent path.
name String File name.
path String File complete path.
state String File state (can be one of none, queued, converting, 'copying', converted, inError)
created Number File creation time.
updated Number File update time.
size Number File size (in bytes).
owner Number File owner.
user Number File user.

List a privately shared directory

List files from a privately shared directory.

Parameter /file/dir/:fileId/:path

Name Type Description
fileId String File id of the shared directory.
path String Path of the directory.

GET /file/dir/:fileId/:path

Name Type Description
includeLastConfigurationUsed String Return last configuration used on all files
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/dir/587ca29dd564001b7cfc1190/sharedfolder'
Success-Response:
HTTP/1.1 200 OK
[
     {
         "id":"587ca29dd564001b7cfc1195",
         "privateShareFileId":"587ca29dd564001b7cfc1190",
         "type":"dir",
         "parent":"/sharedfolder/",
         "path":"/sharedfolder/subfolder",
         "name":"subfolder",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"001b7cfc1196587ca29dd564"
     },
     {
         "id":"587ca29dd564001b7cfc1196",
         "privateShareFileId":"587ca29dd564001b7cfc1190",
         "type":"file",
         "parent":"/sharedfolder/",
         "path":"/sharedfolder/file1.fbx",
         "name":"file1.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converted",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"001b7cfc1196587ca29dd564"
     },
     {
         "id":"587ca29dd564001b7cfc1196",
         "privateShareFileId":"587ca29dd564001b7cfc1190",
         "type":"file",
         "parent":"/sharedfolder/",
         "path":"/sharedfolder/file2.fbx",
         "name":"file2.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converting",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"001b7cfc1196587ca29dd564"
     }
]

Success 200

Name Type Description
id String File id
privateShareFileId String File id of the root shared file or directory.
type String File type (can be either dir or file).
parent String File parent path.
name String File name.
path String File complete path.
state String File state (can be one of none, queued, converting, 'copying', converted, inError)
created Number File creation time.
updated Number File update time.
size Number File size (in bytes).
owner Number File owner.
user Number File user.

List a public shared directory

List files inside a public share

Parameter /file/dir/:shareToken/:path

Name Type Description
shareToken String Public share token
path String optional Path of the directory.

GET /file/dir/:shareToken/:path

Name Type Description
includeLastConfigurationUsed String Return last configuration used on all files
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/dir/8f2890eb05/'
Success-Response:
HTTP/1.1 200 OK
[
     {
         "type":"dir",
         "name":"aDirectory",
         "size":123
     },
     {
         "type":"file",
         "name":"file1.fbx",
         "size":123
     },
     {
         "type":"file"
         "name":"file2.fbx",
         "size":123
     }
]

Success 200

Name Type Description
name String File name.
type String File type (can be either dir or file).
size Number File size (in bytes).

List file search forms

Parameter /file/search-form/:dir?

Name Type Description
dir String optional ObjectId of the directory the returned search forms must be attached to.
Example usage:
curl -X GET \
    -H 'Authorization: Bearer <auth_token>' \
    'https://smartshape.io/file/search-form/5fff02ed87d3c866709c16a4'
Success-Response:
HTTP/1.1 200 OK
[
    {
        "name": {
            "en_US": "Search files by layer",
            "fr_FR": "Rechercher des fichiers par calque"
        },
        "searchQuery": "($layer1 and layer:\"First floor\") or ($layer2 and layer:\"Second floor\")",
        "description": {
            "en_US": "Search for files that feature at least one of the selected layers.",
            "fr_FR": "Rechercher les fichiers qui présentent au moins un des calques sélectionnés."
        },
        "readPermissions": [],
        "fields": [
            {
                "type": "switch",
                "name": "layer1",
                "label": "First floor",
                "_id": "5c4ae373c97a4b690dd4caa9"
            },
            {
                "type": "switch",
                "name": "layer2",
                "label": "Second floor",
                "_id": "5c4ae373c97a4b690dd4caa8"
            }
        ],
        "files": [],
        "id": "5c4ae373c97a4b690dd4caa7"
    }
]

List file searches

Example usage:
curl -X DELETE -H 'Authorization: Bearer <auth_token>' "https://smartshape.io/file/search/delete/589cafda25996a19e0b2fe3c
Success-Response:
HTTP/1.1 200 OK
[
     {
         "id":"58d15f9f765ae21da4b6371a",
         "name":"fbx files",
         "search":"*.fbx",
         "date":"2017-03-21T17:15:11.758Z",
         "context":"file",
         "type":"favorite"
         "user":"4001b7cfc1190587ca29dd56"
     },
     {
         "id":"58d15f9f765ae21da4b6371b",
         "name":"",
         "search":"*.obj",
         "date":"2017-03-21T17:10:11.758Z",
         "context":"file",
         "type":"history"
         "user":"4001b7cfc1190587ca29dd56"
     }
]

Success 200

Name Type Description
id String Search id
name String Search name (for favorited searches only)
search String Search query
type String Either favorite for a saved search or history for a previously searched query
date String Date when the query was run or saved

List files and directories shared with other users

Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/shared-out/'
Success-Response:
HTTP/1.1 200 OK
[
    {
        "_id": "5b598b6bd385ef76c8a0cc6e",
        "name": "cube (1).fbx",
        "bucket": "82aec3ccd67b26c8",
        "type": "file",
        "revisionDate": "2018-07-26T08:50:51.178Z",
        "nodePuidAttributeKey": "smartshape.scene.node.uid",
        "favoritedBy": [],
        "sceneTreeRoots": [
            "55a46216-1524-2ded-4613-74d5bcad67f2"
        ],
        "sceneTreeNames": [
            "default"
        ],
        "error": "",
        "state": "converted",
        "allowLivePublicMeetings": false,
        "updated": 1532595072015,
        "created": 1532595051178,
        "size": 46304,
        "shareToken": "",
        "isLink": false,
        "user": "4001b7cfc1190587ca29dd56",
        "roles": [],
        "owner": {"id": "4001b7cfc1190587ca29dd56", "username": "test"},
        "key": "/cube (1).fbx",
        "parent": "/",
        "path": "/cube (1).fbx",
        "id": "5b598b6bd385ef76c8a0cc6e",
        "privateShares": {
            "test2@smartshape.io": {
                "roles": [
                    "5b5994dd93b0aa7b08e0b834",
                    "5b5995e293b0aa7b08e0b835"
                ],
                "sharedFromAncestor": false,
                "sharedPath": "/cube (1).fbx",
                "privateShareFileId": "5b598b6bd385ef76c8a0cc6e"
            },
            "test3@smartshape.io": {
                "roles": [
                    "5b5994dd93b0aa7b08e0b834",
                    "5b5995e293b0aa7b08e0b835"
                ],
                "sharedFromAncestor": false,
                "sharedPath": "/cube (1).fbx",
                "privateShareFileId": "5b598b6bd385ef76c8a0cc6e"
            },
            "test4@smartshape.io": {
                "roles": [
                    "5b5995e293b0aa7b08e0b835"
                ],
                "sharedFromAncestor": false,
                "sharedPath": "/cube (1).fbx",
                "privateShareFileId": "5b598b6bd385ef76c8a0cc6e"
            },
            "test5@smartshape.io": {
                "roles": [
                    "5b5994dd93b0aa7b08e0b834"
                ],
                "sharedFromAncestor": false,
                "sharedPath": "/cube (1).fbx",
                "privateShareFileId": "5b598b6bd385ef76c8a0cc6e"
            }
        }
    }
]

Success 200

Name Type Description
id String File id
type String File type (can be either dir or file).
parent String File parent path.
name String File name.
path String File complete path.
state String File state (can be one of none, queued, converting, 'copying', converted, inError)
created Number File creation time.
updated Number File update time.
size Number File size (in bytes).
owner Number File owner.
user Number File user.
privateShares Object List of people the file is shared to and the corresponding roles, with the email as the key.

List files and directories shared with the user

List all root files and directories shared with the user, regardless of the user.

Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/shared-in'
Success-Response:
HTTP/1.1 200 OK
[
     {
         "id":"587ca29dd564001b7cfc1190",
         "privateShareFileId":"587ca29dd564001b7cfc1190",
         "type":"dir",
         "parent":"/",
         "path":"/sharedfolder",
         "name":"sharedfolder",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"001b7cfc1196587ca29dd564"
     },
     {
         "id":"58b6df495391ef34528e4e0f",
         "privateShareFileId":"58b6df495391ef34528e4e0f",
         "type":"file",
         "parent":"/",
         "path":"/file2.fbx",
         "name":"file2.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converted",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"001b7cfc1196587ca29dd564"
     }
]

Success 200

Name Type Description
id String File id
privateShareFileId String File id of the root shared file or directory.
type String File type (can be either dir or file).
parent String File parent path.
name String File name.
path String File complete path.
state String File state (can be one of none, queued, converting, 'copying', converted, inError)
created Number File creation time.
updated Number File update time.
size Number File size (in bytes).
owner Number File owner.
user Number File user.

Remove a search query from favorites

Parameter /file/search/delete/:searchId

Name Type Description
searchId String Id of the search to remove
Example usage:
curl -X DELETE -H 'Authorization: Bearer <auth_token>' "https://smartshape.io/file/search/delete/589cafda25996a19e0b2fe3c
Success-Response:
HTTP/1.1 200 OK

Save a file search query to favorites

GET /file/search/save/?query=:q

Name Type Description
query String Query to save

POST /file/search/save/?query=:q

Name Type Description
name String Name to save the query with
Example usage:
curl -X POST -H 'Authorization: Bearer <auth_token>' -F "name=fbx files"  'https://smartshape.io/file/search/save/?query=*.fbx'
Success-Response:
HTTP/1.1 200 OK

Search in files

Search files. Will search in all subdirectories.

Parameter /file/search/private/:path

Name Type Description
path String optional Path where to search

GET /file/search/private/:path

Name Type Description
q String Search query
favoritedOnly Bool Search in favorites only (default false)
lastOpenedDate Bool Search in last opened files only (default false)
types String optional JSON stringified array of the file types among ["file", "dir"] to return (example to only return the directories: ?types=["dir"]).

POST /file/search/private/:path

Name Type Description
query String Search query (used if query parameter q is not defined)
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/search/private/my/folder?q=*.fbx'
Success-Response:
HTTP/1.1 200 OK
[
     {
         "id":"587ca29dd564001b7cfc1196",
         "type":"file",
         "parent":"/",
         "path":"/file1.fbx",
         "name":"file1.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converted",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"4001b7cfc1190587ca29dd56"
     },
     {
         "id":"587ca29dd564001b7cfc1196",
         "type":"file",
         "parent":"/",
         "path":"/file2.fbx",
         "name":"file2.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converting",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"4001b7cfc1190587ca29dd56"
     }
]

Success 200

Name Type Description
id String File id
type String File type (can be either dir or file).
parent String File parent path.
name String File name.
path String File complete path.
state String File state (can be one of none, queued, converting, 'copying', converted, inError)
created Number File creation time.
updated Number File update time.
size Number File size (in bytes).
owner Number File owner.
user Number File user.

Search in private shared files

Parameter /file/search/shared-with-me/:fileId/:path

Name Type Description
fileId String optional fileId of the shared folder where to search
path String optional Path where to search

GET /file/search/shared-with-me/:fileId/:path

Name Type Description
q String Search query
favoritedOnly Bool Search in favorites only (default false)
lastOpenedDate Bool Search in last opened files only (default false)
types String optional JSON stringified array of the file types among ["file", "dir"] to return (example to only return the directories: ?types=["dir"]).

POST /file/search/shared-with-me/:fileId/:path

Name Type Description
query String Search query (used if query parameter q is not defined)
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/search/shared-with-me/587ca29dd564001b7cfc1190/sharedfolder?q=*.fbx'
Success-Response:
HTTP/1.1 200 OK
[
     {
         "id":"587ca29dd564001b7cfc1196",
         "privateShareFileId":"587ca29dd564001b7cfc1190",
         "type":"file",
         "parent":"/sharedfolder/",
         "path":"/sharedfolder/file1.fbx",
         "name":"file1.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converted",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"001b7cfc1196587ca29dd564"
     },
     {
         "id":"587ca29dd564001b7cfc1196",
         "privateShareFileId":"587ca29dd564001b7cfc1190",
         "type":"file",
         "parent":"/sharedfolder/",
         "path":"/sharedfolder/file2.fbx",
         "name":"file2.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converting",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"001b7cfc1196587ca29dd564"
     }
]

Success 200

Name Type Description
id String File id
privateShareFileId String File id of the root shared file or directory.
type String File type (can be either dir or file).
parent String File parent path.
name String File name.
path String File complete path.
state String File state (can be one of none, queued, converting, 'copying', converted, inError)
created Number File creation time.
updated Number File update time.
size Number File size (in bytes).
owner Number File owner.
user Number File user.

Update an existing file

Upload a new version of a file. The file passed must have the same name as the original file.

GET /file/update-file/?path=:path

Name Type Description
path String Path of the folder where the file should be uploaded.

POST /file/update-file/?path=:path

Name Type Description
file File File to upload, should have the same name as the original file you are updating.
Example usage:
curl -X POST 'https://smartshape.io/file/update-file/?p=/path/to/folder' \
     -H 'Authorization: Bearer <auth_token>' \
     -F file=@/home/user/example/cubes.fbx
Success-Response:
HTTP/1.1 200 OK
{
   "success": true
   "fileId": "587ca29dd564001b7cfc1196"
 }

Success 200

Name Type Description
success. Boolean
fileId String Updated file id.

Update file attributes

Update file attributes (such as allowLivePublicMeetings).

Parameter /file/update/:fileId

Name Type Description
fileId String File id

POST /file/update/:fileId

Name Type Description
allowLivePublicMeetings Bool Allow public share viewers to connect to the live meeting on this file
lastConfigurationUsed Object Hashmap of users and the last configuration used on this file
Success-Response:
HTTP/1.1 200 OK
{
    "success":true,
    "data": {
         "id":"587ca29dd564001b7cfc1195",
         "type":"file",
         "parent":"/test/",
         "path":"/my/folder/file1.fbx",
         "name":"file1.fbx",
         "created":1484563101652,
         "updated":1484563101653,
         "size":123,
         "state": "converted",
         "owner":{"id": "4001b7cfc1190587ca29dd56", "username": "test"},
         "user":"4001b7cfc1190587ca29dd56",
         "allowLivePublicMeetings": true,
         "lastConfigurationUsed": {
             "8906e062924f5ee234eaf9f0": "5ee234eaf9f08906e062924f",
             "efc5fc01908f4540751ce1c5": "f4540751ce1c5efc5fc01908"
          }
     }
}

Success 200

Name Type Description
success Bool
data Object Updated file

Upload a file

Upload a file to a given path. Will fail if the file already exists or the directory is not found.

GET /file/upload/?path=:path&nodePuidAttributeKey=:nodePuidAttributeKey

Name Type Description
path String Path of the folder where the file should be uploaded.
nodePuidAttributeKey String optional Custom node PUID attribute key to use for this file.

POST /file/upload/?path=:path&nodePuidAttributeKey=:nodePuidAttributeKey

Name Type Description
file File File to upload.
Example usage:
curl -X POST -H 'Authorization: Bearer <auth_token>' -F file=@localfile.fbx 'https://smartshape.io/file/upload/?path=/path/to/folder'
Success-Response:
HTTP/1.1 200 OK
{
   "success": true
   "fileId": "587ca29dd564001b7cfc1196"
}

Success 200

Name Type Description
success Boolean
fileId String New file id.

Share

Check for rights on a guest share

Parameter /file/share/guest/check/:shareToken/:guestShareId

Name Type Description
shareToken String Public shareToken, coming from a public share
guestShareId String Id of the guest share to disable
Success-Response:
HTTP/1.1 200 OK
{
    "success":true,
    "data": {
        "nickname": "test4@smartshape.io",
        "email": "test4@smartshape.io"
    }
}

Success 200

Name Type Description
success Bool
data Object

Create a public share for a file

Parameter /file/share/public-share/:path

Name Type Description
path String Path of the file to share
Example usage:
curl -X POST -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/share/public-share/my/folder/file.fbx'
Success-Response:
HTTP/1.1 200 OK
{
    "success": true,
    "data": {
        "shareToken": "8f2890eb05"
    }
}

Success 200

Name Type Description
success Bool File id
data Object Data containing the shareToken of the shared file

Delete a guest share

Parameter /file/share/guest/:shareToken/:guestShareId

Name Type Description
shareToken String Public shareToken, coming from a public share
guestShareId String Id of the guest share to delete
Success-Response:
HTTP/1.1 200 OK
{
    "success":true
}

Success 200

Name Type Description
success Bool

Disable a guest share

A disabled guest share can be re-enabled by using the "Add a share guest" api point

Parameter /file/share/guest/disable/:shareToken/:guestShareId

Name Type Description
shareToken String Public shareToken, coming from a public share
guestShareId String Id of the guest share to disable
Success-Response:
HTTP/1.1 200 OK
{
    "success":true
}

Success 200

Name Type Description
success Bool

List guest shares

Parameter /file/share/guest/:shareToken

Name Type Description
shareToken String Public shareToken, coming from a public share
Success-Response:
HTTP/1.1 200 OK
{
    "success":true,
    "data": [
        {
            "id":"58a1c8fe44b9a71e61d30123"
            "email": "test3@smartshape.io",
            "file": "58a1c8fe44b9a71e61d30005",
            "enabled": true
        },
        {
            "id":"58a1c8fe44b9a71e61d30124"
            "email": "test4@smartshape.io",
            "file": "58a1c8fe44b9a71e61d30005",
            "enabled": false
        }
    ]
}

Success 200

Name Type Description
success Bool
data Object Guest shares

Remove a public share for a file

Parameter /file/share/public-share/:path

Name Type Description
path String Path of the file to share
Example usage:
curl -X DELETE -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/share/public-share/my/folder/file.fbx'
Success-Response:
HTTP/1.1 200 OK
{
    "success": true,
    "data": {
        "shareToken": ''
    }
}

Success 200

Name Type Description
success Bool File id
data Object

Share a file or directory with another user

To add a private share, you first need to add a contact (see account/contact/add documentation).

Parameter /file/share/user/:fileId

Name Type Description
fileId String ID of the file or directory to share

POST /file/share/user/:fileId

Name Type Description
contactId String ID of the Account to share the file or directory with
roles [String] Array of role ids that the user this file is shared with will be granted with when opening the shared file
Example usage:
curl -X POST \
  https://smartshape.io/file/share/user/5b598b6bd385ef76c8a0cc6e \
  -H 'Authorization: Bearer <auth_token>' \
  -d '{
       "email":"test2@smartshape.io",
       "roles":["5b598b6bd385ef76c8a0cc6f"]
  }'
'
Success-Response:
HTTP/1.1 200 OK
{
   "success": true,
   "url": 'https://smartshape.io/app/shared-file/5b3cd25522229a75567c687f/test.fbx'
 }

Success 200

Name Type Description
success Boolean
Error-Response:
HTTP/1.1 400 Bad request
{
    "status": 400,
    "title": "Bad Request",
    "detail": "File validation failed: roles: At least one provided role does not exist."
}
Error-Response:
HTTP/1.1 400 Bad request
{
    "status": 400,
    "title": "Bad Request",
    "detail": "File validation failed: roles: At least one or more role is not a valid Id."
}

Stop sharing a file with another user

Parameter /file/share/user/:fileId

Name Type Description
fileId String ID of the file or directory to stop sharing

POST /file/share/user/:fileId

Name Type Description
contactId String ID of the Account to stop sharing the file or directory with
Example usage:
curl -X DELETE -H 'Authorization: Bearer <auth_token>' -F "contactId=5b598b6bd385ef76c8a0cc6f" 'https://smartshape.io/file/share/user/587ca29dd564001b7cfc1196'
Success-Response:
HTTP/1.1 200 OK
{
   "success": true
 }

Success 200

Name Type Description
success Boolean

Trigger

Create a new trigger

Parameter /file/trigger/:file

Name Type Description
file String File id

POST /file/trigger/:file

Name Type Description
type String Type of the Trigger.
Possible values:
- portal: Entering the shape of the Trigger will teleport the user in another file (opening the other file and positioning the camera to where it was in the previous file).
shape Object Description of the shape of the Trigger.
shape.type String Type of shape of the Trigger.
Possible values:
- box: Box.
shape.data [Number] Coordinates of the shape of the Trigger.
Possible values:
- If shape.type == "box": [maxX, maxY, maxZ, minX, minY, minZ].
data Object Additional data that customizes the behavior of the Trigger once the user enters it.
data.fileId String ID of the File to teleport to.
data.configurationId String ID of the Configuration to use in the new file.
data.keepConfiguration Bool optional If set to true, when switching to the new file, try to load the Configuration that has the same name as the currently active one. If not set, use data.configurationId.
Example usage:
curl -X POST \
    -H 'Authorization: Bearer <auth_token>' \
    -H 'Content-Type: application/json' \
    'https://smartshape.io/file/trigger/5e9da9000df42d071c876370/' \
    -d '
    {
        "name":"To next section",
        "type":"portal",
        "shape": {
            "type": "box",
            "data": [175.0, 11.5, 19.5, 124.6, 8.5, -19.5]
        },
         "data": {
            "fileId": "5964ef71a9ce892baceaaf34",
            "configurationId": "58a1c8fe44b9a71e61d30089"
        }
    }'
Success-Response:
HTTP/1.1 200 OK
{
    "data": {
        "type": "trigger",
        "attributes": {
            "file": "59649f408a80401d4d98a7ae",
            "type": "portal",
            "shape": {
                "type": "box",
                "data": [
                    175,
                    11.5,
                    19.5,
                    124.6,
                    8.5,
                    -19.5
                ]
            },
            "data": {
                "fileId": "5964ef71a9ce892baceaaf34",
                "configurationId": "58a1c8fe44b9a71e61d30089"
            },
            "_id": "596dcda0a394bf23b9354ec9"
        }
    }
}

Success 200

Name Type Description
data Object Newly created trigger

Delete a trigger

Delete a trigger of a specific file.

Parameter /file/trigger/:file/:trigger

Name Type Description
file String File id.
trigger String Trigger id.
Example usage:
curl -X DELETE -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/trigger/59649f408a80401d4d98a7ae/596e0c44a394bf23b9354ee4'
Success-Response:
HTTP/1.1 200 OK
{
   "success": true,
   "count": 1
}

Success 200

Name Type Description
success Boolean
count Number Number of deleted element(s).

List public shared file triggers

List all triggers related to a public shared file

Parameter /file/trigger/:shareToken

Name Type Description
shareToken String Public share token
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/trigger/ec8fbd631a/'
Success-Response:
HTTP/1.1 200 OK
{
     "success": true,
     "data": [
         {
             "_id": "596e0c44a394bf23b9354ee4",
             "file": "59649f408a80401d4d98a7ae",
             "type": "portal",
             "shape": {
                 "_id": "596e1360a394bf23b9354eea",
                 "data": [
                     175,
                     11.5,
                     19.5,
                     124.6,
                     8.5,
                     -19.5
                 ],
                 "type": "box"
             },
             "data": {
                 "configurationId": "58a1c8fe44b9a71e61d30089",
                 "fileId": "5964ef71a9ce892baceaaf34"
             }
         }
     ]
}

Success 200

Name Type Description
success Boolean
data Object JSON stringified triggers related to the public shared file.

List triggers

List all triggers related to a file

Parameter /file/trigger/:file

Name Type Description
file String File id
Example usage:
curl -X GET -H 'Authorization: Bearer <auth_token>' 'https://smartshape.io/file/trigger/59649f408a80401d4d98a7ae/'
Success-Response:
HTTP/1.1 200 OK
{
     "success": true,
     "data": [
         {
             "_id": "596e0c44a394bf23b9354ee4",
             "file": "59649f408a80401d4d98a7ae",
             "type": "portal",
             "shape": {
                 "_id": "596e1360a394bf23b9354eea",
                 "data": [
                     175,
                     11.5,
                     19.5,
                     124.6,
                     8.5,
                     -19.5
                 ],
                 "type": "box"
             },
             "data": {
                 "configurationId": "58a1c8fe44b9a71e61d30089",
                 "fileId": "5964ef71a9ce892baceaaf34"
             }
         }
     ]
}

Success 200

Name Type Description
success Boolean
data [Object] Triggers related to the file.

April 27, 2023 April 27, 2023