# space.highport.admin.listUserAgents

> Published by [lexicons.highport.space](https://lexicon.garden/identity/did:plc:ciygg5hma4q7ah2kxaszkyob)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.admin.listUserAgents)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.admin.listUserAgents/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.admin.listUserAgents/examples)

## Definitions

### `space.highport.admin.listUserAgents`

**Type**: `query`

User agents that reached the network over a trailing window, with request counts and how each was classified, for reviewing crawlers, bots and automation. Operator only. Names no visitor: agents are grouped across all traffic, and the domain count is a number, never a list. Read from raw request events, so the window cannot reach past raw retention (30 days by default).

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `days` | `integer` | No | How many days back the window reaches from now. |
| `limit` | `integer` | No | Maximum agents to return, busiest first. |
| `domain` | `string` | No | Only count requests to this hostname. |
| `clientClass` | `string` | No | Only return agents the classifier put in this class. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `agents` | `array` | Yes |  |

#### Errors

- **AnalyticsDisabled**: No analytics store is configured, so no traffic was recorded.

### `space.highport.admin.listUserAgents#agent`

**Type**: `object`

One user agent's share of the window.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `domains` | `integer` | Yes | How many distinct domains it reached. |
| `lastSeen` | `string` (datetime) | Yes | The most recent response to this agent. |
| `requests` | `integer` | Yes | Responses to this agent in the window, at any status. |
| `userAgent` | `string` | No | The User-Agent as sent, cut to 512 bytes. Absent for requests that sent none, and for requests logged before the edge recorded agents. |
| `clientClass` | `string` | Yes | What the classifier made of this agent. |

## Raw Schema

```json
{
  "id": "space.highport.admin.listUserAgents",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AnalyticsDisabled",
          "description": "No analytics store is configured, so no traffic was recorded."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "agents"
          ],
          "properties": {
            "agents": {
              "type": "array",
              "items": {
                "ref": "#agent",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "days": {
            "type": "integer",
            "default": 7,
            "maximum": 30,
            "minimum": 1,
            "description": "How many days back the window reaches from now."
          },
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 200,
            "minimum": 1,
            "description": "Maximum agents to return, busiest first."
          },
          "domain": {
            "type": "string",
            "description": "Only count requests to this hostname."
          },
          "clientClass": {
            "type": "string",
            "description": "Only return agents the classifier put in this class.",
            "knownValues": [
              "bot",
              "browser",
              "unknown"
            ]
          }
        }
      },
      "description": "User agents that reached the network over a trailing window, with request counts and how each was classified, for reviewing crawlers, bots and automation. Operator only. Names no visitor: agents are grouped across all traffic, and the domain count is a number, never a list. Read from raw request events, so the window cannot reach past raw retention (30 days by default)."
    },
    "agent": {
      "type": "object",
      "required": [
        "clientClass",
        "requests",
        "domains",
        "lastSeen"
      ],
      "properties": {
        "domains": {
          "type": "integer",
          "description": "How many distinct domains it reached."
        },
        "lastSeen": {
          "type": "string",
          "format": "datetime",
          "description": "The most recent response to this agent."
        },
        "requests": {
          "type": "integer",
          "description": "Responses to this agent in the window, at any status."
        },
        "userAgent": {
          "type": "string",
          "maxLength": 512,
          "description": "The User-Agent as sent, cut to 512 bytes. Absent for requests that sent none, and for requests logged before the edge recorded agents."
        },
        "clientClass": {
          "type": "string",
          "description": "What the classifier made of this agent.",
          "knownValues": [
            "bot",
            "browser",
            "unknown"
          ]
        }
      },
      "description": "One user agent's share of the window."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
