Complete REST API documentation for Vectorize control plane.
Base URL: http://localhost:8080/api/v1
Most endpoints require JWT authentication. Include the token in the Authorization header:
Authorization: Bearer <jwt_token>
# Check if setup is needed
GET /setup/status
# Response: { "needs_setup": true/false, "has_admin": false }
# Create admin account
POST /setup/init
Content-Type: application/json
{
"username": "admin",
"email": "admin@example.com",
"password": "your_password"
}POST /auth/login
Content-Type: application/json
{
"identifier": "admin", # username or email
"password": "your_password"
}
# Response: { "token": "jwt_token", "user": {...} }
POST /auth/logout # Invalidates current session
GET /auth/me # Get current user infoGET /agents
# Response: [{ "id": "...", "name": "...", "url": "...", "status": "healthy" }, ...]GET /agents/:id
# Response: { "id": "...", "name": "...", "url": "...", "group_id": "...", "vector_version": "..." }POST /agents
Content-Type: application/json
{
"name": "prod-agent-1",
"url": "http://192.168.1.10:8686",
"group_id": "optional-group-id"
}PUT /agents/:id
Content-Type: application/json
{
"name": "new-name",
"group_id": "new-group-id"
}DELETE /agents/:idGET /groups
# Response: [{ "id": "...", "name": "...", "deployment_strategy": "rolling", "agent_count": 3 }, ...]GET /groups/:idPOST /groups
Content-Type: application/json
{
"name": "production",
"description": "Production Vector instances",
"deployment_strategy": "rolling", # basic, rolling, canary
"requires_approval": true,
"approvers": ["user1@example.com"]
}PUT /groups/:id
Content-Type: application/json
{
"name": "new-name",
"deployment_strategy": "canary",
"requires_approval": false
}DELETE /groups/:idGET /groups/:id/agentsGET /groups/:id/config
# Response: { "config": "...", "version": "abc123...", "group_name": "..." }GET /groups/:id/config/:versionPUT /groups/:id/config
Content-Type: application/json
{
"config": "[sources.demo]\ntype = \"demo_logs\"\n..."
}
# Response: { "success": true, "version": "new_commit_hash" }GET /groups/:id/history?limit=50
# Response: [{ "hash": "...", "message": "...", "timestamp": "..." }, ...]POST /groups/:id/rollback
Content-Type: application/json
{
"version": "commit_hash_to_rollback_to"
}GET /groups/:id/diff?from=hash1&to=hash2
# Response: { "diff": "...", "has_changes": true }POST /groups/:id/deployments
Content-Type: application/json
{
"config_version": "optional_version", # defaults to current
"force": false, # ignore version mismatch
"rolling_options": {
"batch_size": 2,
"batch_delay_secs": 30,
"pause_on_failure": true,
"max_failures": 1
},
"canary_options": {
"canary_percentage": 10,
"canary_wait_secs": 300,
"auto_promote": false
}
}
# Response: { "deployment_id": "...", "status": "pending_approval", "requires_approval": true }GET /deployments/:id
# Response: {
# "id": "...",
# "status": "in_progress",
# "stats": { "total": 5, "completed": 2, "failed": 0, "in_progress": 1, "pending": 2 },
# "agents": [...]
# }GET /groups/:id/deployments?limit=50POST /deployments/:id/approve
Content-Type: application/json
{
"approved_by": "admin"
}POST /deployments/:id/reject
Content-Type: application/json
{
"rejected_by": "admin",
"reason": "Config issue found"
}POST /deployments/:id/cancelGET /groups/:id/versions
# Response: { "consistent": true, "versions": [{ "version": "0.54.0", "agents": [...] }] }POST /validate/quick
Content-Type: application/json
{
"config": "[sources.demo]\ntype = \"demo_logs\"\n..."
}
# Response: { "valid": true, "errors": [], "warnings": [] }POST /validate
Content-Type: application/json
{
"config": "[sources.demo]\ntype = \"demo_logs\"\n..."
}Run sample data through a configuration to verify transforms work correctly.
POST /test
Content-Type: application/json
{
"config": "[sources.demo]\ntype = \"stdin\"\n...",
"sample_events": [
{"message": "test event 1", "level": "info"},
{"message": "error occurred", "level": "error"}
],
"source_id": "demo", # optional
"timeout_secs": 30 # optional, default 30
}
# Response: { "test_id": "uuid", "status": "running", "message": "..." }GET /test/:id
# Response: {
# "test_id": "...",
# "status": "completed",
# "input_events": 2,
# "output_events": [...],
# "output_count": 1,
# "dropped_count": 1,
# "duration_ms": 1234,
# "errors": [],
# "started_at": "...",
# "completed_at": "..."
# }GET /test
# Response: [{ "test_id": "...", "status": "...", ... }, ...]GET /health/agents
# Response: [{ "agent_id": "...", "healthy": true, "latency_ms": 45 }, ...]GET /health/agents/:id/history?limit=100GET /metricsGET /topologyGET /alerts/rulesPOST /alerts/rules
Content-Type: application/json
{
"name": "Agent Down",
"condition": {
"type": "agent_unhealthy",
"consecutive_failures": 3
},
"channels": ["channel-id-1"],
"enabled": true
}GET /alerts/channelsPOST /alerts/channels
Content-Type: application/json
{
"name": "Slack Alerts",
"type": "slack",
"config": {
"webhook_url": "https://hooks.slack.com/..."
}
}POST /alerts/channels/:id/testGET /usersPOST /users
Content-Type: application/json
{
"username": "newuser",
"email": "user@example.com",
"password": "password",
"role_id": "role-id"
}PUT /users/:idDELETE /users/:idGET /rolesGET /roles/permissionsPOST /roles
Content-Type: application/json
{
"name": "deployer",
"description": "Can deploy configs",
"permissions": ["groups:read", "groups:deploy", "configs:read"]
}GET /audit?actor_id=user-id&action=deployment.create&limit=100GET /audit/actionsGET /tap/config
# Response: { "rate_limiting": {...}, "websocket_enabled": true }GET /tap/:agent_id/sample?patterns=*&limit=10GET /tap/:agent_id/rate-limit
# Response: { "can_sample": true, "config": {...} }GET /tap/:agent_id/ws-info
# Response: { "websocket_url": "ws://localhost:8686/graphql", "protocol": "graphql-transport-ws" }GET /git/remotesPOST /git/remotes
Content-Type: application/json
{
"name": "origin",
"url": "git@github.com:org/configs.git"
}DELETE /git/remotes/:namePOST /git/remotes/:name/push
Content-Type: application/json
{
"branch": "main"
}POST /git/remotes/:name/pull
Content-Type: application/json
{
"branch": "main"
}POST /git/remotes/:name/sync
Content-Type: application/json
{
"branch": "main"
}GET /git/remotes/:name/status
# Response: { "ahead": 2, "behind": 0, "synced": false }GET /git/branches
# Response: { "current": "main", "branches": [...] }POST /git/branches
Content-Type: application/json
{
"name": "feature-branch"
}POST /git/branches/:name/checkoutAll error responses follow this format:
{
"error": "Description of the error"
}Common HTTP status codes:
400- Bad Request (validation error, invalid input)401- Unauthorized (missing or invalid token)403- Forbidden (insufficient permissions)404- Not Found409- Conflict (e.g., duplicate name)429- Too Many Requests (rate limited)500- Internal Server Error