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/bXdc5VnV/versions

Headers

Accept: application/json
Content-Type: application/json
Access-Token: 3db2586f8db32a7b0c76374e6c5eb78d07691628969b1283f6e8e273a59a6ed3$$z3JsP1uMfEj/4AX4XpkqAA8xfTQxjDnLaj+67tGL3V4tT9LNzRatk2SvQw==--oH9+ttQQyLuOOni8--LmJKgo5VPAksQpYWUsKuJg==
Api-Key: dygoPectk1E8J8pH

Body

{
  "scene_version": {
    "scenegraph_key": "ZduTnekqnW3cRXFjhPiBoTmF",
    "thumbnail_key": "EWu4fWiSMMAYnREpjKMCW6Ls",
    "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": "2019-11-20T21:13:21.800Z",
    "updated_at": "2019-11-20T21:13:21.800Z",
    "version_number": 3,
    "parent_version_number": 1,
    "metadata": {
      "anIntValue": 2,
      "aFloatValue": 2.4,
      "aStringValue": "value",
      "aBooleanValue": true
    },
    "uid": "tSGUGGfp",
    "scene_uid": "bXdc5VnV",
    "scenegraph_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbFlUIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--02f7f960e167b9a9ef1471caf186bbc77e283569/test.json",
    "thumbnail_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbFVUIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e0e6551f5525ed50c32f2053e3b71e50d5680b60/test.json"
  },
  "success": true
}