DocumentationAPI ReferenceOverview

API Reference

CoreSDK has three API surfaces. None of them are called by SDK consumers directly — the SDK talks REST to cpod-backend, which proxies internally.


Surfaces at a Glance

SurfaceURLReachable fromPurpose
cpod-backend RESThttps://api.yourdomain.comInternetSDK calls, OAuth flows, all app APIs
CoreSDK Control Planehttp://coresdk-cp:8080Internal network onlyApp registration, policy, JWKS, SCIM
CoreSDK Sidecar gRPC[::1]:50051cpod-backend only (loopback)Token validation, Rego, audit, jobs, secrets
Sidecar health/metricshttp://coresdk:9091Internal network/healthz, Prometheus /metrics
⚠️

:8080 and :50051 are never called by your application code or the SDK. They are internal infrastructure. Only cpod-backend calls the sidecar. Only CI/ops pipelines call the Control Plane for bootstrap tasks.


cpod-backend — Public REST API

All SDK calls and OAuth flows go through cpod-backend. These are the endpoints your code uses:

OAuth

MethodPathDescription
GET/oauth/authorizeConsent screen — redirect users here for PKCE flow
POST/v1/oauth/tokenIssue access token (client_credentials / authorization_code / refresh_token)
POST/v1/oauth/introspectInspect token claims (RFC 7662)
POST/v1/oauth/revokeRevoke a token (RFC 7009)
GET/v1/oauth/me/grantsList active grants for authenticated user

App Management

MethodPathAuthDescription
POST/v1/oauth/appsAdmin tokenRegister an OAuth app
GET/v1/oauth/appsAdmin tokenList registered apps
DELETE/v1/oauth/apps/:idAdmin tokenDelete an app
POST/v1/oauth/apps/:id/rotate-secretAdmin tokenRotate client secret

Platform APIs

PathDescription
/v1/skills/*Skill execution
/v1/workflows/*Workflow management
/v1/projects/*Project management
/v1/users/*User management
/v1/files/*File storage

Control Plane — Internal Admin REST (:8080)

Used by cpod-backend internally and by ops/CI for bootstrap tasks. Never call from application code.

MethodPathDescription
POST/oauth/tokenToken issuance (proxied via cpod-backend)
GET/oauth/authorizeConsent redirect (proxied via cpod-backend)
POST/oauth/introspectToken inspection (proxied via cpod-backend)
POST/oauth/revokeToken revocation (proxied via cpod-backend)
POST/api/v1/appsRegister OAuth application
GET/api/v1/appsList apps
POST/api/v1/apps/:id/rotate-secretRotate secret
POST/api/v1/scopesDefine custom scope
GET/api/v1/jwksPublic JWKS (RS256 public keys)
PUT/api/v1/tenants/:id/policyUpload Rego policy bundle
GET/api/v1/auditQuery audit events
GET/api/v1/token-eventsToken issuance/revocation stream
/scim/v2/*SCIM 2.0 federation

Sidecar gRPC (:50051 — loopback only)

Called exclusively by cpod-backend. Reference only — your code never calls this.

ServiceKey RPCs
AuthServiceValidateToken, Authorize, RevokeToken, RefreshToken, GetJwks
PolicyServiceEvaluate, DryRun, WatchPolicyUpdates (stream)
AuditServiceEmitAuditEvent, QueryAudit
MaskingServiceMask, MaskString
SecretsServiceResolveSecret
JobServiceSubmitJob, WatchJob, GetJobLogs, CancelJob
FlagServiceEvaluateFlag
RateLimitServiceCheckRateLimit, ResetRateLimit
TenantServiceResolveTenant, ValidateIsolation

Error Format

All cpod-backend endpoints return errors in this shape:

{
  "error": "invalid_client",
  "error_description": "client_secret is incorrect",
  "status": 401
}

OAuth errors follow RFC 6749 codes: invalid_client, invalid_grant, invalid_scope, unauthorized_client, unsupported_grant_type.

HTTP status codes are standard: 400, 401, 403, 404, 409, 422, 429, 500.