{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robosystems-ai/json-schema/robosystems-ai-mutation-audit-list-response-schema.json",
  "title": "MutationAuditListResponse",
  "description": "A page of the graph's mutation audit, newest first.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robosystems-ai-graph-audit-api-openapi.yml#/components/schemas/MutationAuditListResponse",
  "properties": {
    "graph_id": {
      "type": "string",
      "title": "Graph Id"
    },
    "entries": {
      "items": {
        "$ref": "#/$defs/MutationAuditEntry"
      },
      "type": "array",
      "title": "Entries"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "Pass as `cursor` for the next, older page; null on the last page"
    }
  },
  "type": "object",
  "required": [
    "graph_id",
    "entries"
  ],
  "$defs": {
    "MutationAuditEntry": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Audit entry identifier"
        },
        "occurred_at": {
          "type": "string",
          "format": "date-time",
          "title": "Occurred At",
          "description": "When the call finished"
        },
        "surface": {
          "type": "string",
          "enum": [
            "api",
            "mcp",
            "operator"
          ],
          "title": "Surface",
          "description": "Where the call came from: 'api' for a REST operation, 'mcp' for an external MCP client, 'operator' for an in-app AI operator run such as the console's /do"
        },
        "operation_name": {
          "type": "string",
          "title": "Operation Name",
          "description": "The operation or MCP tool that ran"
        },
        "status": {
          "type": "string",
          "enum": [
            "completed",
            "failed",
            "pending"
          ],
          "title": "Status",
          "description": "Whether the call succeeded; a failed call changed nothing it reports. 'pending' means the call started background work; follow its operation_id for the outcome"
        },
        "error_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Error Code",
          "description": "Why a failed call failed"
        },
        "duration_ms": {
          "type": "number",
          "title": "Duration Ms",
          "description": "How long the call took"
        },
        "user_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "User Id",
          "description": "The user the call ran as"
        },
        "auth_method": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Auth Method",
          "description": "How the caller authenticated, for example 'api_key' or 'oauth'"
        },
        "api_key_prefix": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Api Key Prefix",
          "description": "The first characters of the API key used, when one was"
        },
        "request_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Request Id",
          "description": "The HTTP request that made the call"
        },
        "operation_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Operation Id",
          "description": "The REST operation's envelope id, or the operator run's operation id: every write an operator run makes shares it"
        },
        "operator_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Operator Type",
          "description": "The operator that made the call, for surface 'operator'"
        },
        "arguments_fingerprint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Arguments Fingerprint",
          "description": "SHA-256 of the call's arguments. The arguments themselves are not stored"
        },
        "object_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Object Ids",
          "description": "Identifiers of the objects the call touched"
        }
      },
      "type": "object",
      "required": [
        "id",
        "occurred_at",
        "surface",
        "operation_name",
        "status",
        "duration_ms"
      ],
      "title": "MutationAuditEntry",
      "description": "One mutating call on the graph."
    }
  }
}