POST content/upload

Initiate an upload session to either create or revise a content item. Provide the listing info and the files info, and in return get the upload session ID as well as the upload manifest.

Example

POST /api/v1/content/upload HTTP/1.1
Content-Type: application/json
Authorization: Bearer ...

{
  "op": "create",
  "identityId": "us-west-2:f1e1f48a-1b87-453a-b0ff-be99defd007d",
  "contentId": "fc20ab3a-5dfe-40ac-b75a-b1d087083e15",
  "revisionId": "b07797fc-2f63-4a35-8c3c-319f844681f3",
  "type": "game",
  "name": "Test Content",
  "description": "This is some new content.",
  "tags": [
    "difficult",
    "platformer",
    "horror"
  ],
  "revisionDescription": "First pooooost!",
  "version": "1.0",
  "screenshots": [
    "03d1ac5e-b426-4612-8781-dc07900fd381.jpg",
    "9553fc73-0e3b-4279-a393-35646a42d78c.jpg",
    "a32dd360-94f7-4f77-8152-f21e498c4afe.jpg"
  ],
  "entities": [
    {
      "entityId": "15ebefd5-ed62-4a3a-b571-2e5616d6d97a",
      "revisionId": "66e717df-1405-4c15-96b4-b5c28ce59f7a"
    },
    {
      "entityId": "c865ef34-60bb-41bf-827a-41cc0a58bd15",
      "revisionId": "098b3d81-6d35-4b58-8773-2a6e893b885e"
    },
    {
      "entityId": "e17df761-b27c-4176-820b-a30f1f81095a",
      "revisionId": "840fdeb0-a8e5-4449-a88c-222642a32053"
    },
    {
      "entityId": "7b2f0e9f-59e8-4199-8e16-c541eca12ad9",
      "revisionId": "448d8f00-8b04-45a3-8169-63bb552cbaac"
    },
    {
      "entityId": "654dde77-579f-4567-9d3f-1f6bdac578e8",
      "revisionId": "7d8bbdc5-3a8e-4665-9c11-0856db786887"
    }
  ],
  "packages": [
    "f90d1311-a9e6-400f-bade-b30aa5e1f12f",
    "3d5db494-8b78-45bb-9ba1-bf0f3da12551"
  ]
}
----------------------------------------
HTTP/1.1 200 OK
Content-Type: application/json

{
  "uploadId": "c1a50a88-0441-4c71-b581-0207f4906c49",
  "uploadManifest": {
    "screenshots": [
      {
        "filename": "a32dd360-94f7-4f77-8152-f21e498c4afe.jpg",
        "path": "s3://prod.media.theendlessmission.com/upload/us-west-2:12345678-0000-0000-0000-123456789abc/c1a50a88-0441-4c71-b581-0207f4906c49/screenshots/a32dd360-94f7-4f77-8152-f21e498c4afe.jpg"
      }
    ],
    "entities": [
      {
        "entityId": "15ebefd5-ed62-4a3a-b571-2e5616d6d97a",
        "revisionId": "66e717df-1405-4c15-96b4-b5c28ce59f7a",
        "path": "s3://prod.content.theendlessmission.com/upload/us-west-2:12345678-0000-0000-0000-123456789abc/c1a50a88-0441-4c71-b581-0207f4906c49/entities/15ebefd5-ed62-4a3a-b571-2e5616d6d97a/66e717df-1405-4c15-96b4-b5c28ce59f7a.entity"
      },
      {
        "entityId": "c865ef34-60bb-41bf-827a-41cc0a58bd15",
        "revisionId": "098b3d81-6d35-4b58-8773-2a6e893b885e",
        "path": "s3://prod.content.theendlessmission.com/upload/us-west-2:12345678-0000-0000-0000-123456789abc/c1a50a88-0441-4c71-b581-0207f4906c49/entities/c865ef34-60bb-41bf-827a-41cc0a58bd15/098b3d81-6d35-4b58-8773-2a6e893b885e.entity"
      },
      {
        "entityId": "e17df761-b27c-4176-820b-a30f1f81095a",
        "revisionId": "840fdeb0-a8e5-4449-a88c-222642a32053",
        "path": "s3://prod.content.theendlessmission.com/upload/us-west-2:12345678-0000-0000-0000-123456789abc/c1a50a88-0441-4c71-b581-0207f4906c49/entities/e17df761-b27c-4176-820b-a30f1f81095a/840fdeb0-a8e5-4449-a88c-222642a32053.entity"
      }
    ],
    "packages": [
      {
        "packageId": "f90d1311-a9e6-400f-bade-b30aa5e1f12f",
        "win64": "s3://prod.content.theendlessmission.com/upload/us-west-2:12345678-0000-0000-0000-123456789abc/c1a50a88-0441-4c71-b581-0207f4906c49/packages/f90d1311-a9e6-400f-bade-b30aa5e1f12f/win64.package",
        "osx64": "s3://prod.content.theendlessmission.com/upload/us-west-2:12345678-0000-0000-0000-123456789abc/c1a50a88-0441-4c71-b581-0207f4906c49/packages/f90d1311-a9e6-400f-bade-b30aa5e1f12f/osx64.package",
        "linux64": "s3://prod.content.theendlessmission.com/upload/us-west-2:12345678-0000-0000-0000-123456789abc/c1a50a88-0441-4c71-b581-0207f4906c49/packages/f90d1311-a9e6-400f-bade-b30aa5e1f12f/linux64.package"
      }
    ]
  }
}

Security

Authentication is required.

URL Parameters

NONE

Query Parameters

NONE

Request Body

NameDescriptionValue
opthe intended operation for this upload
one of:
  • create
  • revise
identityIdthe user's AWS identity ID (obtained from AWS Cognito credentials)string
contentIdthe content identifier, as a GUID with dashesstring
revisionIdthe revision identifier, as a GUID with dashesstring
typethe category of the content item
one of:
  • game
  • asset
namethe name of the contentstring
descriptionthe description of the contentstring
tagsthe tags to associate with this content, which must come from the official tag setarray of string
revisionDescriptionthe change notes for this iterationstring
versionthe version number for this iterationstring
screenshotsall screenshots to use, as a unique file name with extension (must have at least one)array of string
entitiesall entities for this content (must have at least one)array of Entity
packagesall package IDs for this content, as GUIDs with dashesarray of string

Entity

NameDescriptionValue
entityIdthe entity ID as a GUID with dashesstring
revisionIdthe entity's revision ID as a GUID with dashesstring

Response

Successful responses are code 200 with the response body below.

Failure cases:

Response Body

NameDescriptionValue
uploadIdthe ID for this upload session, as a GUID with dashesstring
uploadManifesta description of the files that should be uploaded before this session is finalizedsee upload manifest