A Configuration Management Database defined entirely as a test suite
The full API surface is defined by the OpenAPI spec at specs/openapi/cmdb.yaml and extended by the test suites. This document summarizes the contract.
A CI represents any managed resource: servers, applications, databases, network devices, certificates, containers, etc.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "prod-web-1",
"type": "server",
"attributes": {
"env": "production",
"region": "us-east-1",
"owner": "platform-team",
"port": 443
},
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-03-01T14:22:00Z"
}
id — UUID, assigned by the server on creationname — non-empty string, not unique (multiple CIs can share a name)type — non-empty string label (not an enum — any string is valid)attributes — flat key-value map of scalars only (string, number, boolean, null). Nested objects and arrays are rejected with 400/422created_at, updated_at — ISO 8601 timestamps, server-managedA directed, typed edge between two CIs.
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"source_id": "550e8400-...",
"target_id": "770e8400-...",
"type": "hosts",
"attributes": {},
"created_at": "2026-02-10T08:00:00Z"
}
Common relationship types: hosts, depends_on, connects_to, monitors, backs_up, load_balances, contains, replicates_to, managed_by.
A runtime validation rule applied to CIs of a specific type.
{
"id": "880e8400-...",
"ci_type": "server",
"rules": {
"required_attributes": ["owner", "env"],
"allowed_values": {
"env": ["prod", "staging", "dev"]
}
},
"created_at": "2026-03-10T12:00:00Z"
}
An immutable record of a change to a CI.
{
"id": "990e8400-...",
"ci_id": "550e8400-...",
"action": "updated",
"changes": {"name": {"old": "web-1", "new": "web-1-v2"}},
"timestamp": "2026-03-01T14:22:00Z",
"actor": "api-key-abc123"
}
| Method | Path | Response |
|---|---|---|
GET |
/health |
{"status": "ok"} |
| Method | Path | Request | Response | Notes |
|---|---|---|---|---|
POST |
/cis |
CIInput |
201 CI |
Enforces active policies |
GET |
/cis |
query: type, name, limit, offset |
{"items": [CI], "total": int} |
|
GET |
/cis/{id} |
— | 200 CI or 404 |
|
PUT |
/cis/{id} |
CIInput |
200 CI or 404 |
Full replacement |
DELETE |
/cis/{id} |
— | 204 or 404 or 409 |
409 if relationships exist |
POST |
/cis/bulk |
{"items": [CIInput]} |
{"items": [CI]} |
Batch creation |
GET |
/cis/{id}/history |
— | {"items": [AuditEntry]} |
Chronological, immutable |
GET |
/cis/{id}/relationships |
query: direction, type |
{"items": [Relationship]} |
direction: outbound/inbound/both |
GET |
/cis/{id}/impact |
query: depth, relationship_types |
{"items": [CI]} |
Transitive outbound traversal |
GET |
/cis/{id}/dependencies |
query: depth, relationship_types |
{"items": [CI]} |
Transitive inbound traversal |
| Method | Path | Request | Response | Notes |
|---|---|---|---|---|
POST |
/relationships |
RelationshipInput |
201 Relationship |
Both CIs must exist |
GET |
/relationships/{id} |
— | 200 Relationship or 404 |
|
DELETE |
/relationships/{id} |
— | 204 or 404 |
| Method | Path | Request | Response |
|---|---|---|---|
POST |
/policies |
{"ci_type": str, "rules": {...}} |
201 Policy |
GET |
/policies |
— | {"items": [Policy]} |
DELETE |
/policies/{id} |
— | 204 or 404 |
These are enforced by the test suites and must hold for any compliant implementation:
POST /cis returns a server-assigned UUIDcreated_at and updated_at are always present on CIsDELETE /cis/{id} on a nonexistent CI returns 404source_id and target_id must reference existing CIsoutbound = relationships where CI is the source; inbound = target; both = eithername and type are required, non-empty stringsattributes values must be scalars — nested objects and arrays are rejected (400/422)null is a valid attribute valueimpact follows outbound relationships transitivelydependencies follows inbound relationships transitivelydepth parameter limits the number of hopsrelationship_types filter narrows which edges are traversedPOST /cis and PUT /cis/{id} for the matching ci_typeCMDB_SLA_CRUD_MS)