REST API Overview
The SICTACK REST API provides centralized policy management, human-in-the-loop approval triage, machine-to-machine tool interception, and tamper-evident audit logging for distributed AI agent deployments.
Base URLs & Environments
All API requests must be transmitted over HTTPS in production. Unencrypted HTTP traffic is rejected.
| Environment | Base URL | Usage |
|---|---|---|
| Production (Cloud) | YOUR_SICTACK_API_URL | Live multi-tenant API gateway backed by PostgreSQL. |
| Local Development | http://localhost:8000 | Local FastAPI instance backed by SQLite or local PostgreSQL. |
Test gateway connectivity with the unauthenticated health check endpoint:
# Verify API gateway connectivity
curl -X GET "YOUR_SICTACK_API_URL/health"{
"status": "healthy",
"service": "SICTACK API",
"version": "2.0.0",
"database": "postgresql"
}Versioning & Path Prefix
All functional operations are versioned under the /api/v1 path prefix. Backward-incompatible changes will be introduced under future version prefixes (/api/v2).
Request & Response Conventions
- Content-Type: All POST, PUT, and PATCH request bodies must be JSON encoded with
Content-Type: application/json. - Date-Time Formatting: All timestamps in requests and responses conform to ISO 8601 UTC strings (e.g.
2026-11-16T12:00:00Z). - Deterministic Field Naming: Request and response property keys strictly follow
snake_case(e.g.action_hash,risk_score).
Authentication Overview
SICTACK uses dual authentication channels:
JWT Bearer Session Tokens
Obtained via POST /api/v1/auth/login. Transmitted in the standard Authorization: Bearer <token> header.
SICTACK API Keys
Scoped API keys prefixed with ilk_live_.... Transmitted via the X-API-Key: <key> header.
Multi-Tenancy & Organization Scoping
Every user account and API key is associated with an organization (org_id). All policies, agents, approvals, intent contexts, audit records, and threat detections are partitioned by organization ID.
SICTACK scopes policies, audit logs, agents, and approvals by tenant org_id. Shared default templates and baseline policies exist under default-org. In local development environments, unauthenticated requests fall back to default-org for backward-compatible demonstration.
HTTP Status Codes & Error Format
Errors return standardized JSON objects containing a detail property:
{
"detail": "Action denied by security policy: tool 'drop_table' is forbidden."
}| Status | Meaning | Typical Cause |
|---|---|---|
| 200 OK | Success | Request completed successfully. |
| 201 Created | Created | Resource created (e.g. policy, agent, API key). |
| 204 No Content | No Content | Resource successfully deleted or revoked. |
| 400 Bad Request | Client Error | Malformed syntax or invalid query parameters. |
| 401 Unauthorized | Unauthenticated | Missing or expired Bearer token or invalid API key. |
| 403 Forbidden | Permission Denied | User lacks required RBAC role (e.g. ADMIN required). |
| 404 Not Found | Not Found | Requested resource does not exist in your organization. |
| 422 Unprocessable | Schema Validation | Pydantic validation failure on request payload. |
| 500 Server Error | Internal Error | Unexpected server fault (internal traces sanitized). |
Rate Limits & Concurrency
The SICTACK backend currently does not enforce application-level token bucket rate limits in code. Rate limiting is not active by default in the application layer. For production deployments with high volume, configure a rate-limiting reverse proxy, API gateway, or cloud firewall (e.g. Cloudflare, AWS WAF, or Nginx) in front of the FastAPI backend.