Scenes

POST /scenes

Since uploads typically take a non-negligible amount of time, we only permit empty scene creation with the expectation that the missing uploads for the initial version are filled in after the fact. This is intended to ease the burden of bookkeeping on the part of the developer since large uploads very frequently do not complete as a result of end-users terminating a session before completion. The intended process is:

  1. Submit an empty scene to /scenes
  2. Receive a response with a scene uid and an initial version_number
  3. Associate the files on the device with the returned scene uid and version_number
  4. Upload files to S3 via the POST /direct_uploads endpoint
  5. Update the version created in step 2 to fill in the pending scenegraph_key and thumbnail_key

Endpoint

POST /api/v2/scenes

Request

Route

POST /api/v2/scenes

Headers

Accept: application/json
Content-Type: application/json
Access-Token: 7fc4335e62cf345a7a94e8a6c614fcfda925c16d6d4138e108a739057a2eb3aa$$PguioqC+cEkZ+WVI419yw3opfa9IKMeSUSP2W7moplvGhw3xaW6+8BI3cQ==--Ucvz4iS5rcAEJOQ2--rN6/QptkITRl5TLiCSRDYg==
Api-Key: 3QvYdCia9z9p77ca

Response

Status

201

Headers

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

Body

{
  "scene": {
    "created_at": "2019-08-05T22:48:37.867Z",
    "uid": "smd6Kzvx",
    "team_uid": "fa61ThMb",
    "scene_versions": [
      {
        "created_at": "2019-08-05T22:48:37.870Z",
        "version_number": 1,
        "parent_version_number": -1,
        "uid": "rVkCqW1Y",
        "scene_uid": "smd6Kzvx",
        "scenegraph_url": null,
        "thumbnail_url": null
      }
    ]
  },
  "success": true
}