---
title: "Lookup Harbor Action"
method: POST
path: "/api/harbors/{harbor_id}/actions/lookup"
tags: ["Harbors"]
---

# Lookup Harbor Action

`POST /api/harbors/{harbor_id}/actions/lookup`

## Request

- Base URL: `https://app.polytomic.com`
- URL: `https://app.polytomic.com/api/harbors/{harbor_id}/actions/lookup`
- Auth: one of:
  - HTTP bearer
  - HTTP basic

Look up exactly one record using a granted read-only Harbor action.

Use a scoped credential belonging to this Harbor, including a read-only
credential. An administrator must grant the Connection, read-only operation,
lookup field, and returned fields. Select an identity with
[List actions](../../../../../api-reference/harbors/actions/list), then inspect its effective
lookup and output fields with
[Describe action](../../../../../api-reference/harbors/actions/describe).

Polytomic checks current grants and provider capabilities on each lookup. The
response contains one record under `data`, limited to the selected fields.
Omitting `fields` returns all currently available granted outputs;
new provider fields remain excluded until an administrator grants them.
Salesforce uses `Id`; HubSpot uses `hs_object_id`. Preserve these IDs as strings.
Alternate keys, fuzzy matches, search, and batching are unsupported.

A definite absence returns `404 Not Found`. More than one exact match returns
`409 Conflict`. Invalid selections return `400 Bad Request`; unavailable
capabilities or provider failures return `503 Service Unavailable`. Errors do
not include lookup values or provider response bodies.

This request is synchronous and read-only. It requires no preparation, approval,
execution identifier, or status polling. It creates no write receipt or private
write evidence. Harbor Activity records `action.looked_up` with field names and
an outcome, never the lookup value or returned values. If Activity cannot be
recorded, Polytomic returns no record.

Unknown properties, duplicate keys, invalid Unicode, trailing JSON, and bodies
larger than 256 KiB are rejected. Lookup values must be JSON scalars. Numeric
values must use integer notation within +/-9007199254740991.

Send a new nonzero UUID in `X-Polytomic-Activity-Request-ID` for each request.
`X-Polytomic-Harbor-Session` is optional for direct REST requests. A supplied
session must be active and bound to your credential and Harbor.

## Path parameters

- `harbor_id` string, uuid, required: Unique identifier of the Harbor

## Headers

- `X-Polytomic-Version` string
- `X-Polytomic-Harbor-Session` string: Harbor session token; when supplied, the session must be active and bound to this credential and Harbor.
- `X-Polytomic-Activity-Request-ID` string: New nonzero UUID for each request, required for scoped credentials; a reused value is rejected.

## Request body

- LookupHarborActionRequest
  - `connection_id` string, uuid, required: Connection ID from Harbor action discovery
  - `fields` string[]: Unique, nonempty subset of granted output field IDs. Omit to return all currently available granted outputs. Null and empty arrays are invalid.
  - `lookup` ActionLookup, required
    - `field_id` string: Field ID to look the record up by
    - `value` unknown
  - `operation_id` string, required: Exact read-only operation ID from action discovery
  - `schema_id` string, required: Exact schema ID from action discovery

## Response `200`

OK

- HarborActionLookupEnvelope
  - `data` SchemaRecord

## Changes

- **2026-10-21** `61c2b96f65ba`: 3 breaking, 2 warning, 1 info
  - added `#/components/schemas/ActionLookup` to the `lookup` request property `allOf` list
  - the `lookup` request property type changed from `object` to no type
  - the `data` response's property type changed from `object` to no type for status `200`
  - removed the request property `lookup/field_id`
  - …2 more
- **2026-09-24** `f27820ad8673`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/polytomic/apis/polytomic-api/changes/api/harbors/:harbor_id/actions/lookup/post.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)
