Skip to content

get_impact

Get impact · read tool

Who an outage of an Element affects: the transitive upstream (what depends on it) or downstream (what it depends on) set, grouped by distance, with each Element’s Owner and the Relationships that carry the impact from the ring before. Includes the Relationships of the Element’s descendants; a via broker is a dependency of both its subscriber and its publisher. Logical Model only.

Field Type Required Notes
id string yes A qualified id, project:id.
direction "upstream" or "downstream" or "both" yes
max_depth integer The furthest distance to follow; unlimited when left out. At least 1. At most 9007199254740991.
limit integer The most items to return; truncated says whether there were more. Default: 50. At least 1. At most 9007199254740991.
at string A point in time to answer at: a tag, a commit sha or its first 4 or more characters, or a date (YYYY-MM-DD) or time (ISO 8601, UTC unless it gives a zone). On a checkout, any git ref works too. Leave out for the current Workspace.
Field Type Required Notes
id string yes
direction "upstream" or "downstream" or "both" yes
maxDepth number or null yes
upstream object
upstream.total number yes
upstream.truncated boolean yes
upstream.rings list of object yes
downstream object
downstream.total number yes
downstream.truncated boolean yes
downstream.rings list of object yes

Called over the Kitchen sink example Workspace.

Arguments:

{
"id": "sink:orders-db",
"direction": "upstream"
}

Result:

{
"id": "sink:orders-db",
"direction": "upstream",
"maxDepth": null,
"upstream": {
"total": 5,
"truncated": false,
"rings": [
{
"distance": 1,
"elements": [
{
"id": "sink:api",
"kind": "service",
"name": "API",
"owner": "core",
"relationships": [
{
"id": null,
"from": "sink:orders",
"to": "sink:orders-db",
"description": "Stores orders in",
"technology": "SQL",
"interaction": "sync",
"via": null,
"channel": null,
"tags": [],
"source": {
"file": "examples/kitchen-sink/archidocs/sink/model.yaml",
"line": 49
}
}
]
},
{
"id": "sink:reports",
"kind": "service",
"name": "Reports",
"owner": "data",
"relationships": [
{
"id": null,
"from": "sink:reports",
"to": "sink:orders-db",
"description": "Reads order history from",
"technology": "SQL",
"interaction": "sync",
"via": null,
"channel": null,
"tags": [],
"source": {
"file": "examples/kitchen-sink/archidocs/sink/reporting.yaml",
"line": 10
}
}
]
}
]
},
{
"distance": 2,
"elements": [
{
"id": "sink:mailer",
"kind": "service",
"name": "Mailer",
"owner": "core",
"relationships": [
{
"id": null,
"from": "sink:mailer",
"to": "sink:api",
"description": "Emails a receipt for each order",
"technology": null,
"interaction": "async",
"via": "sink:events",
"channel": "orders.placed",
"tags": [],
"source": {
"file": "examples/kitchen-sink/archidocs/sink/model.yaml",
"line": 79
}
}
]
},
{
"id": "sink:web",
"kind": "service",
"name": "Web",
"owner": "edge",
"relationships": [
{
"id": null,
"from": "sink:web",
"to": "sink:api",
"description": "Calls",
"technology": "JSON/HTTPS",
"interaction": "sync",
"via": null,
"channel": null,
"tags": [],
"source": {
"file": "examples/kitchen-sink/archidocs/sink/model.yaml",
"line": 28
}
}
]
}
]
},
{
"distance": 3,
"elements": [
{
"id": "sink:customer",
"kind": "person",
"name": "Customer",
"owner": "core",
"relationships": [
{
"id": null,
"from": "sink:customer",
"to": "sink:web",
"description": "Uses",
"technology": "HTTPS",
"interaction": "sync",
"via": null,
"channel": null,
"tags": [],
"source": {
"file": "examples/kitchen-sink/archidocs/sink/model.yaml",
"line": 7
}
}
]
}
]
}
]
}
}

A call that fails returns isError: true, with {code, message, suggestions?} as structuredContent. This tool returns:

  • invalid_input when the arguments don’t fit the input above.
  • not_found when an id or name, or the point in history given as at, matches nothing, or a sha prefix starts more than one Revision, with the candidates.
  • source_unavailable when the server can’t read the Workspace.
  • history_unavailable when the Workspace has no history to read at at.

Error codes says what to do about each.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.