API ReferenceContext Repository
Get a kit
Returns one kit at its current version, or at the version given in `version`.
GET /context/v1/kits/{kit_id}
Returns one kit at its current version, or at the version given in version. Pass release or tag to see which members that state of the context can serve; the rest are listed as ignored with the reason.
Requires the context:read scope.
Parameters
| Parameter | Location | Required | Description |
|---|---|---|---|
kit_id | path | yes | The kit's id. |
version | query | no | Return this version of the kit instead of the current one. |
release | query | no | Resolve the kit's assets as this release published them (a number). Omit, with no tag, for the latest release. Cannot be combined with tag. |
tag | query | no | Resolve the kit's assets as the release holding this tag published them. A tag no release holds is a 404. Cannot be combined with release. |
Responses
| Status | Meaning |
|---|---|
200 | The request succeeded. |
401 | The token is missing, expired or invalid. |
403 | The token does not carry the scope this operation requires. |
404 | No such project, or the token belongs to a different project. |
422 | The request was not valid: a parameter or the body failed validation. |
The 200 response body:
| Field | Type | Required | Description |
|---|---|---|---|
auto_maintain | boolean | yes | Whether the kit has opted in to automatic upkeep of its members. Off by default. |
description | string | yes | What the kit is for. |
entries | array of KitEntry | yes | The kit's skills and the tools each binds. |
gaps | array of object | yes | Knowledge gaps the kit carries. |
id | string | yes | The kit's id. |
ignored_members | array of KitIgnoredMemberRecord | yes | Members the release this read named could not serve, with the reason. Empty when nothing was skipped. |
last_changed_by | string or null | no | Who last changed the kit. |
last_changed_by_kind | string or null | no | person or automation. |
last_updated | string or null | no | When the kit last changed. |
last_updated_by | string or null | no | Whether a person (human) or an automation (ai) last changed the kit. |
member_cards | map of array of AssetCard or null | no | The short form of each served asset, grouped by asset type. |
member_roles | map of string | yes | For each kind of asset id, the role a kit holds it in. |
members | array of KitMemberRecord | yes | What this version of the kit holds, in serving order. |
members_by_type | map of array of string | yes | The ids of the assets the kit served at that release, grouped by asset type. |
metadata | map of string | yes | The kit's free-form key-value pairs. |
name | string or null | no | The kit's canonical name, projects/{project}/kits/{id}. A request that takes a kit id in its body or query accepts this name in its place; a URL path takes the bare id. It is null when the id cannot be written in a canonical name. |
project_id | string | yes | The project the kit belongs to. |
release | integer or null | no | The release this read resolved the kit's assets at. |
retired | boolean | yes | Whether the kit has been retired. |
tags | array of string | yes | The kit's free-form labels. |
title | string | yes | The kit's title. |
version | integer | yes | The kit's version. It moves when the kit's fields or its members change. |
versions | array of integer or null | no | Every version the kit has had. Present when a kit is read. |
Shapes
The named shapes used above.
KitEntry
A skill a kit holds and the tools it binds.
| Field | Type | Required | Description |
|---|---|---|---|
skill_id | string | yes | The skill's id. |
skill_name | string | yes | The skill's name. |
tool_ids | array of string | yes | The ids of the tools the skill binds. |
KitIgnoredMemberRecord
A held asset the kit did not serve at the release the read named, and why.
| Field | Type | Required | Description |
|---|---|---|---|
member | KitMemberRecord | yes | The held asset. |
reason | string | yes | retired (a release retired it and nothing replaced it), superseded (a release retired it and the successors below were served in its place) or unpublished (the pinned release does not contain it yet). |
successor_ids | array of string | yes | The assets served in its place, in order. Empty unless superseded. |
KitMemberRecord
One asset a kit holds.
| Field | Type | Required | Description |
|---|---|---|---|
asset_id | string | yes | The held asset's id. |
asset_kind | string | yes | The kind the id names: skill, knowledge, tool, gap, memory, example, pointer or asset. |
rank | integer | yes | Its place within the role. Ranks are sparse, so an asset can be put between two others without renumbering them. |
role | string | yes | How the kit holds it: contains, offers or carries. |
AssetCard
The short form of an asset: enough to show it in a list without reading its body.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The asset's id. |
summary | string or null | no | A one- or two-line summary, or null when the asset's type has none. |
tags | array of string | yes | The asset's tags. |
title | string or null | no | A short title, or null when the asset's type has none. |
Example
curl -sS "$API_URL/context/v1/kits/$KIT_ID" \
-H "Authorization: Bearer $TOKEN"