pub.techne.draft.query.listRecords

The platform's generic list query: one page of the records a pub.techne.draft.query names, in its order. Every record is read through the platform's one read path, whatever the query says: no record of a hidden or suspended account is answered, nor, to a signed-in caller, another's record across a block either way (the caller blocked its author, or its author blocked the caller); a public record also leaves out anything moderation holds back (a trusted verdict or `!takedown`); a permissioned record is answered only when it is the caller's own or counts in a space whose read policy admits the caller now, not taken down (in a space whose authority is the caller, a block does not hide its records from them), and (in a member-owned circle space) only while its author is a current member by a claim the caller can read. Each branch reads the public records of the view it names (the query's `view`, or its branch's in `any`, `pub.techne.draft.query#branch`): `asWritten`, every record as its author wrote it, or `curated`, the commons' listed records; there is no default (ViewRequired), and a curated branch naming a type no curator covers is refused (NotCurated). A curated record every source of which is by a hidden or suspended account is left out for everyone, and one every source of which is by an author blocked either way is left out for a signed-in caller. Anyone may call it, signed in or not; an anonymous caller gets public records only. Each top-level `any` branch runs on its own index and the branches are merged in order, so a record that matches two branches comes once. A permissioned record, and a public record answered as written, is answered only while the platform's `decide` calls its version valid; and a record a curated branch finds by `location` `in` or `covers` is answered only while a location the curated view trusts (its author's own, or a writer the commons endorses for the claim's type) still holds its slot once precedence is rerun over those alone. Because these checks run on the page already read, a page can hold fewer records than `limit`, even none, and still carry a cursor: keep paging until none comes back. Draft tier.

Details · query
Kindquery
Authorityquery.draft.techne.pub
Commit rev3n3iob7zz662u
Indexed

Query

query · GET

Parameters

query string

count

boolean

Also count the records the query answers this caller, as pub.techne.draft.query.countRecords would for the same query and params: the output gains `count` and `capped`.

  • default: false

cursor

string

The cursor of the previous page, opaque: pass it back as it came, with the same query.

limit

integer

The page size; default the query's `limit`, else 50.

  • minimum: 1
  • maximum: 500

params

string

The query's parameters as a JSON object of strings (or lists of strings), e.g. {"here": "40.01,-105.27"}. `$viewer` and `$now` are the platform's and cannot be passed.

  • maxLength: 8192

query

string

A pub.techne.draft.query object, as JSON. Give this or `queryUri`.

  • maxLength: 16384

queryUri

string · at-uri

A published pub.techne.draft.query record to run. Give this or `query`.

Output

application/json

capped

boolean

Only when asked with `count=true`: true when there are more than `count` (countRecords' `capped`).

count

integer

Only when asked with `count=true`: how many records the query answers this caller, each once, up to countRecords' cap (countRecords' `count`).

cursor

string

Pass it back as cursor for the next page. Absent on the last page; a page shorter than `limit` is not the last page while it carries one.

Present when a `near` or `covers` point or an `in` area of the query lies outside this operator's coverage, or an `in` area is not held here. The records answered are what this operator holds, not the whole answer: an empty list (or a zero count) with this set means "not served here", not "nothing there". Ask an operator that serves the place.

Reference

records

requiredarray

In the query's order, ties broken by URI.

itemsref
Reference

Errors

InvalidRequest

HTTP 400. A malformed or refused query (naming the branch or condition), parameter or cursor.

ViewRequired

HTTP 400. A branch of the query names no `view` (curated or asWritten): there is no default. The message names the branch.

NotCurated

HTTP 400. A branch read with view `curated` names a type (`type is`/`type in`) no curator the commons root trusts covers; the message names the type. Read it with view `asWritten`.

NotFound

HTTP 404. `queryUri` names no query record the caller may read.

#matchedLocation

object

One stated location that matched.

Properties

asserter

requiredstring · did

Who stated it: the record's author, or a claim's writer.

