Anzenna Public API
    • How To Use the Anzenna Public API
    • data exfiltration
      • Query database exfiltration events
        POST
      • List file movement activities
        POST
      • Get file movement activity by id
        GET
      • List files used with data exfiltration.
        POST
      • Get a specific data exfiltration file
        GET
      • List git events
        POST
      • Get a specific git event by id
        GET
      • List git repositories
        POST
      • Get a specific git repository
        GET
    • api key
      • Get API key information
        GET
    • login events
      • List login events
        POST
      • Get a login event by ID
        GET
    • browser applications
      • Query all browser applications
        POST
      • Get a browser application by id
        GET
      • List browser application instances
        POST
    • browser history
      • List browser history entries
        POST
    • data sharing
      • List file sharing instances
        POST
      • Query database share grants
        POST
      • Query database share user additions
        POST
      • List documents
        POST
      • Get document by id
        GET
    • devices
      • List devices
        POST
      • Get a device
        GET
      • List USB device connection events
        POST
      • Get a USB connection event
        GET
    • device policies
      • List device policies
      • Get a device policy
    • device applications
      • List device applications
      • Get a device application
      • Query device application instances.
    • device infections
      • List device infections
      • Get a device infection
    • ide applications
      • List IDE applications
      • Get an IDE application
    • ide application instances
      • Query IDE application instances.
    • mcp servers
      • List MCP servers
      • Get an MCP server
      • Query MCP server installations
    • mfa
      • Query all mfa statuses
    • oauth applications
      • Query all OAuth applications
      • Get an OAuth application by id
      • Query all OAuth application instances
    • passwords
      • Query all password reuse instances
    • people
      • Query all people
      • Get a person by id
      • Add a category to multiple people
      • Remove a category from multiple people
    • account
      • List accounts
      • Get an account by id
    • phishing interactions
      • Query all phishing interactions
    • email flows
      • Query all outbound email events
      • Get an outbound email event by id
    • company wide risk trends
      • Get company risk trends
    • high risk organizations
      • Get number of high risk organizations
    • detections
      • Get key finding detections
      • Get detection details
      • List users associated with a given detection
    • events
      • List security events
    • shadow it
      • Query all Shadow IT instances
    • web host
      • Query all web host resources
      • Get a web host resource by id
    • advanced query
      • Execute an advanced query
    • sources
      • Query raw events
    • allowlist
      • Query all allowlists
      • Create a new allowlist
      • Delete an allowlist
      • Update an allowlist

    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 database exfiltration events
    Built with