HashiCorp Vault Audit API

Audit device management

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /sys/audit List enabled audit devices · HashiCorp Vault List audit devices #
Ask an LLM
“Which audit devices are currently enabled in Vault?”
“What audit backends are writing logs right now?”
Tell an agent
List all enabled audit devices.
Show the audit device configuration.
PUT /sys/audit/{path} Enable an audit device · HashiCorp Vault Enable audit device #
Ask an LLM
“How do I start logging Vault audit events to a file?”
“Can I send audit logs to syslog or a socket instead of a file?”
Tell an agent
Enable an audit device of type {type} at {path}.
Mount audit device {path} as {type} with options {options}.
DELETE /sys/audit/{path} Disable an audit device · HashiCorp Vault Disable audit device #
Ask an LLM
“How do I stop an audit device from writing logs?”
“Can I disable an audit device by its path?”
Tell an agent destructive · confirm first
Disable the audit device at {path}.
Stop audit logging on device {path}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hvault:hvault-audit-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hvault-audit-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HashiCorp Vault Vault System Backend Audit API
  description: API for system-level operations in HashiCorp Vault including health checks, seal status, initialization, authentication management, secrets engine configuration, audit devices, policies, and general Vault configuration.
  version: '1.0'
  contact:
    name: HashiCorp Support
    email: support@hashicorp.com
    url: https://support.hashicorp.com/
  license:
    name: Business Source License 1.1
    url: https://github.com/hashicorp/vault/blob/main/LICENSE
servers:
- url: https://vault.example.com/v1
  description: Vault Server
security:
- vaultToken: []
tags:
- name: Audit
  description: Audit device management
paths:
  /sys/audit:
    get:
      operationId: listAuditDevices
      summary: HashiCorp Vault List audit devices
      description: Lists all enabled audit devices.
      tags:
      - Audit
      responses:
        '200':
          description: Audit devices listed
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/AuditDevice'
        '403':
          description: Permission denied
  /sys/audit/{path}:
    put:
      operationId: enableAuditDevice
      summary: HashiCorp Vault Enable audit device
      description: Enables a new audit device at the given path.
      tags:
      - Audit
      parameters:
      - $ref: '#/components/parameters/mountPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - type
              properties:
                type:
                  type: string
                  description: Audit device type (file, syslog, socket)
                description:
                  type: string
                  description: Human-friendly description
                options:
                  type: object
                  description: Configuration options for the audit device
                  properties:
                    file_path:
                      type: string
                      description: Path to the audit log file (for file type)
                    log_raw:
                      type: boolean
                      description: Whether to log raw requests/responses
      responses:
        '204':
          description: Audit device enabled
        '400':
          description: Invalid request
        '403':
          description: Permission denied
    delete:
      operationId: disableAuditDevice
      summary: HashiCorp Vault Disable audit device
      description: Disables an audit device at the given path.
      tags:
      - Audit
      parameters:
      - $ref: '#/components/parameters/mountPath'
      responses:
        '204':
          description: Audit device disabled
        '403':
          description: Permission denied
components:
  schemas:
    AuditDevice:
      type: object
      properties:
        type:
          type: string
          description: Type of audit device (file, syslog, socket)
        description:
          type: string
          description: Human-friendly description
        options:
          type: object
          description: Configuration options for the audit device
        path:
          type: string
          description: Path at which the audit device is enabled
        local:
          type: boolean
          description: Whether the audit device is local only
  parameters:
    mountPath:
      name: path
      in: path
      required: true
      description: The path to mount or access the resource
      schema:
        type: string
  securitySchemes:
    vaultToken:
      type: apiKey
      in: header
      name: X-Vault-Token
      description: Vault authentication token
externalDocs:
  description: Vault System Backend API Documentation
  url: https://developer.hashicorp.com/vault/api-docs/system