Hatchmate Core API

app-installs

Per-customer app visibility and rollout overrides (TM-68-TM-78).


List app installs for the acting customer (TM-68)

GET
https://api.hatchmate.nz
/v1/app-installs
Bearer (JWT)

Live app_installs rows of the acting customer, keyset-paginated. Does not resolve overrides — this is the install-level row only, use resolve_app_visibility (GET /v1/app-installs/resolve) for the effective, override-aware visibility of one app.

List app installs for the acting customer (TM-68) › query Parameters

cursor
​string

Opaque base64url keyset cursor over (created_at, id) descending. A cursor that does not decode is 422 (API-39, API-40).

limit
​integer · min: 1 · max: 200

Page size. A value above the maximum is 422, never a silent clamp (API-38).

Default: 50

List app installs for the acting customer (TM-68) › Responses

A page of app installs of the acting customer.

​AppInstall[] · required
next_cursor
​string | null · required

Install an app for the acting customer (TM-68)

POST
https://api.hatchmate.nz
/v1/app-installs
Bearer (JWT)

At most one live row per (customer_id, app); a second call while one is already live is 409 conflict (AppInstallAlreadyExists, TM-68). app must be a slug present in apps (§4.13); an unknown slug is 404, matching this table's other FK-into-system-vocabulary lookups (TM-46).

Install an app for the acting customer (TM-68) › Headers

Idempotency-Key
​string · uuid

Client-generated UUIDv4. Optional in M0 (API-44). A repeat with the same key and body returns the stored response; a repeat with a different body is 409 idempotency-conflict (API-42).

Install an app for the acting customer (TM-68) › Request Body

