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

Headers

Accept: application/json
Content-Type: application/json
Access-Token: cd687de2dcac9787bb3b154f58ee3ad188263007a48dd40cd7783866dcbf49ad$$8nsTsbzi5m5F69h+JbzSIa9fUCD20hzu5S+L8NGwW6S39pAKDrjyc3XibA==--mPgYX0gJJiFwWXfo--iUbNglFdH9SSL9b1xgo+SA==
Api-Key: 98DrSm8AVSMK3tTd

Body

{
  "scene_version": {
    "scenegraph_key": "AqujExcKTpPzarnmBgycC7oz",
    "thumbnail_key": "PgnhuS5vo6ZLAD18YvSoGnCm",
    "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-06-01T21:44:48.330Z",
    "updated_at": "2020-06-01T21:44:48.330Z",
    "version_number": 3,
    "parent_version_number": 1,
    "metadata": {
      "anIntValue": 2,
      "aFloatValue": 2.4,
      "aStringValue": "value",
      "aBooleanValue": true
    },
    "uid": "jzYvmrhb",
    "scene_uid": "gDhJvDMC",
    "scenegraph_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBckVCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--d8208a9fdd9a5a02793a1192ada23e4fe32668e2/test.json",
    "thumbnail_url": "http://localhost:3002/rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBckFCIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f8bc06289e8572430d199a5ce61533a028f45481/test.json"
  },
  "success": true
}