Coelevate Documentation
API ReferenceContext Repository

List assets

Lists the assets the project holds, of every type or of the types named in `asset_type`, optionally narrowed by a `label` substring or an `asset_tag`.

GET /context/v1/assets

Lists the assets the project holds, of every type or of the types named in asset_type, optionally narrowed by a label substring or an asset_tag. Reads the live state by default, or the state a given release or tag published. Use view=index to list without bodies, and limit with offset to read a window; a windowed response also reports total. There is no implicit cap. An unknown asset type is a 400, and status is refused with a 400 because no asset type has one.

Requires the context:read scope.

Parameters

ParameterLocationRequiredDescription
asset_typequerynoRestrict to these asset types, as a comma-separated list of type names such as skill,tool. Omit for every type. List the names with the asset-types operation. An unknown name is a 400.
labelquerynoKeep assets whose display name contains this text, ignoring case.
expandquerynoPass links to attach incoming and outgoing relationships, each with the neighbour's type and display name already resolved.
statusquerynoNot supported: no asset type has a status, so any value is refused with a 400.
releasequerynoRead the assets as this release published them: its number or its canonical name (projects/{project}/releases/{n}). Omit for the live state. An unknown release is a 404. Cannot be combined with tag.
asset_tagquerynoKeep assets that carry this exact tag among their own tags. Not the same as tag, which names a release.
tagquerynoRead the assets as the release currently holding this tag published them. A tag no release holds is a 404. Cannot be combined with release.
viewquerynoindex lists each asset without its body (identity, display name, card and version); full, the default, includes the body.
limitquerynoReturn at most this many assets. Omit to return all of them.
offsetquerynoSkip this many assets before returning.

Responses

StatusMeaning
200The request succeeded.
401The token is missing, expired or invalid.
403The token does not carry the scope this operation requires.
404No such project, or the token belongs to a different project.
422The request was not valid: a parameter or the body failed validation.

The 200 response body:

FieldTypeRequiredDescription
assetsarray of AssetSummaryyesThe assets, in a stable order.
resolvedResolvedRelease or nullnoThe release the list was read as. Present once the project has a release.
totalinteger or nullnoHow many assets match before limit and offset were applied. Present only when a window was requested.

Shapes

The named shapes used above.

AssetSummary

One asset in a list.

FieldTypeRequiredDescription
assetobject or nullnoThe asset's whole body. Present unless the list was requested with view=index; its fields depend on the asset's type.
asset_idstringyesThe asset's id.
asset_typestringyesThe asset's type.
cardAssetCardyesThe asset's short form.
labelstringyesThe asset's display name.
last_updatedstring or nullnoWhen the asset last changed. Present with view=index.
last_updated_bystring or nullnoWho last changed the asset. Present with view=index.
namestring or nullnoThe asset's canonical name, projects/{project}/assets/{asset_id}. A request that takes an asset 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.
nounstringyesWhat an asset of this type is called.
versioninteger or nullnoThe asset's version. Present with view=index.

AssetCard

The short form of an asset: enough to show it in a list without reading its body.

FieldTypeRequiredDescription
idstringyesThe asset's id.
summarystring or nullnoA one- or two-line summary, or null when the asset's type has none.
tagsarray of stringyesThe asset's tags.
titlestring or nullnoA short title, or null when the asset's type has none.

ResolvedRelease

The release a read was resolved at.

FieldTypeRequiredDescription
tagsarray of stringyesThe tags that release carries.
versionintegeryesThe release number.

Example

curl -sS "$API_URL/context/v1/assets" \
  -H "Authorization: Bearer $TOKEN"