Hatchmate Core API

Resource catalogue registration.


Register a catalogue resource (E21)

POST
https://api.hatchmate.nz
/v1/catalogue/resources
Bearer (JWT)

Registers a resource in the acting customer. app_group_id must belong to the acting customer or the response is 404. A resource_id equal to the literal * is 422 (TM-39, API-68).

Register a catalogue resource (E21) › 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).

Register a catalogue resource (E21) › Request Body

app
​string · minLength: 1 · maxLength: 63 · required
app_group_id
​string · uuid · required
resource_id
​string · minLength: 1 · required

Unique within (customer, group); * rejected.

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

Globally unique, owned by one app (TM-46).

Register a catalogue resource (E21) › Responses

The catalogue entry was created.

app
​string · required
app_group_id
​string · uuid · required
created_at
​string · date-time · required
id
​string · uuid · required
resource_id
​string · required
resource_type
​string · pattern: ^[a-z0-9][a-z0-9_]{0… · required

Fetch a catalogue entry (E22)

GET
https://api.hatchmate.nz
/v1/catalogue/resources/{catalogue_id}
Bearer (JWT)

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

Fetch a catalogue entry (E22) › path Parameters

catalogue_id
​string · uuid · required

Fetch a catalogue entry (E22) › Responses

The catalogue entry.

app
​string · required
app_group_id
​string · uuid · required
created_at
​string · date-time · required
id
​string · uuid · required
resource_id
​string · required
resource_type
​string · pattern: ^[a-z0-9][a-z0-9_]{0… · required

Delete a catalogue entry (E23)

DELETE
https://api.hatchmate.nz
/v1/catalogue/resources/{catalogue_id}
Bearer (JWT)

Soft-deletes the row, writes the audit row and bumps the epoch for every (user, customer) pair in the acting customer before 204 (API-69).

Delete a catalogue entry (E23) › path Parameters

catalogue_id
​string · uuid · required

Delete a catalogue entry (E23) › 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).

Delete a catalogue entry (E23) › Responses

The catalogue entry was deleted. No body.

No data returned