## GET /v1/account/api-requests

List requests made with API keys, user tokens, and session tokens, newest first.

Required permissions: read:account.
API key: Supported.
CLI user token: Supported.
Session token: Not supported by session tokens, even with permissions.ellipsis enabled.
Higher permission levels include lower levels: read < write < delete.

### Response

```text
{
  "api_requests": [
    {
      "created_at": str,
      "credential": {
        "id": str,
        "name": str,
        "type": str
      },
      "duration_ms": int,
      "id": str,
      "method": str,
      "operation": str,
      "path": str,
      "status_code": int,
      "user_agent": str
    }
  ],
  "has_more": bool,
  "next_cursor": str
}
```

### Python

```python
import os

from ellipsis import Ellipsis

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

for item in client.account.api_requests.list():
    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.account.apiRequests.list()) {
  console.log(item);
}
```

### cURL

```bash
curl "https://api.ellipsis.dev/v1/account/api-requests" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN"
```

### Response schema

```json
{
  "properties": {
    "api_requests": {
      "items": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credential": {
            "anyOf": [
              {
                "properties": {
                  "id": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "enum": [
                      "api_key",
                      "user_token",
                      "session_token"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "id",
                  "name"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration_ms": {
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "operation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "path": {
            "type": "string"
          },
          "status_code": {
            "type": "integer"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "method",
          "path",
          "operation",
          "status_code",
          "duration_ms",
          "credential",
          "user_agent"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "has_more": {
      "default": false,
      "type": "boolean"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "api_requests"
  ],
  "type": "object"
}
```
