## GET /v1/sessions/{id}/network

Read every HTTP request a session made through an Ellipsis proxy, oldest first. That is its GitHub calls, git included, and its Ellipsis API calls.

Required permissions: read:sessions.
API key: Supported.
CLI user token: Supported.
Session token: Requires the ellipsis:api scope, and the session's permissions.ellipsis rules must allow the operation. Only the token's own session.
Higher permission levels include lower levels: read < write < delete.
Grant match patterns can further restrict access to individual resources.

### Response

```text
{
  "has_more": bool,
  "next_cursor": str,
  "requests": [
    {
      "created_at": str,
      "duration_ms": int,
      "error": str,
      "id": str,
      "method": str,
      "path": str,
      "proxy": str,
      "request_body": str,
      "request_bytes": int,
      "response_body": str,
      "response_bytes": int,
      "status": int
    }
  ]
}
```

### Python

```python
import os

from ellipsis import Ellipsis

client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])

for item in client.sessions.network("..."):
    print(item)
```

### TypeScript

```typescript
import { Ellipsis } from '@ellipsis-dev/sdk';

const client = new Ellipsis({
  apiKey: process.env.ELLIPSIS_API_TOKEN!,
});

for await (const item of await client.sessions.network('...')) {
  console.log(item);
}
```

### cURL

```bash
curl "https://api.ellipsis.dev/v1/sessions/{id}/network" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN"
```

### Response schema

```json
{
  "properties": {
    "has_more": {
      "default": false,
      "type": "boolean"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "requests": {
      "items": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "duration_ms": {
            "type": "integer"
          },
          "error": {
            "anyOf": [
              {
                "enum": [
                  "missing_credential",
                  "invalid_token",
                  "no_token",
                  "unknown_token",
                  "revoked",
                  "not_bound",
                  "unattested",
                  "unknown_sandbox",
                  "unserved_path",
                  "body_too_large",
                  "no_grant",
                  "mint_refused",
                  "mint_failed",
                  "not_permitted",
                  "upstream_unreachable",
                  "upstream_stream_failed",
                  "client_disconnected",
                  "incomplete"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "proxy": {
            "type": "string"
          },
          "request_body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "request_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "response_body": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "response_bytes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "proxy",
          "method",
          "path",
          "duration_ms"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "requests"
  ],
  "type": "object"
}
```
