Manage random preset configurations (cfgrandompresets.xml). Define reusable cargo and attachment presets that can be referenced by spawnable types.
Authentication required: All endpoints require a valid Bearer token. See Authentication for details.
Retrieve a paginated list of random presets for a specific instance.
GET /api/instance/{instance_sid}/random-preset
instance_sid
The SID of the instance (URL parameter)
page
integer
Page number for pagination. Defaults to 1.
like
string
Filter presets by name using partial match.
type
string
Filter by type: CARGO or ATTACHMENT.
{
"current_page": 1,
"data": [
{
"id": 1,
"sid": "preset123abc",
"name": "foodGeneral",
"type": "CARGO",
"chance": 0.5,
"instance_id": 1
},
{
"id": 2,
"sid": "preset456def",
"name": "rifleAttachments",
"type": "ATTACHMENT",
"chance": 0.3,
"instance_id": 1
}
],
"per_page": 30,
"total": 12
}
Retrieve details of a specific random preset including its child items.
GET /api/instance/{instance_sid}/random-preset/{random_preset_sid}
instance_sid
required
The SID of the instance
random_preset_sid
required
The SID of the random preset
{
"id": 1,
"sid": "preset123abc",
"name": "foodGeneral",
"type": "CARGO",
"chance": 0.5,
"instance_id": 1,
"children": [
{
"id": 1,
"parent_id": 1,
"classname_id": 50,
"chance": 0.3,
"classname": {
"id": 50,
"name": "Apple"
}
},
{
"id": 2,
"parent_id": 1,
"classname_id": 51,
"chance": 0.2,
"classname": {
"id": 51,
"name": "Pear"
}
}
]
}
Create a new random preset for an instance.
POST /api/instance/{instance_sid}/random-preset
name
Unique preset name identifier
type
CARGO or ATTACHMENT
chance
float
Spawn chance (0.0 - 1.0)
{
"name": "medicalSupplies",
"type": "CARGO",
"chance": 0.4
}
PATCH /api/instance/{instance_sid}/random-preset/{random_preset_sid}
Update an existing random preset. Include only fields to change.
DELETE /api/instance/{instance_sid}/random-preset/{random_preset_sid}
Permanently delete a random preset and its child items from the instance.