Complete developer reference for @vaakcms/sdk and the core RESTful HTTP API. Programmatically manage content, documents, media assets, and OCR tasks.
Type-safe client library for Node.js, Next.js, and automated CI/CD pipelines.
import { VaakCMSClient } from '@vaakcms/sdk';
const client = new VaakCMSClient({
baseUrl: 'https://api.vaagatech.com/cms',
projectId: 'proj_enterprise_01',
token: process.env.VAAK_API_KEY
});
// 1. Create a structured content entry
const article = await client.createEntry({
title: 'Sustainable Architecture in Coastal Regions',
contentType: 'article',
locale: 'en-US',
fields: {
headline: 'Sustainable Architecture',
author: 'Maya Chen',
bodyText: 'Comprehensive review of resilient building materials...'
},
folderPath: '/journal'
});
// 2. Perform Anvesh Hybrid Search with RRF Ranking
const results = await client.search('SOX compliance financial audit', {
mode: 'hybrid',
limit: 10
});
// 3. Upload media with Governor auto-routing
const mediaJob = await client.uploadMedia(videoBuffer, {
name: 'annual_summit_4k.mp4',
sizeBytes: 85_400_000,
mimeType: 'video/mp4'
});
console.log(`Execution Mode: ${mediaJob.mode} — Rationale: ${mediaJob.reason}`);
Predictable, versioned HTTP endpoints authenticated via scoped Bearer API keys.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/projects |
List all workspace projects and current user's assigned RBAC scopes. |
POST |
/api/v1/projects |
Provision a new workspace project with custom security boundaries. |
GET / PUT |
/api/v1/user/preferences |
Retrieve or persist user preferences (e.g. contentViewMode: "folder" | "table"). |
GET / POST |
/api/v1/entries |
Query or draft headless content entries with JSON Schema enforcement. |
POST |
/api/v1/search |
Execute Anvesh BM25 + dense vector hybrid search with Reciprocal Rank Fusion. |
POST |
/api/v1/ocr/process |
Submit document for Wasm OCR, Python preprocessing, and domain SLM parsing. |
POST |
/api/v1/media/process |
Submit media asset with automatic Governor sync/batch routing and pHash generation. |