get_element
Get Element · read tool
One Element by qualified id (project:id): its fields, Owner Team, parent and children, the Relationships declared on it in and out, the edges derived onto it from its descendants’, a Service’s Deployments with their URLs, the Dynamic Views it takes part in (as a participant, or as the broker of an event Step), the ADRs linking it or its descendants (as list_adrs gives them), and the file and line it is declared at.
| Field | Type | Required | Notes |
|---|---|---|---|
id |
string | yes | A qualified id, project:id. |
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. |
Output
Section titled “Output”| Field | Type | Required | Notes |
|---|---|---|---|
element |
object | yes | |
element.id |
string | yes | |
element.kind |
"person" or "system" or "service" or "component" |
yes | |
element.parent |
string or null | yes | |
element.name |
string | yes | |
element.description |
string or null | yes | |
element.owner |
string | yes | |
element.tags |
list of string | yes | |
element.links |
list of object | yes | |
element.metadata |
map of id → string | yes | |
element.source |
object | yes | |
element.source.file |
string | yes | |
element.source.line |
integer | yes | At least -9007199254740991. At most 9007199254740991. |
owner |
object or null | yes | |
owner.id |
string | yes | |
owner.name |
string | yes | |
parent |
object or null | yes | |
parent.id |
string | yes | |
parent.kind |
"person" or "system" or "service" or "component" |
yes | |
parent.name |
string | yes | |
children |
list of object | yes | |
children[].id |
string | yes | |
children[].kind |
"person" or "system" or "service" or "component" |
yes | |
children[].name |
string | yes | |
deployments |
list of object | yes | |
deployments[].environment |
string | yes | |
deployments[].target |
string | yes | |
deployments[].url |
string or null | yes | |
deployments[].endpoints |
list of object | yes | |
deployments[].instances |
number or object | yes | Default: 1. |
deployments[].owner |
string | yes | |
deployments[].source |
object | yes | |
deployments[].targetPath |
list of object | yes | |
relationships |
object | yes | |
relationships.in |
list of object | yes | |
relationships.out |
list of object | yes | |
derived |
object | yes | |
derived.in |
list of object | yes | |
derived.out |
list of object | yes | |
dynamicViews |
list of object | yes | |
dynamicViews[].id |
string | yes | |
dynamicViews[].title |
string | yes | |
adrs |
list of object | yes | |
adrs[].id |
string | yes | |
adrs[].title |
string | yes | |
adrs[].status |
"proposed" or "accepted" or "rejected" or "deprecated" or "superseded" |
yes | |
adrs[].effectiveStatus |
"proposed" or "accepted" or "rejected" or "deprecated" or "superseded" |
yes | |
adrs[].date |
string | yes | |
adrs[].elements |
list of string | yes | |
adrs[].views |
list of string | yes | |
adrs[].supersedes |
list of string | yes | |
adrs[].supersededBy |
list of string | yes | |
adrs[].tags |
list of string | yes | |
adrs[].matchedVia |
list of string | With element: the linked ids that matched. |
|
viewerUrl |
string |
When element.kind is person
No other fields.
When element.kind is system
| Field | Type | Required | Notes |
|---|---|---|---|
element.external |
boolean | yes | |
element.repository |
string or null | yes |
When element.kind is service
| Field | Type | Required | Notes |
|---|---|---|---|
element.type |
"app" or "datastore" or "broker" |
yes | |
element.technology |
string or null | yes | |
element.external |
boolean | yes | |
element.repository |
string or null | yes |
When element.kind is component
| Field | Type | Required | Notes |
|---|---|---|---|
element.technology |
string or null | yes | |
element.repository |
string or null | yes |
Example
Section titled “Example”Called over the Kitchen sink example Workspace.
Arguments:
{ "id": "sink:api"}Result:
{ "element": { "id": "sink:api", "kind": "service", "parent": "sink:shop", "name": "API", "description": "An app Service with Components. Its description is **Markdown**:\n\n- `orders` takes and charges orders\n- `catalogue` searches the catalog\n", "owner": "core", "tags": [], "links": [], "metadata": { "tier": "1", "on-call": "core-oncall", "pci-scope": "true" }, "type": "app", "technology": "Node.js", "external": false, "repository": "https://github.com/sink-example/api", "source": { "file": "examples/kitchen-sink/archidocs/sink/model.yaml", "line": 31 } }, "owner": { "id": "core", "name": "Core" }, "parent": { "id": "sink:shop", "kind": "system", "name": "Shop" }, "children": [ { "id": "sink:catalogue", "kind": "component", "name": "Catalog" }, { "id": "sink:orders", "kind": "component", "name": "Orders" } ], "deployments": [ { "environment": "prod", "target": "sink:cluster", "targetPath": [ { "id": "sink:cloud", "name": "Cloud region", "kind": "region" }, { "id": "sink:cluster", "name": "Kubernetes cluster", "kind": "k8s" } ], "url": "https://api.sink.example", "endpoints": [ { "name": "health", "url": "https://api.sink.example/healthz" } ], "instances": 3, "owner": "core", "source": { "file": "examples/kitchen-sink/archidocs/sink/deployments.yaml", "line": 18 } } ], "relationships": { "in": [ { "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": 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 } } ], "out": [] }, "derived": { "in": [], "out": [ { "from": "sink:api", "to": "sink:orders-db", "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 } } ] }, { "from": "sink:api", "to": "sink:payment-gateway", "relationships": [ { "id": null, "from": "sink:orders", "to": "sink:payment-gateway", "description": "Charges cards through", "technology": "HTTPS", "interaction": "sync", "via": null, "channel": null, "tags": [], "source": { "file": "examples/kitchen-sink/archidocs/sink/model.yaml", "line": 52 } } ] }, { "from": "sink:api", "to": "sink:search", "relationships": [ { "id": null, "from": "sink:catalogue", "to": "sink:search", "description": "Searches with", "technology": "HTTPS", "interaction": "sync", "via": null, "channel": null, "tags": [], "source": { "file": "examples/kitchen-sink/archidocs/sink/model.yaml", "line": 59 } } ] } ] }, "dynamicViews": [ { "id": "sink:place-order", "title": "Customer places an order" } ], "adrs": []}Errors
Section titled “Errors”A call that fails returns isError: true, with {code, message, suggestions?} as structuredContent. This tool returns:
invalid_inputwhen the arguments don’t fit the input above.not_foundwhen an id or name, or the point in history given asat, matches nothing, or a sha prefix starts more than one Revision, with the candidates.source_unavailablewhen the server can’t read the Workspace.history_unavailablewhen the Workspace has no history to read atat.
Error codes says what to do about each.
See also
Section titled “See also”Documents Archidocs v1.4.0, the latest release.