- Phoenix API Railing: proxy to PHOENIX_RAILING_URL, tenant me routes - Tenant-auth: X-API-Key support for /api/v1/* (api_keys table) - Migration 026: api_keys table; 025 sovereign stack marketplace - GET /graphql/schema, GET /graphql-playground, api/docs OpenAPI - Integration tests: phoenix-railing.test.ts - docs/api/API_VERSIONING: /api/v1/ railing alignment - docs/phoenix/PORTAL_RAILING_WIRING Made-with: Cursor
API Documentation
GraphQL API
The Sankofa Phoenix API is a GraphQL API built with Apollo Server.
Endpoint
- Development:
http://localhost:4000/graphql - Production:
https://api.sankofa.nexus/graphql
Authentication
All queries and mutations (except login) require authentication via JWT token:
Authorization: Bearer <token>
Schema
See schema.graphql for the complete GraphQL schema.
Queries
Get Resources
query GetResources($filter: ResourceFilter) {
resources(filter: $filter) {
id
name
type
status
site {
id
name
}
}
}
Get Sites
query GetSites {
sites {
id
name
region
status
}
}
Get Current User
query GetMe {
me {
id
email
name
role
}
}
Mutations
Login
mutation Login($email: String!, $password: String!) {
login(email: $email, password: $password) {
token
user {
id
email
name
}
}
}
Create Resource
mutation CreateResource($input: CreateResourceInput!) {
createResource(input: $input) {
id
name
type
status
}
}
Error Handling
The API returns errors in the standard GraphQL error format:
{
"errors": [
{
"message": "Authentication required",
"extensions": {
"code": "UNAUTHENTICATED"
}
}
]
}
Error Codes
UNAUTHENTICATED: Authentication requiredFORBIDDEN: Insufficient permissionsNOT_FOUND: Resource not foundVALIDATION_ERROR: Input validation failedSERVER_ERROR: Internal server error
Rate Limiting
- 100 requests per minute per IP
- 1000 requests per hour per authenticated user
Examples
See examples.md for more usage examples.