API Reference

HTTP API endpoints for the Sekuire Core service.

ℹ️All API requests require authentication via API key in the X-API-Key header.

Base URL

text
Production: https://api.sekuire.com/api/v1 Local: http://localhost:5556/api/v1

Authentication

Request Headerbash
X-API-Key: sk_live_your_api_key_here

Agents

Register Agent

POST /agents/registerbash
curl -X POST https://api.sekuire.com/api/v1/agents/register \ -H "X-API-Key: sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "sekuire_id": "a1b2c3d4...", "name": "My Agent", "version": "1.0.0", "public_key": "base64_encoded_public_key", "manifest_hash": "hash_of_manifest" }'

Verify Agent

GET /agents/:sekuire_id/verifybash
curl https://api.sekuire.com/api/v1/agents/a1b2c3d4.../verify \ -H "X-API-Key: sk_live_..."

Response:

json
{ "valid": true, "sekuire_id": "a1b2c3d4...", "name": "My Agent", "version": "1.0.0", "registered_at": "2024-01-15T10:30:00Z" }

Workspaces

List Workspaces

GET /workspacesbash
curl https://api.sekuire.com/api/v1/workspaces \ -H "X-API-Key: sk_live_..."

Get Workspace

GET /workspaces/:idbash
curl https://api.sekuire.com/api/v1/workspaces/ws_abc123 \ -H "X-API-Key: sk_live_..."

Agent Installations

Install Agent

POST /installationsbash
curl -X POST https://api.sekuire.com/api/v1/installations \ -H "X-API-Key: sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "workspace_id": "ws_abc123", "sekuire_id": "a1b2c3d4...", "deployment_type": "managed" }'

Bootstrap Runtime

POST /installations/:id/bootstrapbash
curl -X POST https://api.sekuire.com/api/v1/installations/inst_xyz/bootstrap \ -H "X-API-Key: sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "runtime_info": { "hostname": "agent-pod-1", "ip_address": "10.0.0.5" } }'

Heartbeat

POST /installations/:id/heartbeatbash
curl -X POST https://api.sekuire.com/api/v1/installations/inst_xyz/heartbeat \ -H "X-API-Key: sk_live_..."

Policies

Get Workspace Policy

GET /workspaces/:id/policybash
curl https://api.sekuire.com/api/v1/workspaces/ws_abc123/policy \ -H "X-API-Key: sk_live_..."

Trust Protocol

Verify Agent with Context

POST /trust/verifybash
curl -X POST https://api.sekuire.com/api/v1/trust/verify \ -H "X-API-Key: sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "sekuire_id": "7f8a9b3c...", "signature": "ed25519_signature", "context": { "workspace_id": "ws_abc123" } }'

Get Trust Profile

GET /trust/profile/:didbash
curl https://api.sekuire.com/api/v1/trust/profile/did:sekuire:7f8a9b3c... \ -H "X-API-Key: sk_live_..."

Generate Trust Headers

POST /trust/headersbash
curl -X POST https://api.sekuire.com/api/v1/trust/headers \ -H "X-API-Key: sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "sekuire_id": "7f8a9b3c...", "request_body_hash": "sha256_of_body" }'

Beacon & Liveness

Register Beacon

POST /installations/:id/beacon/registerbash
curl -X POST https://api.sekuire.com/api/v1/installations/inst_xyz/beacon/register \ -H "X-API-Key: sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "platform": "kubernetes", "metadata": { "pod_name": "agent-abc", "namespace": "prod" } }'

Revoke Agent

POST /installations/:id/revokebash
curl -X POST https://api.sekuire.com/api/v1/installations/inst_xyz/revoke \ -H "X-API-Key: sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "reason": "Security incident", "shutdown_timeout_ms": 5000 }'

Container Images

List Images

GET /imagesbash
curl https://api.sekuire.com/api/v1/images \ -H "X-API-Key: sk_live_..."

Scan Image

POST /images/:ref/scanbash
curl -X POST https://api.sekuire.com/api/v1/images/my-org%2Fmy-agent:v1.0.0/scan \ -H "X-API-Key: sk_live_..."

Get Scan Report

GET /images/:ref/scan-reportbash
curl https://api.sekuire.com/api/v1/images/my-org%2Fmy-agent:v1.0.0/scan-report \ -H "X-API-Key: sk_live_..."

Error Codes

CodeDescription
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
409Conflict - Resource already exists
422Validation Error - Invalid request body