Scenes

After creating an empty scene record successfully, a scene with a single version will exist on the server. In that case, you may submit a request to this endpoint to fill in the missing details with information about files which have been uploaded successfully. You are not however permitted to overwrite the scenegraph. If you would like to overwrite the scenegraph, instead create a new version. (Note that version creation does allow specification of the scenegraph and thumbnail at the time of upload.)

PUT /scenes/:uid/versions/:version_number

Endpoint

PUT /api/v2/scenes/:scene_uid/versions/:version_number

Parameters

Name Description type
scene_uid required Scene uid string
version_number required Version number integer
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

Request

Route

PUT /api/v2/scenes/ZVYh22DM/versions/1

Headers

Accept: application/json
Content-Type: application/json
Access-Token: f5bfbbdd282ddcfa2e1b0a5a8eab1451d83270d109b53c69f5abfa1e46892e3a$$P+JCf0aA3a5UoxrpM308JBIqq/Z0jZL5DFHRlJ9weA5pFzWRo8xqvM9qGw==--LOSyQTw6Xai8qmvg--YWM+od1XRK1NHVu1Io6atw==
Api-Key: rt4qabuKiTEfQJi5

Body

{
  "scene_version": {
    "scenegraph_key": "17jUyfvWzx8Vf4oFnRAykRzR",
    "thumbnail_key": "dBWYEFUvcAZbBJgoyhUAZ6S8"
  }
}

Response

Status

200

Headers

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

Body

{
  "scene_version": {
    "created_at": "2019-08-05T22:48:36.696Z",
    "version_number": 1,
    "parent_version_number": -1,
    "uid": "oK3UiRJN",
    "scene_uid": "ZVYh22DM",
    "scenegraph_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBc2tGIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--9d366d902d07592ce329bbb5df1ada283f369b39/test.json",
    "thumbnail_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBc2dGIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--499641066ff09803a8bb44355bf33b60085363e0/test.json"
  },
  "success": true
}