app
​string · pattern: ^[a-z0-9][a-z0-9-]{0… · required

Must name a row in apps.slug (§4.13); unknown ⇒ 404.

metadata
​object

Opaque to Hatchmate; interpreted only by the installed app (TM-77).

Default: {}
version_channel
​string · minLength: 1 · maxLength: 64
Default: stable
visible
​boolean
Default: true

Install an app for the acting customer (TM-68) › Responses

The app was installed.

app
​string · pattern: ^[a-z0-9][a-z0-9-]{0… · required
created_at
​string · date-time · required
customer_id
​string · uuid · required
id
​string · uuid · required
metadata
​object · required
updated_at
​string · date-time · required
version_channel
​string · required
visible
​boolean · required

Resolve effective app visibility (TM-72, TM-73)

GET
https://api.hatchmate.nz
/v1/app-installs/resolve
Bearer (JWT)

Independent per-field cascade over resource, group and install levels (TM-73). Never 404s for an app with no live app_installs row — that resolves to visible: false, source: not_installed (TM-76). An app_group_id from another customer is treated identically to an absent one (TM-75). app_group_id/resource_id under-specified combinations are not an error; the levels they cannot address are skipped (TM-74).

Resolve effective app visibility (TM-72, TM-73) › query Parameters

app
​string · pattern: ^[a-z0-9][a-z0-9-]{0… · required

The apps.slug to resolve visibility for.

app_group_id
​string · uuid
resource_id
​string

Resolve effective app visibility (TM-72, TM-73) › Responses

The resolved visibility.

The pure-read output of `resolve_app_visibility` (`TM-72`, `TM-73`).
source
​string · enum · required

The level that supplied visible (TM-73 step 4).

Enum values:
resource_override
group_override
install
not_installed
version_channel
​string | null · required

null only when source is not_installed (TM-73 step 1).

visible
​boolean · required

Always a concrete boolean, never absent (TM-72).


Fetch an app install (TM-68)

GET
https://api.hatchmate.nz
/v1/app-installs/{app_install_id}
Bearer (JWT)

Resolved by (customer_id, app_install_id) for the acting customer; an absent, soft-deleted or foreign row is one 404 (API-11).

Fetch an app install (TM-68) › path Parameters

app_install_id
​string · uuid · required

Fetch an app install (TM-68) › Responses

The app install.

app
​string · pattern: ^[a-z0-9][a-z0-9-]{0… · required
created_at
​string · date-time · required
customer_id
​string · uuid · required
id
​string · uuid · required
metadata
​object · required
updated_at
​string · date-time · required
version_channel
​string · required
visible
​boolean · required

Update an app install's own visible/version_channel/metadata (TM-71)

PATCH
https://api.hatchmate.nz
/v1/app-installs/{app_install_id}
Bearer (JWT)

Only supplied fields change; an omitted field leaves the column unchanged — not the inherit-from-below NULL semantics of an override row, since app_installs is the bottom of the fallback chain (TM-71). Does not bump permissions_epoch (TM-71).

Update an app install's own visible/version_channel/metadata (TM-71) › path Parameters

app_install_id
​string · uuid · required

Update an app install's own visible/version_channel/metadata (TM-71) › Headers

Idempotency-Key
​string · uuid

Client-generated UUIDv4. Optional in M0 (API-44). A repeat with the same key and body returns the stored response; a repeat with a different body is 409 idempotency-conflict (API-42).

Update an app install's own visible/version_channel/metadata (TM-71) › Request Body

Every field optional; an omitted field leaves the column unchanged (`TM-71`).
metadata
​object
version_channel
​string · minLength: 1 · maxLength: 64
visible
​boolean

Update an app install's own visible/version_channel/metadata (TM-71) › Responses

The updated app install.

app
​string · pattern: ^[a-z0-9][a-z0-9-]{0… · required
created_at
​string · date-time · required
customer_id
​string · uuid · required
id
​string · uuid · required
metadata
​object · required
updated_at
​string · date-time · required
version_channel
​string · required
visible
​boolean · required

List overrides on an app install (TM-69)

GET
https://api.hatchmate.nz
/v1/app-installs/{app_install_id}/overrides
Bearer (JWT)

Live override rows scoped to this app install, keyset-paginated.

List overrides on an app install (TM-69) › path Parameters

app_install_id
​string · uuid · required

List overrides on an app install (TM-69) › query Parameters

cursor
​string

Opaque base64url keyset cursor over (created_at, id) descending. A cursor that does not decode is 422 (API-39, API-40).

limit
​integer · min: 1 · max: 200

Page size. A value above the maximum is 422, never a silent clamp (API-38).

Default: 50

List overrides on an app install (TM-69) › Responses

A page of overrides on this app install.

​AppInstallOverride[] · required
next_cursor
​string | null · required

Create or update a project/resource-scoped override (TM-69, TM-70)

POST
https://api.hatchmate.nz
/v1/app-installs/{app_install_id}/overrides
Bearer (JWT)

Idempotent create-or-update on the unique-per-scope collision (§4.15's two partial indexes): the first call for a given (app_group_id, resource_id) scope creates the row, a later call for the same scope updates it in place — never a second row for one continuing decision (TM-70). Must scope to a group or a resource, never neither, and must set visible or version_channel, never neither (422 validation-failed, TM-69's two CHECKs). Always 200 — this endpoint never distinguishes "created" from "updated" in its response status, since the caller's request is the same either way (see report's judgment-call note).

Create or update a project/resource-scoped override (TM-69, TM-70) › path Parameters

app_install_id
​string · uuid · required

Create or update a project/resource-scoped override (TM-69, TM-70) › Headers

Idempotency-Key
​string · uuid

Client-generated UUIDv4. Optional in M0 (API-44). A repeat with the same key and body returns the stored response; a repeat with a different body is 409 idempotency-conflict (API-42).

Create or update a project/resource-scoped override (TM-69, TM-70) › Request Body

Must set `app_group_id` or `resource_id` (or both), and must set `visible` or `version_channel` (or both) — `TM-69`'s two CHECKs, enforced as `422 validation-failed` when violated.
app_group_id
​string | null · uuid
resource_id
​string | null · minLength: 1
version_channel
​string | null · minLength: 1 · maxLength: 64
visible
​boolean | null

Create or update a project/resource-scoped override (TM-69, TM-70) › Responses

The override, created or updated.

app_group_id
​string | null · uuid · required
app_install_id
​string · uuid · required
created_at
​string · date-time · required
id
​string · uuid · required
resource_id
​string | null · required
updated_at
​string · date-time · required
version_channel
​string | null · required

null = inherit from the level below (TM-69).

visible
​boolean | null · required

null = inherit from the level below (TM-69).