Client packages #
platform4 publishes a generated TypeScript client for each API module. Download the npm-compatible tarball directly from this site.
What you get #
| Artifact | Published artifact | Notes |
|---|---|---|
| OpenAPI | /specs/oneroster/openapi.json |
Replace oneroster with a module slug, or use the link in its API reference |
| TypeScript client | /downloads/oneroster-client.tgz |
Replace oneroster with a module slug or use the table below |
Downloads (v1) #
The current deployment publishes these 16 archives:
| Module | Download |
|---|---|
| platform | /downloads/platform-client.tgz |
| oneroster | /downloads/oneroster-client.tgz |
| caliper | /downloads/caliper-client.tgz |
| qti | /downloads/qti-client.tgz |
| case | /downloads/case-client.tgz |
| nweamap | /downloads/nweamap-client.tgz |
| applications | /downloads/applications-client.tgz |
| edfi | /downloads/edfi-client.tgz |
| content | /downloads/content-client.tgz |
| events | /downloads/events-client.tgz |
| results | /downloads/results-client.tgz |
| peopleAndOrgs | /downloads/peopleAndOrgs-client.tgz |
| curriculum | /downloads/curriculum-client.tgz |
| analytics | /downloads/analytics-client.tgz |
| clr | /downloads/clr-client.tgz |
| commerce | /downloads/commerce-client.tgz |
If an archive is unavailable, use the OpenAPI contract with the curl or fetch samples in Getting started and report the missing file to platform4@alphaschool.dev.
Integration skill pack #
A versioned coding-agent integration pack is published beside the clients:
| Artifact | URL |
|---|---|
| Versioned zip | /downloads/platform4-skill-pack-<deploy-tag>.zip |
| Latest alias | /downloads/platform4-skill-pack-latest.zip |
The zip contains SKILL.md, skill-pack.json, per-module references, and verify.mjs. Client tarballs are linked rather than embedded. The pack's SKILL.md documents authentication and wire-format rules.
Install from tarball #
npm install ./oneroster-client.tgz
Keep the downloaded client version aligned with the OpenAPI contract deployed to your environment.
First call (TypeScript) #
createClient mints and refreshes a client-credentials token. Pass baseUrl as either the Core API base (https://alpha.platform4.alphaschool.dev) or a standards integration base such as https://oneroster.platform4.alphaschool.dev. Match the base URL to the paths in that module's OpenAPI contract. Method names come from the generated API classes, for example organization.listOrgs.
import { createClient } from "@platform4/oneroster";
const client = createClient({
baseUrl: process.env.PLATFORM4_BASE_URL!, // Core API or standards host
clientId: process.env.PLATFORM4_CLIENT_ID!,
clientSecret: process.env.PLATFORM4_CLIENT_SECRET!,
tokenUrl: process.env.PLATFORM4_TOKEN_URL!,
});
const { orgs } = await client.organization.listOrgs({ limit: 25 });