Scenes

POST /scenes/:uid/versions

Endpoint

POST /api/v2/scenes/:scene_uid/versions

Parameters

Name Description type
scene_uid required Scene uid string
scene_version[scenegraph_key] required Direct upload file key string
scene_version[thumbnail_key] Direct upload thumbnail key string
scene_version[parent_version_number] Parent version number integer
scene_version[metadata] Metadata object

Request

Route

POST /api/v2/scenes/2d61Jit5/versions

Headers

Accept: application/json
Content-Type: application/json
Access-Token: 44bd0427692d04abbe6d92713aadb37c193418f9494645b59b8689b526beefab$$9L86ZTwVwrW7NyZX+0iWlz9AafGwCfsTskIaoAtumh8Psp1I/IlidAnUSQ==--/GkVxQe7GhGjGi0j--zpqhxjadXVPDMlSqFlBQXw==
Api-Key: aWLUTdPW4o57CXhc

Body

{
  "scene_version": {
    "scenegraph_key": "4gnip1AgEmgCcRQ54ELWbCoP",
    "thumbnail_key": "39iGwBve74Fhizhq6hWwa1Fx",
    "parent_version_number": 1,
    "metadata": {
      "anIntValue": 2,
      "aFloatValue": 2.4,
      "aStringValue": "value",
      "aBooleanValue": true
    }
  }
}

Response

Status

201

Headers

Content-Type: application/json; charset=utf-8

Body

{
  "scene_version": {
    "created_at": "2020-01-15T19:56:07.708Z",
    "updated_at": "2020-01-15T19:56:07.708Z",
    "version_number": 3,
    "parent_version_number": 1,
    "metadata": {
      "anIntValue": 2,
      "aFloatValue": 2.4,
      "aStringValue": "value",
      "aBooleanValue": true
    },
    "uid": "xw7jpYpr",
    "scene_uid": "2d61Jit5",
    "scenegraph_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdkVFIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--71e9d2ff914a681f0581096a4b4dc69f507c617e/test.json",
    "thumbnail_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdkFFIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c6af2667531c82f922ee167aff6c59541eec48b6/test.json"
  },
  "success": true
}