Logo
NeoArc Studio

API Lineage Tracking

Trace data from REST API endpoints through schemas to model entities. Each endpoint references schemas, and those schemas track lineage to properties in the data model.

API lineage tracking connects REST endpoints to the data model. Every endpoint references schemas for its request and response payloads, and those schemas track lineage to entity properties in model.neoarc. This creates full traceability from API contract to canonical data model.

The Lineage Chain

Lineage flows through three layers:

1. REST Endpoint
API operation with path, method, and schema references for request and response bodies
2. Schema
Data contract defining fields, types, validation rules, and lineage entries pointing to model properties
3. Data Model
Entities and properties defined in model.neoarc, the canonical source of truth

How It Works

The connection between endpoints and the data model is indirect but fully traceable. Endpoints reference schemas via schemaRef. Each schema field contains lineage entries that map to model entity properties using sourceType: "graph".

{
  "sourceType": "graph",
  "graphFilePath": "model.neoarc",
  "nodeName": "Book",
  "nodeId": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
  "propertyName": "Title"
}

Tracing an Endpoint to the Model

To trace data from a REST endpoint to its model source:

Example: Schema Field to Model Property

A Book schema might trace its fields to properties on the Book entity in the model:

Schema FieldModel EntityModel PropertyNotes
idBookBookIdPrimary identifier
titleBookTitleBook title
authorBookAuthorAuthor name
isbnBookISBNUnique ISBN identifier
publishedYearBookPublishedYearPublication year
copiesAvailableBookCopiesAvailableCurrent inventory count

Cross-Entity Lineage

Schemas that reference multiple entities create lineage entries across different model nodes. For example, a Loan schema might map its fields to properties on both the Loan entity and related entities:

Schema FieldModel EntityModel PropertyNotes
idLoanLoanIdPrimary identifier
memberIdMemberMemberIdReference to the Member entity
bookIdBookBookIdReference to the Book entity
loanDateLoanLoanDateDate the loan was created
returnDateLoanReturnDateExpected or actual return date

Lineage in Path Parameters

Path parameters such as /books/{bookId} also have lineage. Path parameter schemas extend a generic IdPathParam and override lineage to point to the correct model entity.

Path Parameter SchemaModel EntityModel Property
BookIdPathParamBookBookId
OrderIdPathParamOrderOrderId
CustomerIdPathParamCustomerCustomerId

Visualising the Chain in the Intent Graph

The Intent Graph captures the full lineage chain as edges:

EdgeFromToMeaning
depends-onREST EndpointSchemaEndpoint uses this schema for request or response
maps-toSchema FieldModel PropertyField traces to this model entity property
derived-fromSchema FieldSchema FieldInherited field from parent schema

Querying the Intent Graph reveals the complete dependency chain. Before modifying a model entity property, query to find all schema fields that map to it, then find all endpoints that depend on those schemas.

Why API Lineage Matters

Impact Analysis
Before changing a model entity property, see which API fields and endpoints are affected
Data Governance
Document the model source of every piece of data exposed through your APIs
Debugging
Trace data issues from API response back to the model entity property
Compliance
Demonstrate data provenance for audit and regulatory requirements

Setting Up API Lineage

Related Content