---
title: "Get Harbor Activity"
method: GET
path: "/api/organization/harbor-activity/{event_id}"
tags: ["Activity"]
---

# Get Harbor Activity

`GET /api/organization/harbor-activity/{event_id}`

## Request

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

Returns one Harbor Activity event from the caller's organization.

You must be an active Organization administrator to use this endpoint. The
event must belong to the Organization against which you authenticated.

The response can include stable identities, bounded resource snapshots, schema
label snapshots with truncation state, field counts, and row counts. It does
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.

## Path parameters

- `event_id` string, uuid, required: Activity event ID

## Headers

- `X-Polytomic-Version` string

## Response `200`

OK

- HarborActivityEventEnvelope
  - `data` HarboractivityapiHarborActivityEvent
    - `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

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

## Changes

- **2026-10-26** `82ef9c39493c`: 5 breaking, 5 info
  - the `data/allOf[#/components/schemas/HarboractivityapiHarborActivityEvent]/event_type` response's property type changed from `string` to no type for status `200`
  - the `data/allOf[#/components/schemas/HarboractivityapiHarborActivityEvent]/metadata/allOf[#/components/schemas/HarboractivityapiHarborActivityMetadata]/phase` response's property type changed from `string` to no type for status `200`
  - the `data/allOf[#/components/schemas/HarboractivityapiHarborActivityEvent]/metadata/allOf[#/components/schemas/HarboractivityapiHarborActivityMetadata]/statement_category` response's property type changed from `string` to no type for status `200`
  - the `data/allOf[#/components/schemas/HarboractivityapiHarborActivityEvent]/outcome` response's property type changed from `string` to no type for status `200`
  - …6 more
- **2026-10-22** `d80b0fdea14e`: 1 breaking, 22 warning, 1 info
  - the `data` response's property type changed from `object` to no type for status `200`
  - removed the optional property `data/actor` from the response with the `200` status
  - removed the optional property `data/attempt_id` from the response with the `200` status
  - removed the optional property `data/client_name` from the response with the `200` status
  - …20 more
- **2026-09-27** `07a62168b6b7`: 1 info
  - added the optional property `data/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/:event_id/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/2dc44209241e?raw)
