Skip to content

Queries

Query endpoints read data from a repository without modifying it. Public repositories can be queried without authentication. Private repositories require a valid Bearer token — anonymous requests receive a 404 response.

All paths are prefixed with /api/repos/:orgName/:repoName.


Return the current HEAD snapshot — the latest version of every active thing in the repository.

ParameterTypeRequiredDescription
shapestringNoFilter by shape name
kindstringNoFilter by kind: thing, assertion, shape, collection
matchstringNoGlob pattern to filter wrefs (* = one segment, ** = zero or more)
limitintegerNoMaximum items per page (max 500). When omitted, returns all items without cursor pagination.
cursorstringNoOpaque pagination cursor from a previous nextCursor response. Requires limit.
{
"items": [
{
"wref": "Sensor/temp-1",
"name": "temp-1",
"kind": "thing",
"shapeName": "Sensor",
"version": 3,
"data": {
"location": "Building A",
"type": "temperature"
}
}
],
"nextCursor": "whc1_eyJ2Ijox..."
}

When there are more results, nextCursor contains an opaque token to pass as the cursor parameter on the next request. When all results have been returned, nextCursor is omitted.

For assertions, the response includes an aboutWref field referencing the target thing.

Terminal window
# All things in the Sensor shape
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/head?shape=Sensor"
# All shapes in the repository
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/head?kind=shape"
# Paginate through results
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/head?shape=Sensor&limit=20&cursor=whc1_eyJ2Ijox..."

Return the commit log. Commits are returned in reverse chronological order (newest first).

ParameterTypeRequiredDescription
limitintegerNoMaximum commits to return (max 500)
cursorstringNoOpaque pagination cursor from a previous nextCursor response
authorstringNoFilter by author name
sinceISO 8601NoCommits after this timestamp
untilISO 8601NoCommits before this timestamp
{
"items": [
{
"commitId": "a1b2c3d4e5f6a7b8",
"author": "sensor-agent",
"message": "Add temperature sensor",
"operationCount": 1,
"addCount": 1,
"createdAt": 1741132800000
}
],
"nextCursor": "whc1_eyJ2Ijox..."
}
Terminal window
# Last 10 commits
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/log?limit=10"
# Commits by a specific author since a date
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/log?author=sensor-agent&since=2026-03-01T00:00:00Z"

Return the version history for a thing, shape, or set of assertions.

ParameterTypeRequiredDescription
wrefstringNo*Thing wref (URL-encoded)
shapestringNo*Filter by shape name
aboutstringNo*Filter assertions about a target wref
resolveCollectionsbooleanNoWhen about is set, also include assertions about collections containing the target (default false)
includeInactivebooleanNoAllow resolving deactivated shape or about targets (does not filter results)
limitintegerNoMaximum versions to return (max 500)
cursorstringNoOpaque pagination cursor from a previous nextCursor response. Requires limit.

At least one of wref, shape, or about is required.

{
"thing": {
"wref": "Sensor/temp-1",
"name": "temp-1",
"kind": "thing",
"shapeName": "Sensor"
},
"versions": [
{
"wref": "Sensor/temp-1",
"thingName": "temp-1",
"thingKind": "thing",
"shapeName": "Sensor",
"version": 1,
"operation": "add",
"data": { "location": "Building A", "type": "temperature" },
"commitId": "e4f5a6b7c8d9e0f1",
"commitAuthor": "sensor-agent",
"commitTime": 1741132800000
},
{
"wref": "Sensor/temp-1",
"thingName": "temp-1",
"thingKind": "thing",
"shapeName": "Sensor",
"version": 2,
"operation": "revise",
"data": { "location": "Building B", "type": "temperature" },
"commitId": "a1b2c3d4e5f6a7b8",
"commitAuthor": "sensor-agent",
"commitTime": 1741219200000
}
],
"nextCursor": "whc1_eyJ2Ijox..."
}

When querying by shape or about without a specific wref, the thing field is omitted and the versions array contains entries from all matching things.

Terminal window
# Version history for a specific thing
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/history?wref=Sensor%2Ftemp-1"

Get a single thing by its wref, including its data payload.

