Skip to main content
GET
/
api
/
v1
/
schema
/
inventory
Schema Inventory
curl --request GET \
  --url https://api.cognee.ai/api/v1/schema/inventory \
  --header 'Authorization: Bearer <token>'
[
  {
    "count": 1,
    "sample_size": 1,
    "type": "<string>",
    "samples": [
      "<string>"
    ],
    "relationships": [
      {
        "relation": "<string>",
        "count": 1,
        "to_type": "<string>"
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

dataset_id
string<uuid>
required

Dataset UUID to scope the graph databases. List your datasets via GET /api/v1/datasets to find it.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

samples_per_type
integer
default:5
Required range: x >= 0
sort
string
default:count

Sort order: 'count' (default) orders types by descending instance count; 'none' preserves discovery order. Other values are rejected.

Example:

"count"

Response

Successful Response

count
integer
required

Total number of instances of this type.

Required range: x >= 0
sample_size
integer
required

Number of returned samples.

Required range: x >= 0
type
string | null

Semantic type name.

samples
(string | null)[]

Representative instance names.

relationships
SchemaInventoryRelationship · object[]

Relationship aggregates involving this semantic type.