Skip to main content

Graph

Generated from apiome-rest/openapi.yaml (API version 1.307.0) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: graph · 6 operations

POST /v1/graph/{tenant_slug}/blast-radius​

Ask what a change affects

Who depends on entity (optionally narrowed to pointers into it), directly and transitively, along inbound consumes, depends_on and runtime_calls edges — each with its edge path, provenance and owner team — and the evidence a change invalidates: verification runs, consumer contracts, deploy-gate evaluations, SDK regeneration targets, agent-toolset tools, mock fixture packs and scenarios, and consumers pinned to a deprecated or sunset version. The direct consumes layer is the consumer-impact intersection, so the two agree. At most 5 levels and 2,000 entities; truncated is true past that. evidence_checked: true with empty sections means nothing is affected.

Requires projects:view.

Operation id: post_blast_radius_v1_graph__tenant_slug__blast_radius_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for ask what a change affects.

Responses

StatusDescriptionBody
200Successful response for ask what a change affects.application/json BlastRadiusResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/graph/{tenant_slug}/entities​

Search the entities in the dependency graph

Every entity that has at least one edge, most connected first, with its name, owner team and in/out/stale edge counts. Filter with q (name or slug), kind and provenance (each repeatable) and team (owner team slug). limit is 1–2000 (default 200); truncated is true when more match.

Requires projects:view.

Operation id: get_graph_entities_v1_graph__tenant_slug__entities_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
qquerystring or nullnoSubstring of the name or slug.
kindqueryarray of string or nullnoNode kinds to keep.
teamquerystring or nullnoOwner team slug.
provenancequeryarray of string or nullnoOnly count edges of these provenances.
limitqueryintegernoMaximum number of rows to return.
offsetqueryintegernoNumber of rows to skip before returning results.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for search the entities in the dependency graph.application/json GraphEntityPage
422Validation Errorapplication/json HTTPValidationError

GET /v1/graph/{tenant_slug}/entities/{kind}/{entity_id}/edges​

List an entity's graph edges

The entity's edges in the catalog dependency graph. direction is out (edges from the entity, the default) or in (edges to it); kind and provenance filter and may repeat. limit is 1–500 (default 100); truncated is true when more edges match. Stale edges come last with stale: true.

Requires projects:view.

Operation id: get_entity_edges_v1_graph__tenant_slug__entities__kind___entity_id__edges_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
kindpathstringyesPath parameter identifying the kind segment.
entity_idpathstringyesPath parameter identifying the entity id segment.
directionquerystringnoout or in.
kindqueryarray of string or nullnoEdge kinds to keep.
provenancequeryarray of string or nullnoProvenances to keep.
limitqueryintegernoMaximum number of rows to return.
offsetqueryintegernoNumber of rows to skip before returning results.
labelsquerybooleannoAdd each end's name, slug and owner team.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list an entity's graph edges.application/json GraphEdgePage
422Validation Errorapplication/json HTTPValidationError

GET /v1/graph/{tenant_slug}/entities/{kind}/{entity}/dependencies​

Read an entity's declared dependencies

Every declared edge the entity has — written here (source_ref: manual), read from its spec's x-apiome-depends-on (spec) or from a Backstage catalog-info.yaml in its repository (backstage:<path>) — and the references that resolved to nothing (unresolved).

kind is project, catalog_item, mcp_endpoint, consumer or connector; a project or catalog item may be named by slug instead of id. Reading needs the kind's view and changing needs its edit (projects for projects, catalog items and MCP endpoints, consumer_contracts for consumers, imports for connectors).

Operation id: get_entity_dependencies_v1_graph__tenant_slug__entities__kind___entity__dependencies_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
kindpathstringyesPath parameter identifying the kind segment.
entitypathstringyesPath parameter identifying the entity segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for read an entity's declared dependencies.application/json DependenciesResponse
422Validation Errorapplication/json HTTPValidationError

PUT /v1/graph/{tenant_slug}/entities/{kind}/{entity}/dependencies​

Replace an entity's manual dependencies

Replace the entity's manual dependencies with dependencies — each {to: {kind, id} | {slug}, pointer?, note?} — as depends_on edges with provenance declared. An empty list clears them; spec and Backstage declarations are left alone. A target that does not exist is kept under unresolved, not refused. At most 200 entries. Audited as graph.dependencies.update.

