API Reference
REST API endpoints for programmatic access
The HLOS API allows you to manage secrets programmatically. All endpoints require authentication via Bearer token or API key.
Base URL
https://api.hlos.aiAuthentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYGenerate API keys from your HLOS dashboard under Settings → API Keys.
/v1/auth/tokenExchange OAuth code for access token.
codestringrequiredOAuth authorization coderedirect_uristringrequiredRedirect URI used in OAuth flow{ "access_token": "...", "token_type": "Bearer", "expires_in": 3600 }/v1/auth/meGet current authenticated user info.
{ "id": "user_...", "email": "user@example.com", "name": "John Doe" }/v1/spacesList all spaces accessible to the authenticated user.
limitnumberMax results (default: 20, max: 100)offsetnumberPagination offset{ "items": [...], "total": 5, "hasMore": false }/v1/spacesCreate a new space.
namestringrequiredSpace name (lowercase, hyphens only)descriptionstringOptional description{ "id": "space_...", "name": "my-project", "createdAt": "..." }/v1/spaces/:idGet a specific space by ID.
{ "id": "space_...", "name": "my-project", "secretCount": 12, ... }/v1/spaces/:idDelete a space and all its secrets.
{ "deleted": true }/v1/secretsList secrets in a space (metadata only, never values).
spaceIdstringFilter by space (default: active space)providerstringFilter by provider typescopestringFilter by scope (development/staging/production)searchstringSearch secret names{ "items": [{ "id": "...", "name": "OPENAI_API_KEY", "provider": "openai", ... }], ... }/v1/secrets/:nameGet a specific secret value. Requires explicit permission.
spaceIdstringSpace to look in{ "name": "OPENAI_API_KEY", "value": "sk-...", "provider": "openai" }/v1/secretsCreate a new secret.
namestringrequiredSecret name (UPPER_SNAKE_CASE)valuestringrequiredSecret valuespaceIdstringTarget spaceproviderstringProvider typescopestringSecret scopedescriptionstringOptional description{ "id": "secret_...", "name": "API_KEY", "createdAt": "..." }/v1/secrets/:nameUpdate an existing secret value.
valuestringrequiredNew secret valuespaceIdstringTarget space{ "updated": true, "name": "API_KEY" }/v1/secrets/:nameDelete a secret.
spaceIdstringTarget space{ "deleted": true }/v1/healthCheck health status of secrets in a space.
spaceIdstringTarget spaceseveritystringMin severity (low/medium/high/critical){ "issues": [{ "secretName": "...", "type": "rotation_overdue", "severity": "high", ... }] }JavaScript SDK
For a simpler interface, use the official SDK:
npm install @hlos/sdkimport { HlosClient } from '@hlos/sdk';
const hlos = new HlosClient({
apiKey: process.env.HLOS_API_KEY,
});
// List all spaces
const spaces = await hlos.spaces.list();
// Get secrets from a space
const secrets = await hlos.secrets.list('my-project');
// Get a specific secret value
const apiKey = await hlos.secrets.get('my-project', 'OPENAI_API_KEY');
// Set a secret
await hlos.secrets.set('my-project', 'NEW_KEY', 'secret-value');Rate Limits
API requests are rate limited per account:
- • Free tier: 100 requests/minute
- • Pro tier: 1,000 requests/minute
- • Enterprise: Custom limits
Rate limit headers are included in all responses: X-RateLimit-Remaining