Consul
Audit logs - Operator HTTP API
Enterprise
This feature requires Consul Enterprise(opens in new tab).
The /operator/audit endpoints provide tools to interact with Consul's audit
logging subsystem through Consul's HTTP API.
The audit logging functionality described here is available only in Consul Enterprise version 1.8.0 and later.
Refer to the audit logging documentation for workflow guidance and additional information.
Calculate data hash
This endpoint calculates the hash of the data used by the audit log hash function and salt.
| Method | Path | Produces |
|---|---|---|
POST | /operator/audit-hash | application/json |
The following table shows this endpoint's support for blocking queries, consistency modes, agent caching, and required ACLs.
| Blocking Queries | Consistency Modes | Agent Caching | ACL Required |
|---|---|---|---|
NO | none | none | operator:read |
The corresponding CLI command is consul operator audit hash.
JSON request body schema
Input(string: <required>)- Specifies the input string to hash.
Sample payload
{
"Input": "test"
}
Sample request
$ curl \
--request POST \
--data @payload.json \
http://127.0.0.1:8500/v1/operator/audit-hash
Sample response
{
"Hash": "hmac_sha256:794c39dbc00d4714740199fe79982d02bbc5d303ab73149dfabc1244e3df3d4c"
}