Configuration API¶
A deployment can be configured end to end over the API, exactly as in the dashboard: firewall, tool-scan and model configurations are created, read, changed and deleted, and analytics records can be requested, so a scheduled job works with the same data the dashboard shows. A change goes in through the API, so it can be reviewed and released like any other change.
Every call needs a Configuration management (admin) key, generated in the dashboard under
API keys and sent in the Authorization header. An admin key cannot
call the Firewall API, and a Firewall API key cannot call these endpoints.
Endpoints¶
| Method | Endpoint | Purpose |
|---|---|---|
GET |
/api/v1/config/firewall |
List firewall configurations (chat inbound and chat outbound). |
POST |
/api/v1/config/firewall |
Create a firewall configuration. |
GET |
/api/v1/config/firewall/{uuid} |
Get one firewall configuration. |
PUT |
/api/v1/config/firewall/{uuid} |
Replace a firewall configuration. |
DELETE |
/api/v1/config/firewall/{uuid} |
Delete a firewall configuration. |
GET |
/api/v1/config/tool-scan |
List tool-scan configurations (tool call and tool response). |
POST |
/api/v1/config/tool-scan |
Create a tool-scan configuration. |
GET |
/api/v1/config/tool-scan/{uuid} |
Get one tool-scan configuration. |
PUT |
/api/v1/config/tool-scan/{uuid} |
Replace a tool-scan configuration. |
DELETE |
/api/v1/config/tool-scan/{uuid} |
Delete a tool-scan configuration. |
GET |
/api/v1/config/model |
List model configurations. |
POST |
/api/v1/config/model |
Create a model configuration. |
GET |
/api/v1/config/model/{uuid} |
Get one model configuration. |
PUT |
/api/v1/config/model/{uuid} |
Replace a model configuration. |
DELETE |
/api/v1/config/model/{uuid} |
Delete a model configuration. |
GET |
/api/v1/config/firewall/insights/{direction}/records |
List analytics records. |
POST |
/api/v1/policy-as-code/apply |
Experimental. Apply a declarative configuration document. |
GET |
/api/v1/policy-as-code/export |
Experimental. Export the current configuration as a document. |
The bodies are described under Configuration Models.
JSON or YAML¶
Every endpoint takes and returns JSON by default. Send a YAML body with
Content-Type: application/yaml, and ask for a YAML response with Accept: application/yaml.
Status codes¶
| Code | When |
|---|---|
200 |
The call succeeded. The body carries status and the record or records under data. |
204 |
The call succeeded with nothing to return. |
403 |
The key is missing or unknown, or it is a Firewall API key. |
413 |
The body is larger than 1 MiB. |
422 |
The body is not valid JSON or YAML, or a configuration is invalid; detail says why. |
| other | An error from the configuration store keeps its status code, for example 404 for an unknown UUID. |