v2026.1 Open Portal ↗
On this page

CMDB API

Endpoints Overview

MethodPathDescription
GET/prod/api/cmdb/cisList configuration items
GET/prod/api/cmdb/cis/:idGet single CI
POST/prod/api/cmdb/cisCreate CI
PATCH/prod/api/cmdb/cis/:idUpdate CI
DELETE/prod/api/cmdb/cis/:idRetire CI
GET/prod/api/cmdb/cis/:id/relationshipsGet CI relationships
POST/prod/api/cmdb/cis/:id/relationshipsAdd relationship
GET/prod/api/cmdb/searchFull-text CI search
POST/prod/api/cmdb/graph/queryNeptune Gremlin query

List CIs

curl -H "Authorization: Bearer $TOKEN"   "https://your-instance.stackflow-tech.com/prod/api/cmdb/cis?class=aws_lambda&state=active&limit=50"
Query ParamDescriptionExample
classCI class filterserver, aws_lambda, database, network_device
stateCI operational stateactive, maintenance, retired
environmentEnvironment tagproduction, staging, development
ownerOwner email or groupplatform-eng@example.com
tagCI tag filtercost-center:platform

Get CI

{
  "id": "CI0000789",
  "name": "StackFlowAPI",
  "class": "aws_lambda",
  "state": "active",
  "environment": "production",
  "description": "Primary StackFlow API Lambda function",
  "attributes": {
    "function_name": "StackFlowAPI",
    "runtime": "nodejs22.x",
    "architecture": "arm64",
    "memory_mb": 1792,
    "timeout_sec": 300,
    "region": "us-east-1",
    "account_id": "373544523367"
  },
  "owner": "platform-eng@example.com",
  "assignment_group": "Platform Engineering",
  "tags": {"Environment": "production", "CostCenter": "platform"},
  "relationships": [
    {"type": "depends_on", "ci_id": "CI0000790", "ci_name": "StackFlow-Aurora-Main"},
    {"type": "depends_on", "ci_id": "CI0000791", "ci_name": "StackFlow-Redis"}
  ],
  "last_discovered": "2026-05-19T12:00:00Z",
  "created_at": "2025-01-15T00:00:00Z"
}

Create CI

curl -X POST   https://your-instance.stackflow-tech.com/prod/api/cmdb/cis   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "name": "app-server-prod-01",
    "class": "server",
    "state": "active",
    "environment": "production",
    "attributes": {
      "ip_address": "10.0.1.50",
      "os": "Amazon Linux 2023",
      "cpu_cores": 8,
      "memory_gb": 32
    },
    "owner": "platform-eng@example.com",
    "tags": {"Environment": "production"}
  }'

CI Relationships

# Get all relationships for a CI
curl -H "Authorization: Bearer $TOKEN"   https://your-instance.stackflow-tech.com/prod/api/cmdb/cis/CI0000789/relationships

# Add a relationship
curl -X POST   https://your-instance.stackflow-tech.com/prod/api/cmdb/cis/CI0000789/relationships   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "target_ci_id": "CI0000795",
    "relationship_type": "depends_on",
    "direction": "outbound"
  }'

Supported relationship types: depends_on, hosted_on, connects_to, contains, owned_by, used_by, backed_up_to.

curl -H "Authorization: Bearer $TOKEN"   "https://your-instance.stackflow-tech.com/prod/api/cmdb/search?q=aurora+production&class=database"

Neptune Graph Query Endpoint

For advanced graph traversals, use the Neptune proxy endpoint. Queries are written in Gremlin and executed against the Amazon Neptune cluster at stackflow-knowledge-graph.cluster-c6pq0smgmlri.us-east-1.neptune.amazonaws.com:8182.

curl -X POST   https://your-instance.stackflow-tech.com/prod/api/cmdb/graph/query   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "query": "g.V().has("ci_id", "CI0000789").repeat(out("depends_on")).times(3).path().by("name")",
    "max_depth": 3
  }'
{
  "paths": [
    ["StackFlowAPI", "StackFlow-Aurora-Main", "aurora-subnet-group"],
    ["StackFlowAPI", "StackFlow-Redis", "elasticache-subnet-group"]
  ],
  "ci_count": 5,
  "execution_time_ms": 48
}
Query Limits: Neptune graph queries are limited to max_depth=5 and 10-second execution timeout via the API. For larger traversals, use the Neptune Analytics console directly from within the VPC.

Field Reference

FieldTypeDescription
namestringCI display name (required)
classstringCI class: server, database, network_device, aws_lambda, aws_rds, aws_ec2, etc.
stateenumactive, maintenance, retired, disposed
environmentstringproduction, staging, development, dr
attributesobjectClass-specific attributes (flexible schema)
ownerstringOwner email
last_discoveredISO 8601Last auto-discovery timestamp