3.2 Making API Requests
How to call the JSONAir API endpoints.
All endpoints below require a valid JWT in the Authorization header. See 3.1 Authentication for how to obtain one.
Get Configuration Data
Retrieves the stored configuration for a given type and name.
Endpoint: GET /api/v1/jsonair/config
Request body:
{
"type": "myapp",
"name": "prod.yaml",
"decode": false
}type
string
Yes
Configuration type (e.g. suricata, nginx, myapp)
name
string
Yes
Configuration name (e.g. prod.yaml, settings.json)
decode
bool
No
If true, the server Base64-decodes the data before returning it. Defaults to false.
Successful response (200 OK):
When decode is false (default), the raw Base64-encoded configuration data is returned as plain text:
eyJrZXkiOiJ2YWx1ZSJ9When decode is true, the decoded configuration is returned directly:
Not found (404):
Get the Reload Key
Retrieves the reload field for a given configuration. This can be used by agents to determine whether to trigger a reload of the consuming application.
Endpoint: GET /api/v1/jsonair/reload
Request body:
Successful response (200 OK):
Get the Debug Level
Retrieves the debug field for a given configuration. Agents can use this to dynamically adjust their logging verbosity without restarting.
Endpoint: GET /api/v1/jsonair/debug
Request body:
Successful response (200 OK):
Error Responses
400 Bad Request
Request body could not be read
401 Unauthorized
Missing, expired, or invalid JWT
404 Not Found
No configuration found for the given type/name/uuid
429 Too Many Requests
Rate limit exceeded (auth endpoint only)
500 Internal Server Error
Unexpected server error
Last updated