---
title: "List Harbor Activity"
method: GET
path: "/api/organization/harbor-activity"
tags: ["Activity"]
---

# List Harbor Activity

`GET /api/organization/harbor-activity`

## Request

- Base URL: `https://app.polytomic.com`
- URL: `https://app.polytomic.com/api/organization/harbor-activity`
- Auth: one of:
  - HTTP bearer
  - HTTP basic

Lists Harbor Activity recorded for the caller's organization.

You must be an active Organization administrator to use this endpoint.

`start_time` is inclusive and `end_time` is exclusive. Both filter the time at
which Polytomic recorded each event, which can differ from `occurred_at`. A
single request can cover at most 90 days.

Results are ordered from newest to oldest by default. Set `order` to `asc` to
retrieve the oldest events first. A page contains at most 100 events. Pass
`next_page_token` from the response as `page_token` with the same time range,
filters, order, and limit to retrieve the next page. The token expires 24 hours
after the first page. Pagination uses a live descending cursor, so an event from
a transaction that commits between pages can require a fresh traversal.

Responses include stable identities, bounded resource snapshots, schema label
snapshots with truncation state, field counts, and row counts when available.
They do not include internal recorded-order values, submitted SQL, raw field
names, detailed provider errors, result rows, or raw pagination tokens.

> ℹ️ Activity retention
>
> Polytomic retains Activity events for at least 90 days. Pagination tokens
> expire 24 hours after the first page.

## Query parameters

- `start_time` string, date-time, required: Inclusive start of the event recorded-time range
- `end_time` string, date-time, required: Exclusive end of the event recorded-time range. The range can span at most 90 days.
- `limit` integer: Maximum number of events to return. Defaults to 50 and cannot exceed 100.
- `page_token` string: Opaque pagination cursor returned by the previous request. It expires 24 hours after the first page.
- `order` 'asc' | 'desc': Order in which events were recorded. Defaults to desc.
- `harbor_id` string[]: Return events for these Harbors. Repeat the parameter to filter by multiple IDs.
- `event_type` HarboractivityEventType[]: Return events with these event types. Repeat the parameter to filter by multiple types.
- `outcome` HarboractivityOutcome[]: Return events with these outcomes. Repeat the parameter to filter by multiple outcomes.
- `operation_id` string[]: Return events for these operation IDs.
- `session_id` string[]: Return events for these session IDs.
- `actor_id` string[]: Return events for these actor IDs.
- `credential_id` string[]: Return events for these credential IDs.
- `connection_id` string[]: Return events for these Connection IDs.

## Headers

- `X-Polytomic-Version` string

## Response `200`

OK

