---
title: "Operator agent: the operator log"
method: GET
path: "/api/operator/log"
tags: ["Operator agent"]
---

# Operator agent: the operator log

`GET /api/operator/log`

## Request

- Base URL: `https://tre-app.com`
- URL: `https://tre-app.com/api/operator/log`
- Auth: HTTP bearer

For the operator's agent credential (a personal token flagged by the installation's operator, see cloud/docs/ops-contract.md); every other caller receives 404 NOT_FOUND. The last operator acts, newest first, at most 200; narrow by `accountId` or `subjectUserId`. A row names who acted, what, when, why and, when the act ran from a proposal, which one and who proposed it.

## Query parameters

- `accountId` string, uuid
- `subjectUserId` string, uuid
- `limit` integer

## Response `200`

Success

- OpsAgentLog
  - `rows` object[], required
    - `id` string, uuid, required
    - `at` string, date-time, required
    - `operatorLabel` string, required
    - `via` 'ui' | 'cli' | 'sql' | 'agent_proposal', required
    - `action` 'access_request.invited' | 'access_request.declined' | 'access_request.reopened' | 'access_request.deleted' | 'token.revoked' | 'grant.revoked' | 'sessions.revoked' | 'workspace.suspended' | 'workspace.suspension_lifted' | 'account.closed' | 'cli.invite' | 'workspace.owner_restored' | 'agent_token.minted', required
    - `reasonCode` 'customer_request' | 'data_subject_request' | 'security_incident' | 'acceptable_use' | 'payment_dispute' | 'housekeeping', required
    - `workspaceId` string, uuid, nullable, required
    - `workspaceSlug` string, nullable, required
    - `subjectUserId` string, uuid, nullable, required
    - `subjectEmail` string, email, nullable, required
    - `targetId` string, uuid, nullable, required
    - `reference` string, nullable, required
    - `detail` object, required
    - `proposalId` string, uuid, nullable, required
    - `proposedBy` string, nullable, required

## Other responses

- `400`: Invalid request
- `401`: Unauthenticated
- `403`: Forbidden: insufficient role or token scope; scope denials name the held scope and the operation
- `404`: Not found
- `409`: Conflict
- `429`: Rate limited
- `500`: Internal server error
- `503`: Temporarily unavailable

---

[API](https://skmtc.dev/tre-app/apis/tre-rest-api.md) · [All operations](https://skmtc.dev/tre-app/apis/tre-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tre-app/apis/tre-rest-api/revisions/26a7187a05fc?raw)
