---
title: "Lists logged API and MCP requests, oldest first, one page at a time."
method: GET
path: "/api/v1/activity"
tags: ["Activity"]
---

# Lists logged API and MCP requests, oldest first, one page at a time.

`GET /api/v1/activity`

## Request

- Base URL: `https://app.flexonthejob.com`
- URL: `https://app.flexonthejob.com/api/v1/activity`
- Auth: HTTP bearer

Requires `ManageOrganizations`. Rows are returned in the order they were written
(ascending `id`), so a poller can pass the last `nextCursor` back as
`after` to receive only newer rows. A row is written just after its response is
sent, so a request appears a moment after it completes. Rows are kept 90 days.
Example: `GET /api/v1/activity?since=2026-09-22T00:00:00Z&search=update_job_status`.
Also available as CSV (`Accept: text/csv` or `?format=csv`); paging cursor in `X-Next-Cursor`.

## Query parameters

- `since` string, date-time
- `until` string, date-time
- `apiKeyId` integer
- `statusClass` integer
- `search` string
- `after` string
- `limit` integer
- `format` 'csv'

## Response `200`

One page of log rows and the cursor for the next page (null on the last page).

- PagedResponseOfApiActivityDto: One page of a cursor-paginated /api/v1 collection (API_AND_MCP.md: `?after=<syncId>&limit=`).
  - `items` ApiActivityDto[]: Items of this page in ascending creation order.
    - `id` integer: Log row id, increasing in the order rows were written; also the pagination cursor. Example: `48213`.
    - `apiKeyId` integer, nullable: Id of the API key that made the request (see Settings → Integrations → API Keys). Example: `3`.
    - `keyName` string, nullable: Name the key was given at creation; null when the key no longer exists. Example: `"Claude assistant"`.
    - `keyPrefix` string, nullable: Non-secret key prefix shown on the API Keys page. Example: `"flx_live_a1b2c3d4"`.
    - `method` string: HTTP method. Example: `"POST"`.
    - `path` string: Request path without the query string. Example: `"/api/v1/jobs/42/status"` or `"/mcp"`.
    - `mcpMethod` string, nullable: For `/mcp` requests, the JSON-RPC method (`"tools/call"`, `"tools/list"`, `"initialize"`, ...; `"batch"` for a JSON-RPC batch); null for `/api/v1`.
    - `mcpTool` string, nullable: For an MCP `tools/call`, the tool that was called; null otherwise. Example: `"update_job_status"`.
    - `statusCode` integer: HTTP status code returned. An MCP tool failure is still `200` (the error is inside the JSON-RPC result). Example: `201`.
    - `durationMs` integer: Server processing time in milliseconds. Example: `37`.
    - `remoteIp` string, nullable: Client IP address as seen by the server. Example: `"203.0.113.9"`.
    - `createdAt` string, date-time: UTC time the request started (ISO-8601). Example: `"2026-09-23T14:05:11Z"`.
    - `authFailure` string, nullable: Why a genuine key was refused before reaching the endpoint: `"key_expired"` (status `401`, the key's expiry had passed) or `"ip_not_allowed"` (status `403`, the client IP is outside the key's allowed IP ranges). Null for every other request, including permission denials. Example: `"ip_not_allowed"`.
  - `nextCursor` string, nullable: SyncId of the last item; pass it back as `?after=` to fetch the next page. `null` when this is the last page.

## Other responses

- `400`: Unusable `after` cursor or `statusClass`.
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests

---

[API](https://skmtc.dev/flexonthejob/apis/flex-api.md) · [All operations](https://skmtc.dev/flexonthejob/apis/flex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flexonthejob/apis/flex-api/revisions/19c8f4d27acf?raw)
