Traverse links from an object
Follows a path of declared link types from one object, one link type per hop, up to three hops, and returns each object reached once, at its nearest hop, with the edge that led there and the path from the start. Time-bounded edges are filtered at `as_of` (now when omitted). Fan-out and the object count are capped, and the response says which caps cut the walk. The walk never leaves the gallery and never passes an object the caller cannot read; such a start answers 404. Needs a signed-in member: an API key answers 403.
Follows a path of declared link types from one object, one link type per hop, up to three hops, and returns each object reached once, at its nearest hop, with the edge that led there and the path from the start. Time-bounded edges are filtered at as_of (now when omitted). Fan-out and the object count are capped, and the response says which caps cut the walk. The walk never leaves the gallery and never passes an object the caller cannot read; such a start answers 404. Needs a signed-in member: an API key answers 403.
Authorization
bearerAuth gallery:readA gallery API key, sent as Authorization: Bearer gpk_… (or the x-api-key header).
In: header
Scope: gallery:read
Path Parameters
The object id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
{ "start": { "id": "string", "type": "string" }, "as_of": "string", "data": [ { "id": "string", "type": "string", "hop": -9007199254740991, "from": "string", "link": "string", "direction": "out", "attributes": { "property1": null, "property2": null }, "valid_from": "string", "valid_to": "string", "path": [ "string" ] } ], "caps": { "depth": -9007199254740991, "fan_out": -9007199254740991, "limit": -9007199254740991 }, "capped": { "fan_out": true, "limit": true }}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}{ "type": "../dictionary", "title": "string", "status": 0, "detail": "string", "code": "invalid_request", "retry": "permanent", "details": null}Get an object GET
Returns one object by its public id, whatever its type: the id prefix names the type, and the answer is that type's own read, with the same access and field visibility. A key needs the scopes of the type's named read: `artworks:read` and `artists:read` for an artwork, `locations:read` for a location, `contacts:read` and `gallery:read` for a party, `artists:read` for an artist, `shows:read` for a booth, `artworks:update` and `contacts:read` for a hold; without them the answer is 403. `expand` follows the named links one level, and each far-end type needs its own read scopes too. An id whose prefix no declared type owns answers 404, and so does a merged-away party or artist id; a declared type with no read answers 400 with `details.reason` `not_readable`.
Search objects POST
Runs one declared type's saved-query document and returns one page of matches, with cursor pagination, the type's sort and its free-text search. The rows, their order and the cursor are the ones the type's own query route returns to this caller: for `artwork`, `POST /gallery/artworks/query`, for `party`, `GET /gallery/parties`, and for `artist`, `GET /gallery/artists`, so drafts the caller cannot see, other galleries and fields a read-only key's reads hide never appear. A key needs the scopes of that route: `artworks:read`, `gallery:read` and `artists:read` for `artwork`, `contacts:read` for `party`, `artists:read` for `artist`; without them the answer is 403. A type is searchable when its list declares saved-query fields. Refusals answer 400 with `details.reason`: `unknown_type` for an undeclared type and `not_searchable` for a declared type with no saved-query fields, `invalid_filter` for a document the type does not declare, `invalid_sort` for a sort key of another type (an artist search takes no `sort` or `dir`: its list has one fixed order), and `unsupported_rule` for a rule the type's list cannot run (for a party, a `none_of`, an `is_empty`, a second rule on one field; for an artist, a second rule on one field).