kind is project, catalog_item, mcp_endpoint, consumer or connector; a project or catalog item may be named by slug instead of id. Reading needs the kind's view and changing needs its edit (projects for projects, catalog items and MCP endpoints, consumer_contracts for consumers, imports for connectors).

Operation id: put_entity_dependencies_v1_graph__tenant_slug__entities__kind___entity__dependencies_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
kindpathstringyesPath parameter identifying the kind segment.
entitypathstringyesPath parameter identifying the entity segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for replace an entity's manual dependencies.

Responses

StatusDescriptionBody
200Successful response for replace an entity's manual dependencies.application/json DependenciesResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/graph/{tenant_slug}/export​

Export the dependency graph as JSON or DOT

The tenant's dependency graph as one document: format=json (default) writes {format: "apiome.graph.export/v1", tenant, generated_at, filters, limit, truncated, node_count, edge_count, nodes, edges}; format=dot writes a Graphviz digraph (dot -Tsvg export.dot). Every node carries its name, slug and owner team.

Narrow it with kind (edges with either end of these node kinds), team (either end owned by this team slug), provenance (each repeatable) and stale=false (drop stale edges), or export one entity's neighbourhood with entity=kind:id and depth (1–5, default 2).

Bounded at 10,000 edges, current before stale: truncated (JSON) or the first-line comment (DOT) says when more matched. The response is streamed and offered as a download.

Requires projects:view.

Operation id: export_graph_route_v1_graph__tenant_slug__export_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
formatquerystringnojson or dot.
kindqueryarray of string or nullnoKeep edges with an end of these node kinds.
teamquerystring or nullnoKeep edges with an end owned by this team slug.
provenancequeryarray of string or nullnoKeep edges of these provenances.
stalequerybooleannofalse drops stale edges.
entityquerystring or nullnokind:id: export this entity's neighbourhood.
depthqueryintegernoHops around entity.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200The export.application/json object; text/vnd.graphviz string
400graph-invalid: an unknown format, kind, provenance or entity, or a bad depth.—
422Validation Errorapplication/json HTTPValidationError

Schemas used​

BlastRadiusInput​

One blast-radius question.

PropertyTypeRequiredDescription
entityBlastRadiusEntityyesEntity.
pointersarray of stringnoJSON pointers that change (/paths/~1pets~1{id}/get, /components/schemas/Pet); empty means the whole entity.
depthintegernoLevels of dependents to walk (1–5).
provenancearray of stringnoEdge provenances to follow.
versionstring or nullnoVersion label or id for the evidence; default the latest published.

BlastRadiusResponse​

What a change affects.

PropertyTypeRequiredDescription
entityobjectyesEntity.
versionobject or nullnoThe version the evidence is from.
pointersarray of stringyesPointers.
operationsarray of string or nullnoThe operations the pointers reach; null means every operation.
depthintegeryesDepth.
provenancearray of stringyesProvenance.
directarray of AffectedEntityyesDirect.
transitivearray of AffectedEntityyesTransitive.
invalidated_evidenceInvalidatedEvidenceyesInvalidated Evidence.
evidence_checkedbooleanyesTrue whenever evidence was looked for: empty means none.
truncatedbooleanyesTrue when the depth or the 2,000-entity bound cut the walk short.
node_countintegeryesNumber of node.
total_foundintegernoEntities found, including those past the cap; a lower bound when truncated.
warningsarray of stringnoWarnings.

DependenciesInput​

The entity's complete list of manual dependencies.

PropertyTypeRequiredDescription
dependenciesarray of DependencyInputnoDependencies.

DependenciesResponse​

What an entity declares it depends on, from every source.

PropertyTypeRequiredDescription
kindstringyesKind.
entity_idstringyesEntity ID.
declaredarray of GraphEdgenoOutgoing declared edges.
unresolvedarray of UnresolvedDependencynoUnresolved.
truncatedbooleanyesTrue when the entity has more than 500 declared edges.

GraphEdgePage​

One page of an entity's edges.

PropertyTypeRequiredDescription
edgesarray of GraphEdgenoEdges.
totalintegeryesHow many edges match the filters.
truncatedbooleanyesTrue when more edges match than this page holds.
limitintegeryesLimit.
offsetintegeryesOffset.

GraphEntityPage​

One page of the tenant-wide entity search.

PropertyTypeRequiredDescription
entitiesarray of GraphEntitynoEntities.
totalintegeryesHow many entities match.
truncatedbooleanyesTrue when more entities match than this page holds.
limitintegeryesLimit.
offsetintegeryesOffset.

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.