Quickstart

This guide assumes you already have a workspace and either a Cognito-backed browser session or a freshly minted API token.

1. Verify connectivity

bash
curl -sS https://api.primicornis.com/health

Expected payload includes "status":"ok" and the deployed service name.

2. Authenticated GET

Replace placeholders with your workspace UUID (or slug where supported) and a valid bearer secret.

Bash

bash
export PRIM_TOKEN="prim_<uuid>_<64-hex-secret>"
export API_BASE="https://api.primicornis.com"

curl -sS "$API_BASE/workspaces" \
  -H "Authorization: Bearer $PRIM_TOKEN"

TypeScript

typescript
const token = process.env.PRIMICORNIS_TOKEN!;
const api = process.env.PRIMICORNIS_API_BASE ?? "https://api.primicornis.com";

const res = await fetch(`${api}/workspaces`, {
  headers: { Authorization: `Bearer ${token}` }
});

if (!res.ok) throw new Error(await res.text());
console.log(await res.json());

Python

python
import os, requests

token = os.environ["PRIMICORNIS_TOKEN"]
api = os.environ.get("PRIMICORNIS_API_BASE", "https://api.primicornis.com")

r = requests.get(f"{api}/workspaces", headers={"Authorization": f"Bearer {token}"}, timeout=30)
r.raise_for_status()
print(r.json())

3. Create a record (pattern)

Records are always namespaced:

/workspaces/{workspaceId}/object-definitions/{objectDefinitionId}/records

Fetch object definition IDs from metadata endpoints or the Primicornis UI network tab, then POST a JSON body whose keys match property keys (not labels).

4. Explore OpenAPI

Open /reference on this portal or pull openapi.json into Postman to generate a collection with the exact schemas your workspace expects.