Documentation
Worlds

Create world asset

Register a new asset slot for a world. Optionally provide an external URL; otherwise upload a file to the returned slot.

PUT
/api/worlds/{id}/assets

Authorization

bearer
AuthorizationBearer token

User session token. Obtained from POST /api/auth/login.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://loading/api/worlds/string/assets" \  -H "Content-Type: application/json" \  -d '{    "version": 1,    "engine": "unity",    "platform": "windows"  }'
{
  "data": {
    "id": 1,
    "version": 1,
    "engine": "unity",
    "platform": "windows",
    "is_empty": false,
    "url": null,
    "hash": null,
    "size": null,
    "mods": [],
    "features": [],
    "uploader": null
  },
  "error": null,
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}