Skip to main content

Recipe · Onboarding Collection read

TypeScript​

import {
buildFederationHeaders,
PATH_PLATFORM_ACCESSIBLE_COLLECTIONS,
} from '@chbrdk/plexon-federation'

export async function listCollections(base: string, secret: string, userId: string) {
const res = await fetch(`${base.replace(/\/$/, '')}${PATH_PLATFORM_ACCESSIBLE_COLLECTIONS}`, {
headers: buildFederationHeaders({
contractVersion: '2026-05-plexon-federation-v3',
serviceSecret: secret,
userId,
}),
})
if (!res.ok) throw new Error(`accessible_collections_${res.status}`)
return res.json()
}

cURL​

curl -sS "$PLEXON_STAGING_BASE/api/platform/provisioning/accessible-collections" \
-H "X-Plexon-Contract-Version: 2026-05-plexon-federation-v3" \
-H "X-Service-Secret: $PLEXON_SERVICE_SECRET" \
-H "X-Plexon-User-Id: $PLEXON_STAGING_ACTOR"

Fixture expectation: HTTP 200 with items[] or 401/403 without grant (both are valid smoke outcomes).