- HarborActivityListEnvelope
  - `data` HarboractivityapiHarborActivityEvent[], nullable: Activity events on this page
    - `actor` HarboractivityapiHarborActivityActorSnapshot
      - `display_name` string: Actor display name when the event was recorded
      - `email` string: Actor email when the event was recorded
      - `id` string, uuid: ID of the actor, credential, or profile
      - `type` string: Actor type
    - `attempt_id` string, uuid: Query attempt ID
    - `client_name` string: MCP-observed client name of the event's session
    - `client_version` string: MCP-observed client version of the event's session
    - `connection_id` string, uuid: Connection ID involved in the event
    - `context_id` string, uuid: Context document ID involved in the event
    - `context_revision_id` string, uuid: Context revision ID involved in the event
    - `credential` HarboractivityapiHarborActivityIdentitySnapshot
      - `id` string, uuid: ID of the actor, credential, or profile
    - `event_type` 'action.looked_up' | 'action.configuration_changed' | 'action.listed' | 'action.prepared' | 'action.preparation_expired' | 'action.attempt_started' | 'action.succeeded' | 'action.failed' | 'action.unknown' | 'session.started' | 'session.closed' | 'session.expired' | 'context.listed' | 'context.fetched' | 'saved_query.listed' | 'saved_query.fetched' | 'connection.listed' | 'schema.listed' | 'schema.fetched' | 'evidence_capability.fetched' | 'query.submitted' | 'query.started' | 'query.succeeded' | 'query.failed' | 'evidence_link.created' | 'access.denied'
    - `harbor_id` string, uuid: Harbor ID of the event
    - `id` string, uuid: Activity event ID
    - `lifecycle_events` HarboractivityapiHarborActivityEvent[]
    - `metadata` HarboractivityapiHarborActivityMetadata
      - `action_enabled` boolean, nullable: On action.configuration_changed events, whether the action is enabled after the change; true on preparation and execution events
      - `action_field_ids` string[]: Field IDs granted, submitted, or returned by the action
      - `action_id` string: Action identity, as the schema ID and operation ID joined by a slash
      - `action_lookup_field_id` string: Lookup field ID used by the action
      - `action_lookup_field_ids` string[]: Lookup field IDs granted by the action configuration
      - `action_request_id` string, uuid: Action execution ID
      - `attempt_number` integer, nullable: Query attempt number
      - `category` string: Category of the access denial
      - `client_name` string: MCP-observed client name of the session
      - `client_version` string: MCP-observed client version of the session
      - `connection_name` string, nullable: Connection name when the query was submitted, or of the source a fetched source document describes
      - `connection_name_truncated` boolean, nullable: Whether the connection name snapshot was truncated
      - `connection_type` string, nullable: Connection type of the queried connection, or of the source a fetched source document describes
      - `context_version` integer, nullable: Published context version number at fetch time, when recorded
      - `error_category` string: Category of a failed query or action
      - `execution_duration_ms` integer, nullable: Milliseconds the query spent executing
      - `external_run_id` string: Client-supplied run correlation value of the session
      - `failure_code` string: Failure code of a failed query
      - `field_count` integer, nullable: Number of fields returned by a query. Raw field names are not returned.
      - `has_next_page` boolean, nullable: Whether the listed page had more results
      - `label` string, nullable: Bounded resource label snapshot
      - `label_truncated` boolean, nullable: Whether the resource label snapshot was truncated
      - `operation` string: Operation that was denied
      - `phase` 'dispatch' | 'preflight' | 'execution'
      - `queue_duration_ms` integer, nullable: Milliseconds between query submission and the start of execution
      - `reason` string: Reason the session ended or access was denied
      - `record_id` string: Record ID of the created record view link
      - `row_count` integer, nullable: Number of rows returned by the query
      - `saved_query_id` string, uuid: Saved query ID
      - `saved_query_revision_id` string, uuid: Saved query revision ID
      - `saved_query_version` integer, nullable: Saved query version
      - `schema_id` string: Schema ID involved in the event
      - `statement_category` 'select' | 'other' | 'unknown'
      - `supported` boolean, nullable: Whether record view links can be created for the schema
      - `total_duration_ms` integer, nullable: Milliseconds between query submission and its final outcome
    - `occurred_at` string, date-time: When the operation occurred
    - `operation_id` string, uuid: Operation ID shared by the events of one query or action
    - `outcome` 'succeeded' | 'failed' | 'denied' | 'unknown'
    - `profile` HarboractivityapiHarborActivityIdentitySnapshot
      - `id` string, uuid: ID of the actor, credential, or profile
    - `provenance` 'server_observed' | 'service_attested' | 'client_asserted'
    - `query_source` HarboractivityapiHarborActivityQuerySource
      - `kind` string: Query source: saved_query, ad_hoc, or unknown when the submission is no longer retained
      - `saved_query` HarboractivityapiHarborActivitySavedQuerySource
        - `id` string, uuid: Saved query ID
        - `name` string: Saved query name when the query was submitted
        - `name_truncated` boolean: Whether the name snapshot was truncated
        - `revision_id` string, uuid: Saved query revision ID that was submitted
        - `version` integer: Saved query version that was submitted
      - `submission_event_id` string, uuid: ID of the query.submitted event
      - `submitted_at` string, date-time, nullable: When the query was submitted
    - `recorded_at` string, date-time: When Polytomic recorded the event
    - `session_id` string, uuid: Harbor session ID of the event
    - `targets` HarboractivityapiHarborActivityTarget[], nullable: Resources involved in the event
      - `id` string: Target resource ID
      - `label` string: Label snapshot of the target resource
      - `label_truncated` boolean: Whether the label snapshot was truncated
      - `revision_id` string, uuid: Saved query revision ID, for saved query targets
      - `type` string: Type of the target resource: connection, schema, context, context_revision, or saved_query
      - `version` integer, nullable: Saved query version, for saved query targets
  - `pagination` PaginationDetails
    - `next_page_token` string: Token for fetching the next page of results

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `410`: Gone
- `422`: Unprocessable Entity

## Changes

- **2026-10-26** `82ef9c39493c`: 5 breaking, 35 info
  - the `data/items/event_type` response's property type changed from `string` to no type for status `200`
  - the `data/items/metadata/allOf[#/components/schemas/HarboractivityapiHarborActivityMetadata]/phase` response's property type changed from `string` to no type for status `200`
  - the `data/items/metadata/allOf[#/components/schemas/HarboractivityapiHarborActivityMetadata]/statement_category` response's property type changed from `string` to no type for status `200`
  - the `data/items/outcome` response's property type changed from `string` to no type for status `200`
  - …36 more
- **2026-10-22** `d80b0fdea14e`: 6 breaking, 46 warning, 6 info
  - the `data/items/actor` response's property type changed from `object` to no type for status `200`
  - the `data/items/credential` response's property type changed from `object` to no type for status `200`
  - the `data/items/metadata` response's property type changed from `object` to no type for status `200`
  - the `data/items/profile` response's property type changed from `object` to no type for status `200`
  - …54 more
- **2026-09-27** `07a62168b6b7`: 1 info
  - added the optional property `data/items/metadata/failure_code` to the response with the `200` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/polytomic/apis/polytomic-api/changes/api/organization/harbor-activity/get.md)

---

[API](https://skmtc.dev/polytomic/apis/polytomic-api.md) - [All operations](https://skmtc.dev/polytomic/apis/polytomic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polytomic/apis/polytomic-api/revisions/3c88180d2470?raw)
