One API.
Three styles.
Use whichever fits your stack: TypeScript SDK, REST, or GraphQL. Same data, same power, zero lock-in.
import { OspreyClient } from '@osprey/client' const osprey = new OspreyClient({ baseUrl: 'https://cms.altovar.net/api/v1', tenantId: 'acme', apiKey: process.env.OSPREY_API_KEY, }) const { data, pagination } = await osprey .collection('articles') .find({ where: { status: 'published' }, limit: 10 })
GET /api/v1/collections/articles/documents ?status=published&limit=10 x-api-key: sk_live_... 200 OK { "data": [{ "id": "doc_9f2a", "status": "published" }], "total": 42, "page": 1, "limit": 10 }
query Articles($limit: Int) { documents(collectionSlug: "articles", status: "published", limit: $limit) { data { id status data } pagination { total } } }