API ReferenceContribution fragments

CF derivation graph

Walks `parentCfId`, so it covers AMENDS and VALIDATION chains.

GET
/v1/cfs/{cf_id}/lineage
/v1/cfs/{cf_id}/lineage

Path Parameters

cf_id
Required
string

The contribution fingerprint's 32-byte id, spelled cf_id — the snake_case form the /v1/cfs/* routes use. The nested /v1/datasets/{id}/cf/{cfId}/* routes spell the same value cfId. Both are load-bearing in their own URLs and cannot be unified without breaking callers.

Pattern: "^0[xX][0-9a-fA-F]{64}$"

Query Parameters

depthinteger

How many hops to walk. Default 2, hard cap 5. Unlike limit, exceeding the cap is a 400, not a clamp.

Default: 2Minimum: 0Maximum: 5

directionstring

Which way to walk: up toward ancestors, down toward descendants, or both. Empty is treated as both; any other value is a 400.

Default: "both"Value in: "up" | "down" | "both"

nodeLimitinteger

Cap on nodes returned, bounding payload size independently of depth. Default 50, hard cap 100; exceeding the cap is a 400, not a clamp. When the walk is cut short the response sets truncated: true.

Default: 50Minimum: 1Maximum: 100
curl -X GET "http://lineage-api.xny-staging.svc.cluster.local:8001/v1/cfs/0x807bacabedff64313f86ee41a00c566462c8b6fc807bacabedff64313f86ee41/lineage?depth=2&direction=up&nodeLimit=50"

The graph.

{
  "rootCfId": "0x807bacabedff64313f86ee41a00c566462c8b6fc807bacabedff64313f86ee41",
  "nodes": [
    {
      "cfId": "0x807bacabedff64313f86ee41a00c566462c8b6fc807bacabedff64313f86ee41",
      "frontierId": "0x807bacabedff64313f86ee41a00c566462c8b6fc807bacabedff64313f86ee41",
      "kind": 0,
      "contributorDidId": "00000000-0000-0000-0000-0000000007d1",
      "parentCfId": "0x807bacabedff64313f86ee41a00c566462c8b6fc807bacabedff64313f86ee41",
      "verdict": 0,
      "qualityGrade": 0
    }
  ],
  "edges": [
    {
      "from": "0x807bacabedff64313f86ee41a00c566462c8b6fc807bacabedff64313f86ee41",
      "to": "0x807bacabedff64313f86ee41a00c566462c8b6fc807bacabedff64313f86ee41",
      "type": "derived_from"
    }
  ],
  "truncated": true
}

Last updated