Anzenna Public API
    • How To Use the Anzenna Public API
    • AI Governance
      • Query all Shadow AI instances
        POST
      • Get a Shadow AI instance by id
        GET
      • Query all AI interactions
        POST
      • Get an AI interaction by id
        GET
      • List MCP servers
        POST
      • Get an MCP server
        GET
      • Query MCP server installations
        POST
    • Investigation
      • Query all investigations
        POST
      • Start an investigation
        POST
      • Get an investigation by id
        GET
      • Dismiss an investigation
        POST
      • Get detection investigation prompts
        GET
      • Get global investigation prompts
        GET
      • Get user investigation prompts
        GET
      • Query all risk registers
        POST
      • Query all risk register catalog entries
        POST
    • Identity
      • List accounts
        POST
      • Get an account by id
        GET
      • List login events
        POST
      • Get a login event by ID
        GET
      • Query all mfa statuses
        POST
      • Get an MFA status by id
        GET
      • Query all OAuth applications
        POST
      • Get an OAuth application by id
        GET
      • Query all OAuth application instances
        POST
      • Query all password reuse instances
        POST
    • Advanced
      • Execute an advanced query
      • List security events
      • Receive a webhook event
      • Query raw events
    • Detection
      • Query all allowlists
      • Create a new allowlist
      • Delete an allowlist
      • Update an allowlist
      • Get an anomaly by ID
      • Get key finding detections
      • Get detection details
      • List users associated with a given detection
      • Execute a remediation
    • Browser
      • Query all browser applications
      • Get a browser application by id
      • List browser application instances
      • List browser history entries
      • Query all remote machines
      • Get a remote machine by id
      • Query all web host resources
      • Get a web host resource by id
    • Data & IP
      • Query database exfiltration events
      • List file delete events
      • List file movement activities
      • Get file movement activity by id
      • List files used with data exfiltration.
      • Get a specific data exfiltration file
      • List git events
      • Get a specific git event by id
      • List git repositories
      • Get a specific git repository
      • List file sharing instances
      • Query database share grants
      • Query database share user additions
      • List documents
      • Get document by id
      • List DLP policies
      • Get a DLP policy by id
      • List DLP policy detectors
      • Query all DLP alerts
      • Get a DLP alert by id
    • Device
      • List devices
      • Get a device
      • List device applications
      • Get a device application
      • Query device application instances.
      • List device infections
      • Get a device infection
      • List device policies
      • Get a device policy
      • List USB device connection events
      • Get a USB connection event
      • List IDE applications
      • Get an IDE application
      • Query IDE application instances.
    • Email
      • Query all outbound email events
      • Get an outbound email event by id
      • Query all phishing interactions
    • Company
      • List groups
      • Query all people
      • Get departure analysis for a person
      • Get a person by id
      • Add a category to multiple people
      • Remove a category from multiple people
      • Get company risk trends
      • Get number of high risk organizations
    • SaaS
      • Query all Shadow IT instances
    • Outreach
      • List training campaigns
      • Create a training campaign
    • API Key
      • Get API key information

    How To Use the Anzenna Public API

    Welcome. This guide walks you through authenticating, issuing your first
    request, and using the query language that powers most list endpoints.

    1. Base URL

    All requests go to:

    https://api.anzenna.ai/api/v1
    

    2. Authentication

    The API uses bearer token authentication with an Anzenna API key.

    1. Open the Anzenna portal and go to Settings → API Keys.
    2. Create a key. Copy the value — it is shown only once.
    3. Send it on every request in the Authorization header:
    Authorization: Bearer <YOUR_API_KEY>
    

    Example:

    curl -H "Authorization: Bearer $ANZENNA_API_KEY" \
         https://api.anzenna.ai/api/v1/devices
    

    A missing key returns 401. An invalid or insufficiently scoped key returns
    403. Each endpoint declares the scopes it requires under its security
    block — check those when provisioning a key.

    3. The Query Language

    The query field on every list endpoint accepts a subset of SQL WHERE
    clause syntax
    . The same syntax is used everywhere — once you learn it
    for one endpoint it works for all of them.

    Operators

    =, !=, <>, <, <=, >, >=, IN, NOT IN, IS NULL,
    IS NOT NULL, LIKE, NOT LIKE, ILIKE, NOT ILIKE.

    Combine with AND / OR. Negate with NOT. Group with parentheses.

    Functions

    LOWER(field) and UPPER(field). Functions cannot be nested and cannot
    appear on the right-hand side of a comparison.

    Common pitfalls

    • Quote strings with single quotes. name='John Smith'. Unquoted
      strings are a syntax error.
    • Escape embedded single quotes by doubling them. name='Alan''s laptop'.
    • Join conditions with AND / OR. Adjacent conditions without a
      connector are a syntax error.
    • * is not a wildcard. Use LIKE / ILIKE with % (any number of
      characters) or _ (exactly one character). name LIKE 'John%'.
    • Use ILIKE to ignore case. name ILIKE '%john%' matches John,
      JOHN, and johnny.
    • Timestamps are ISO 8601 strings in single quotes. Not Unix epochs
      and not bare dates. happened > '2024-01-01T00:00:00Z'.

    Examples

    name='WINPC-4291' AND status IN ('active', 'pending')
    risk_score >= 7 AND device_owner IS NOT NULL
    (name ILIKE 'john%' OR name ILIKE 'jane%') AND status='active'
    happened > '2024-01-01T00:00:00Z' AND happened < '2024-02-01T00:00:00Z'
    

    4. Sorting, Paging, Counting

    FieldTypeNotes
    sortstringComma-separated, each with optional asc / desc. Example: "name desc, id".
    limitintegerPage size. Default 500, max 500. Set 0 to count without fetching rows.
    offsetintegerRows to skip. Default 0.
    include_total_countbooleanWhen true, the response's pagination.total_count is populated.

    To paginate, increment offset by limit until items is empty.

    To count without retrieving rows:

    { "query": "...", "limit": 0, "include_total_count": true }
    

    5. Relations (Implicit Joins)

    Many endpoints expose relations — implicit joins to related objects
    that you can reference inside query. Each endpoint that supports them
    documents its relations under a Supported Relations section in its
    description.

    Example: filter devices by their owner's name.

    { "query": "owner.name='John Smith'" }
    

    Notes:

    • Relations are left joins and are used only for filtering. The
      joined object's fields are not returned in the response — fetch them
      separately by ID.
    • A 1:many relation can produce duplicate rows. Use distinct_on to
      deduplicate when needed.

    6. Distinct Counts and Deduplication

    • distinct_count — set to a field name to return the distribution of
      values for that field instead of rows. The response populates
      distinct_values with { value, count } entries.
    • distinct_on — comma-separated field names. The response contains one
      row per unique combination, with remaining fields from an arbitrary
      matching row.
    { "distinct_count": "status" }
    { "distinct_on":    "host_name, employee_email" }
    

    7. Errors

    StatusMeaning
    400Malformed query or request body. The response body explains what failed.
    401No API key sent.
    403API key lacks the scope required by the endpoint.
    404Object not found (typically on GET endpoints).
    429Rate limit exceeded. Back off and retry.
    5xxServer-side error. Safe to retry with backoff.

    8. A Worked Example

    Find every active device whose owner's name starts with "Jo", sorted by
    risk score descending, fetching the first 25:

    curl -X POST https://api.anzenna.ai/api/v1/devices \
      -H "Authorization: Bearer $ANZENNA_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "query": "status='active' AND owner.name ILIKE 'Jo%'",
        "sort":  "risk_score desc",
        "limit": 25,
        "include_total_count": true
      }'
    

    Then page forward by repeating with "offset": 25, 50, ... until
    items is empty.

    9. Getting Help

    • Endpoint reference: see the sidebar — every list endpoint documents
      its filterable fields and relations.
    • Support: support@anzenna.ai.
    Modified at 2026-05-06 20:15:15
    Next
    Query all Shadow AI instances
    Built with