Wiki Navigation

API Reference
CRUD Operations

Spawnable Types API

Manage spawnable types configuration (cfgspawnabletypes.xml). Control cargo and attachment presets for items that spawn with additional loot or attachments.

Authentication required: All endpoints require a valid Bearer token. See Authentication for details.

GET

List Spawnable Types

Retrieve a paginated list of spawnable types for a specific instance.

Endpoint

GET /api/instance/{instance_sid}/spawnable-type

Parameters

instance_sid
string required

The SID of the instance (URL parameter)

page integer

Page number for pagination. Defaults to 1.

like string

Filter spawnable types by classname using partial match.

Response

{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "sid": "abc123xyz789",
      "classname_id": 42,
      "hoarder": 0,
      "damage_min": 0.0,
      "damage_max": 0.7,
      "children_count": 2,
      "classname": {
        "id": 42,
        "name": "AKM"
      }
    }
  ],
  "per_page": 30,
  "total": 15
}
GET

Get Spawnable Type

Retrieve details of a specific spawnable type including its children (cargo/attachments) and items.

Endpoint

GET /api/instance/{instance_sid}/spawnable-type/{spawnable_type_sid}

URL Parameters

instance_sid required

The SID of the instance

spawnable_type_sid required

The SID of the spawnable type

Response

{
  "id": 1,
  "sid": "abc123xyz789",
  "classname_id": 42,
  "hoarder": 0,
  "damage_min": 0.0,
  "damage_max": 0.7,
  "children_count": 2,
  "classname": {
    "id": 42,
    "name": "AKM"
  },
  "children": [
    {
      "id": 1,
      "sid": "child123",
      "type": "ATTACH",
      "chance": 0.5,
      "preset": null,
      "items": [
        {
          "id": 1,
          "classname_id": 100,
          "chance": 0.3,
          "classname": {
            "id": 100,
            "name": "AK_Suppressor"
          }
        }
      ]
    }
  ]
}
POST

Create Spawnable Type

Create a new spawnable type for an instance.

Endpoint

POST /api/instance/{instance_sid}/spawnable-type

Request Body

classname_id
integer required

ID of the classname this spawnable type is for

hoarder boolean

Whether item is a hoarder container

damage_min float

Minimum damage value (0.0 - 1.0)

damage_max float

Maximum damage value (0.0 - 1.0)

PATCH

Update Spawnable Type

PATCH /api/instance/{instance_sid}/spawnable-type/{spawnable_type_sid}

Update an existing spawnable type. Include only fields to change.

DELETE

Delete Spawnable Type

DELETE /api/instance/{instance_sid}/spawnable-type/{spawnable_type_sid}

Permanently delete a spawnable type and its children from the instance.