ParameterTypeDescription
wrefstringURL-encoded wref (e.g., Sensor%2Ftemp-1)
ParameterTypeRequiredDescription
versionintegerNoSpecific version number. Defaults to the current version.
{
"wref": "Sensor/temp-1",
"name": "temp-1",
"kind": "thing",
"active": true,
"shapeName": "Sensor",
"version": 3,
"operation": "revise",
"data": {
"location": "Building A",
"type": "temperature",
"lastReading": 72.5
}
}
CodeStatusDescription
NOT_FOUND404No thing found with this wref
VALIDATION_ERROR400Missing or invalid wref
Terminal window
# Current version
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/things/Sensor%2Ftemp-1"
# Specific version
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/things/Sensor%2Ftemp-1?version=2"

Get a thing and all assertions about it.

ParameterTypeDescription
wrefstringURL-encoded wref of the target thing
ParameterTypeRequiredDescription
shapestringNoFilter assertions by shape name
matchstringNoGlob pattern to filter assertion wrefs (* = one segment, ** = zero or more)
includeInactivebooleanNoInclude retracted assertions (default false)
resolveCollectionsbooleanNoInclude assertions about collections containing the target thing (default false)
depthintegerNoNesting depth for recursive assertion lookup
limitintegerNoMaximum assertions to return (max 500)
cursorstringNoOpaque pagination cursor from a previous nextCursor response
{
"target": {
"wref": "Sensor/temp-1",
"name": "temp-1",
"kind": "thing",
"shapeName": "Sensor",
"version": 3
},
"assertions": [
{
"wref": "Reading/temp-1-v1",
"name": "temp-1-v1",
"kind": "assertion",
"shapeName": "Reading",
"version": 1,
"data": {
"value": 72.5,
"timestamp": "2026-03-01T12:00:00Z"
},
"about": "temp-1@v3",
"children": []
}
],
"nextCursor": "whc1_eyJ2Ijox..."
}
CodeStatusDescription
WREF_UNRESOLVABLE404Cannot resolve the target wref
VALIDATION_ERROR400Missing or invalid wref
Terminal window
# All assertions about a thing
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/about/Sensor%2Ftemp-1"
# Only Reading-shape assertions, including retracted
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/about/Sensor%2Ftemp-1?shape=Reading&includeInactive=true"

Query things by filters. Returns items matching the specified criteria.

ParameterTypeRequiredDescription
shapestringNoFilter by shape name
aboutstringNoFilter assertions by target wref
kindstringNoFilter by kind: thing, assertion, shape, collection
matchstringNoGlob pattern to filter wrefs (* = one segment, ** = zero or more)
resolveCollectionsbooleanNoWhen about is set, also include assertions about collections containing the target (default false)
includeInactivebooleanNoInclude deactivated/retracted items (default false)
limitintegerNoMaximum items to return (max 500)
cursorstringNoOpaque pagination cursor from a previous nextCursor response
{
"items": [
{
"wref": "Sensor/temp-1",
"name": "temp-1",
"kind": "thing",
"active": true,
"shapeName": "Sensor",
"version": 3,
"data": { "location": "Building A" }
}
],
"nextCursor": "whc1_eyJ2Ijox..."
}
Terminal window
# All things in the Sensor shape
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/query?shape=Sensor&kind=thing"
# Assertions about a specific thing
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/query?about=Sensor%2Ftemp-1&kind=assertion"

Return the count of items matching the specified filters, without returning the items themselves. Useful for dashboards, progress tracking, and size checks before paginated fetches.

ParameterTypeRequiredDescription
shapestringNoFilter by shape name
kindstringNoFilter by kind: thing, assertion, shape, collection
matchstringNoGlob pattern to filter wrefs (* = one segment, ** = zero or more)
aboutstringNoFilter assertions by target wref
includeInactivebooleanNoInclude deactivated/retracted items (default false)
resolveCollectionsbooleanNoWhen about is set, also include assertions about collections containing the target (default false)
{
"count": 42
}
Terminal window
# Count all things in a shape
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/count?shape=Sensor"
# Count assertions about a thing
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/count?about=Sensor%2Ftemp-1&kind=assertion"
# Count with glob pattern
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/count?match=Sensor%2Fbuilding-a%2F*"

Resolve a wref to its thing, returning the full data payload.

ParameterTypeDescription
wrefstringURL-encoded wref to resolve
{
"wref": "Sensor/temp-1",
"name": "temp-1",
"kind": "thing",
"active": true,
"shapeName": "Sensor",
"version": 3,
"data": {
"location": "Building A",
"type": "temperature"
}
}
CodeStatusDescription
WREF_UNRESOLVABLE404Cannot resolve this wref
VALIDATION_ERROR400Missing or invalid wref
Terminal window
curl "https://api.warmhub.ai/api/repos/myorg/myrepo/resolve/Sensor%2Ftemp-1"