The Category API allows you to manage item categories for your DayZ server instances. Categories are used to organize items in the game.
Note: All API requests require authentication. See the Authentication page for details.
Retrieve a paginated list of categories for a specific instance.
GET /api/instance/{instance_sid}/category
| Parameter | Type | Description |
|---|---|---|
instance_sid
|
string | The SID of the instance |
| Parameter | Type | Description |
|---|---|---|
page
|
integer | Page number for pagination (default: 1) |
amount
|
integer | Number of items per page (default: 30) |
like
|
string | Filter categories by name (partial match) |
{
"current_page": 1,
"data": [
{
"sid": "abc123",
"name": "Weapons"
},
{
"sid": "def456",
"name": "Clothing"
}
],
"first_page_url": "http://example.com/api/instance/xyz789/category?page=1",
"from": 1,
"last_page": 2,
"last_page_url": "http://example.com/api/instance/xyz789/category?page=2",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://example.com/api/instance/xyz789/category?page=1",
"label": "1",
"active": true
},
{
"url": "http://example.com/api/instance/xyz789/category?page=2",
"label": "2",
"active": false
},
{
"url": "http://example.com/api/instance/xyz789/category?page=2",
"label": "Next »",
"active": false
}
],
"next_page_url": "http://example.com/api/instance/xyz789/category?page=2",
"path": "http://example.com/api/instance/xyz789/category",
"per_page": 30,
"prev_page_url": null,
"to": 30,
"total": 45
}
Retrieve details of a specific category.
GET /api/instance/{instance_sid}/category/{category_sid}
| Parameter | Type | Description |
|---|---|---|
instance_sid
|
string | The SID of the instance |
category_sid
|
string | The SID of the category |
{
"id": 1,
"sid": "abc123",
"instance_id": 1,
"name": "Weapons",
"created_at": "2023-05-01T12:00:00.000000Z",
"updated_at": "2023-05-01T12:00:00.000000Z"
}
Create a new category for an instance.
POST /api/instance/{instance_sid}/category
| Parameter | Type | Description |
|---|---|---|
instance_sid
|
string | The SID of the instance |
| Parameter | Type | Required | Description |
|---|---|---|---|
name
|
string | Required | Name of the category |
{
"id": 1,
"sid": "abc123",
"instance_id": 1,
"name": "Weapons",
"created_at": "2023-05-01T12:00:00.000000Z",
"updated_at": "2023-05-01T12:00:00.000000Z"
}
Update an existing category.
PATCH /api/instance/{instance_sid}/category/{category_sid}
| Parameter | Type | Description |
|---|---|---|
instance_sid
|
string | The SID of the instance |
category_sid
|
string | The SID of the category |
| Parameter | Type | Required | Description |
|---|---|---|---|
name
|
string | Optional | New name of the category |
{
"id": 1,
"sid": "abc123",
"instance_id": 1,
"name": "Firearms",
"created_at": "2023-05-01T12:00:00.000000Z",
"updated_at": "2023-05-01T12:30:00.000000Z"
}
Delete a category.
Warning: Deleting a category will also delete all classnames associated with it. This action cannot be undone.
DELETE /api/instance/{instance_sid}/category/{category_sid}
| Parameter | Type | Description |
|---|---|---|
instance_sid
|
string | The SID of the instance |
category_sid
|
string | The SID of the category |
{
"result": true
}