Reference · Platform methods

pub.techne.draft.query.listRecords

Next release: this page describes techne-sdk/types, which is not in techne-sdk 0.3.4 yet. With techne-sdk 0.3 today shows the released API.

query · GETIn the SDK, techne.query

One page of the records a pub.techne.draft.query names, in its order.

Every record comes through the platform's one read path. A record in a space comes back only if it is yours or the space's read policy admits you. Anyone may call it. Signed out, you get public records only.

Input query parameters

NameTypeWhat it is
querystringA pub.techne.draft.query object, as JSON. Give this or queryUri.
queryUriat-uriA published pub.techne.draft.query record to run. Give this or query.
paramsstringThe query's parameters as a JSON object of strings, e.g. {"here": "40.01,-105.27"}. $viewer and $now are the platform's and cannot be passed.
limitinteger, 1–100The page size. It defaults to the query's limit, else 50.
cursorstringThe previous page's cursor, passed back as it came, with the same query.
countbooleanAlso count the records the query answers you. The output gains count and capped.

Output application/json

NameTypeWhat it is
recordsrequiredrecord[]In the query's order, ties broken by URI.
cursorstringPass it back for the next page. Absent on the last page. A short page with a cursor is not the last page.
countintegerHow many records the query answers you, up to 1000. Only with count=true.
cappedbooleanTrue when there are more than count. Only with count=true.

Each record

urirequiredat-uriThe record's address.
cidrequiredcidThe version's content hash.
authorrequireddidThe DID whose repo holds the record.
collectionrequirednsidIts type.
valuerequiredunknownThe record body.
timerequireddatetimeWhen it was indexed.
sourcerequiredstringpublic (on the firehose) or permissioned.
spaceat-uriThe space a permissioned record counts in.
curatedbooleanA live curated record, merged from its sources by a trusted curator.
measuresunknownNumbers the query's operators produced, e.g. a near distance in metres.

Also held, signals and included; errors InvalidRequest (400) and NotFound (404). The full lexicon is at listRecords.query.draft.techne.pub.

Places within 5 km

Inside <TechneProvider>. data is the same items as on the SDK tab, each { uri, cid, record, verdict, problems, curated, byline }.

Places within 5 km
What comes back

The SDK answers each record as an item, { uri, cid, record, verdict, problems, curated, byline }.