API Overview
This guide offers a basic overview and examples to help you use the API. For detailed technical information, please refer to the Command and Control (C2) server documentation.
By default, the C2 server provides the API in two formats:
If you have tuoni installed on the current machine:
- OpenAPI JSON: https://localhost:8443/docs/api
- Swagger UI: https://localhost:8443/docs/ui
If you have Tuoni installed on a remote machine, replace local-c2 with the remote IP or hostname:
- OpenAPI JSON:
https://{remote-ip-or-domain}:8443/docs/api - Swagger UI:
https://{remote-ip-or-domain}:8443/docs/ui
API Versions
The v2 endpoints add paged and eventful representations for selected resources. Existing v1 endpoints remain supported and can continue to be used by current integrations. Each resource page identifies which version an operation uses.
Pagination and Sorting
Paged v2 endpoints use zero-based page numbers. Unless an endpoint says otherwise, page defaults to 0, and pageSize defaults to 100, with an allowed range of 1 to 1000.
Every paged response contains:
| Field | Type | Description |
|---|---|---|
itemCount |
integer | Number of items in this page |
page |
integer | Zero-based page number returned |
pageSize |
integer | Requested page size |
totalCount |
integer | Total number of matching items |
totalPages |
integer | Total number of matching pages |
hasMorePages |
boolean | Whether another page follows this one |
items |
array | Resource records in the current page |
Sorting values use FIELD[:ASC|DESC]. Repeat the sort query parameter to apply multiple criteria in order:
Each endpoint documents its supported sort fields.
Eventful Responses and Audit Actors
Eventful v2 resources include createEvent and lastUpdateEvent. Each contains the event id (UUID), eventType, time (date-time), and actor, providing provenance for creation and the latest update.
The actor's actorType discriminator identifies one of these variants:
actorType |
Source | Additional fields |
|---|---|---|
api |
Authenticated API user | username, endpoint |
plugin |
Server plugin | plugin metadata containing id, version, and type |
script |
Server-side script | scriptFilePath |
server |
Tuoni server | reason |
unknown |
Unidentified source | No variant-specific fields |