entry

union

The location entry as stated, wrapper included (absent for an area's own cells). The union is open: an entry of another `$type` comes back as stated.

kind

requiredstring

How the thing relates to the place (`at`, `serves`, `registered`, ...).

source

requiredstring · at-uri

The record that stated it (the record itself, or a claim about it).

#notServedHere

object

Why the answer is not the whole answer: this operator does not serve the place asked about. An empty list (or a zero count) with this set means "not served here", not "nothing there".

Properties

message

requiredstring

The reason, in words, for a person to read.

  • maxLength: 300

reason

requiredstring

`outsideCoverage`: a `near` or `covers` point lies outside the areas this operator serves. `areaNotHeld`: an `in` area is one this operator does not hold, or lies outside the areas it serves.

  • knownValues: outsideCoverage | areaNotHeld

#record

object

One indexed record.

Properties

author

requiredstring · did

The DID whose repo holds the record.

cid

requiredstring · cid

collection

requiredstring · nsid

curated

boolean

A public record that is a live curated record: a curator the commons root trusts merged it from its sources, and it is not superseded. Its `pub.techne.draft.provenance` (same author, subject this record) names who it is from. Always answered: false for every other record (a source copy, a superseded one, a permissioned one).

held

boolean

The caller's own permissioned record that the reach limit holds back from the people it would reach: a withheld act (a share or a circle add), answered to its author alone (to anyone else it is not found) until the limit admits it. Absent otherwise. A query with `held: true` answers only these.

matched

array

With a `location` `in` or `covers` condition: the stated locations that matched (with `followed`, its subject's), at most 8.

  • maxLength: 8
itemsref
Reference

measures

unknown

The numbers the query's operators produced for this record, by name (a `near` distance in metres, a `matches` rank).

signals

unknown

The server-side signals the query asked for, by name; a signal with no value for this record is absent.

source

requiredstring

Whether the record is public (on the firehose) or permissioned.

  • knownValues: public | permissioned

space

string · at-uri

The space a permissioned record counts in. Absent for a public record, and for a caller's own record that counts in none.

time

requiredstring · datetime

The record's indexed time (the `written` role).

uri

requiredstring · at-uri

value

requiredunknown

The record body.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • A query over indexed records, as data: sent inline to pub.techne.draft.query.listRecords or countRecords, or published as a record in an app's own repo and run by its URI, so what an app reads is public. The platform runs it only over what the caller may read: every query is scoped to the viewer by the platform (public records not hidden; permissioned records the caller's own, or in a space whose read policy admits the caller now and not an act the reach limit withholds for its author: a held sh

  • Records by URI, as listRecords answers them: the query `{"view": "asWritten", "where": {"uri": {"in": uris}}}`, as written (a read scoped to named records), each only if the caller may read it. A URI the caller may not read, or that names nothing, is left out: as in every generic read, that includes a record whose author is blocked either way with a signed-in caller (see `includeBlockedByMe`), or whose account is hidden or suspended. In the order asked. With `curated`, each URI answers as the cu

  • How many records a pub.techne.draft.query names: the records listRecords would answer for it (the same read path, the platform's `decide` on every record answered as written or permissioned, and a curated `location` `in`/`covers` match settled again over the locations the curated view trusts), each once, so the count is what paging the list to its end would answer. The count stops at 1000 (`capped`). The query's `order`, `limit` and `signals` are ignored, so a record without the role a list is o

  • Up to 12 generic reads in one call. Each step is a pub.techne.draft.query.listRecords call (a list step) or a pub.techne.draft.query.getRecords call (a get step) and answers exactly as that method would for the same caller. A step runs once the steps it binds to have answered (at most 4 at once); the answer does not depend on which finished first. A binding, a string `$<step>.<output>` in a list step's `params` or among a get step's `uris`, stands for that output over the earlier step's records,

  • List a range of records in a repository, matching a specific collection. Does not require auth.