PUT content/{contentId}create

Related

PUT content/{contentId} is a dual-purpose API method. This page is for content creation; for content update, see this page.

If PUT is called with a contentId that does not yet exist, we assume the user intended to create a new content item. The request body for this case is different from the update case.

Example

PUT /api/v1/content/fc20ab3a-5dfe-40ac-b75a-b1d087083e15 HTTP/1.1
Authorization: Bearer ...
Content-Type: application/json

{
  "name": "Test Content",
  "description": "This is some new content.",
  "screenshotUris": [
    "protected/us-west-2:12345678-0000-0000-0000-123456789abc/03d1ac5e-b426-4612-8781-dc07900fd381.jpg"
  ],
  "type": "game",
  "tags": [
    "difficult",
    "platformer",
    "horror"
  ],
  "revisionId": "b07797fc-2f63-4a35-8c3c-319f844681f3",
  "revisionDescription": "First pooooost!",
  "version": "1.0",
  "entity": {
    "entityId": "15ebefd5-ed62-4a3a-b571-2e5616d6d97a",
    "revisionId": "66e717df-1405-4c15-96b4-b5c28ce59f7a",
    "path": "protected/us-west-2:12345678-0000-0000-0000-123456789abc/15ebefd5-ed62-4a3a-b571-2e5616d6d97a/66e717df-1405-4c15-96b4-b5c28ce59f7a.entity"
  },
  "originating": [
    {
      "entityId": "c865ef34-60bb-41bf-827a-41cc0a58bd15",
      "revisionId": "098b3d81-6d35-4b58-8773-2a6e893b885e",
      "path": "protected/us-west-2:12345678-0000-0000-0000-123456789abc/c865ef34-60bb-41bf-827a-41cc0a58bd15/098b3d81-6d35-4b58-8773-2a6e893b885e.entity"
    },
    {
      "entityId": "e17df761-b27c-4176-820b-a30f1f81095a",
      "revisionId": "840fdeb0-a8e5-4449-a88c-222642a32053",
      "path": "protected/us-west-2:12345678-0000-0000-0000-123456789abc/e17df761-b27c-4176-820b-a30f1f81095a/840fdeb0-a8e5-4449-a88c-222642a32053.entity"
    }
  ],
  "using": [
    {
      "entityId": "7b2f0e9f-59e8-4199-8e16-c541eca12ad9",
      "revisionId": "448d8f00-8b04-45a3-8169-63bb552cbaac"
    },
    {
      "entityId": "654dde77-579f-4567-9d3f-1f6bdac578e8",
      "revisionId": "7d8bbdc5-3a8e-4665-9c11-0856db786887"
    }
  ],
  "packagesOriginating": [
    {
      "id": "f90d1311-a9e6-400f-bade-b30aa5e1f12f",
      "win64": "protected/us-west-2:12345678-0000-0000-0000-123456789abc/f90d1311-a9e6-400f-bade-b30aa5e1f12f/win64.package",
      "osx64": "protected/us-west-2:12345678-0000-0000-0000-123456789abc/f90d1311-a9e6-400f-bade-b30aa5e1f12f/osx64.package",
      "linux64": "protected/us-west-2:12345678-0000-0000-0000-123456789abc/f90d1311-a9e6-400f-bade-b30aa5e1f12f/linux64.package"
    }
  ],
  "packagesUsing": [
    "3d5db494-8b78-45bb-9ba1-bf0f3da12551"
  ]
}
----------------------------------------
HTTP/1.1 204 No Content

Security

Authentication is required for content creation. There are no other restrictions.

URL Parameters

NameDescriptionValue
contentIdthe ID of the content as a GUID with dashesstring

Request Body

NameDescriptionValue
namethe name of the contentstring
descriptionthe description of the contentstring
screenshotUrisan array of screenshots, as paths relative to the media S3 bucket; the first screenshot is assumed to be the primary imagearray of string
typethe category of the content item
one of:
  • game
  • asset
  • avatar_box
  • gameplay_box
  • scene_box
tagsthe tags to associate with this content optionalarray of string
revisionIdthe ID of the initial revision as a GUID with dashesstring
revisionDescriptionthe change notes of the initial revisionstring
versionthe version of the initial revision; there are no restrictions on the value used herestring
entitythe core entityobject; see Entity
originatingnon-core entities (dependencies) that are being uploaded for the first time with this contentobject; see Entity
usingnon-core entities (dependencies) that pre-existed this contentobject; see EntityReference
packagesOriginatingpackage dependencies (asset bundles) that are being uploaded for the first time with this content optionalobject; see Package
packagesUsingpackage dependencies (asset bundles) that pre-existed this content, as an array of package IDs optionalarray of string

Entity

NameDescriptionValue
entityIdthe entity ID as a GUID with dashesstring
revisionIdthe entity's revision ID as a GUID with dashesstring
paththe path to the entity file, relative to the content S3 bucketstring

EntityReference

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

Package

NameDescriptionValue
idthe package ID as a GUID with dashesstring
{platform}the path to the package file for this platform, as a path relative to the content S3 bucket; there should be one such key for each platform supported,
one of:
  • win64
  • osx64
  • linux64
; the server may reject packages that do not support all platforms
string

Response

Successful responses are code 204. Error responses are standard.

Response Body

NONE