# Busiest routes

`GET /v1/projects/{project_id}/activity/routes`

Requires role member or higher.

`sort=errors` orders by 5xx responses. At most 200 routes are kept per hour; the rest are counted under `(other)`.

## Authentication

A session token: `Authorization: Bearer <session token>`, or the session cookie in the browser. Requires role `member` or higher.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `range` | query |  | no |  |
| `sort` | query |  | no |  |
| `limit` | query | integer | no |  |
| `project_id` | path | string | yes |  |

## Responses

### 200

Busiest routes of a project over a range.

`application/json`

```json
{
  "additionalProperties": false,
  "description": "Busiest routes of a project over a range.",
  "properties": {
    "data": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "method": {
            "description": "`*` for `(other)`.",
            "type": "string"
          },
          "requests": {
            "description": "Requests.",
            "minimum": 0,
            "type": "integer"
          },
          "route": {
            "description": "Route template, router, `(unmatched)` or `(other)`.",
            "type": "string"
          },
          "s2xx": {
            "description": "Responses 200–299.",
            "minimum": 0,
            "type": "integer"
          },
          "s3xx": {
            "description": "Responses 300–399.",
            "minimum": 0,
            "type": "integer"
          },
          "s4xx": {
            "description": "Responses 400–499.",
            "minimum": 0,
            "type": "integer"
          },
          "s5xx": {
            "description": "Responses 500–599.",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "method",
          "route",
          "requests",
          "s2xx",
          "s3xx",
          "s4xx",
          "s5xx"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "data"
  ],
  "type": "object"
}
```

### 401

unauthorized: no valid session, or the email is not verified.

Problem type: [unauthorized](https://docs.dlogify.com/errors/unauthorized.md).

### 404

not-found: the resource does not exist, or the caller is not a member of its organization.

Problem type: [not-found](https://docs.dlogify.com/errors/not-found.md).

### 422

validation-failed: the request does not match the schema.

Problem type: [validation-failed](https://docs.dlogify.com/errors/validation-failed.md).

### 429

rate-limited: per-user management request limit.

Problem type: [rate-limited](https://docs.dlogify.com/errors/rate-limited.md).

## Example

```bash
curl -X GET "https://api.dlogify.com/v1/projects/{project_id}/activity/routes" \
  -H "Authorization: Bearer $DLOGIFY_SESSION"
```

Source: https://docs.dlogify.com/api/activity/getProjectActivityRoutes
