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
| Kind | query |
|---|---|
| Authority | query.draft.techne.pub |
| Commit rev | 3n3iob7zz662u |
| Indexed |
Checks
Validunlimited-stringdefs.main.parameters.properties.cursorNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.output.schema.properties.cursorNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.matchedLocation.properties.kindNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.notServedHere.properties.reasonNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.record.properties.sourceNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "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.",
"errors": [
{
"description": "HTTP 400. A malformed or refused query (naming the branch or condition), parameter or cursor.",
"name": "InvalidRequest"
},
{
"description": "HTTP 400. A branch of the query names no `view` (curated or asWritten): there is no default. The message names the branch.",
"name": "ViewRequired"
},
{
"description": "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`.",
"name": "NotCurated"
},
{
"description": "HTTP 404. `queryUri` names no query record the caller may read.",
"name": "NotFound"
}
],
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"capped": {
"description": "Only when asked with `count=true`: true when there are more than `count` (countRecords' `capped`).",
"type": "boolean"
},
"count": {
"description": "Only when asked with `count=true`: how many records the query answers this caller, each once, up to countRecords' cap (countRecords' `count`).",
"type": "integer"
},
"cursor": {
"description": "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.",
"type": "string"
},
"notServedHere": {
"description": "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.",
"ref": "#notServedHere",
"type": "ref"
},
"records": {
"description": "In the query's order, ties broken by URI.",
"items": {
"ref": "#record",
"type": "ref"
},
"type": "array"
}
},
"required": [
"records"
],
"type": "object"
}
},
"parameters": {
"properties": {
"count": {
"default": false,
"description": "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`.",
"type": "boolean"
},
"cursor": {
"description": "The cursor of the previous page, opaque: pass it back as it came, with the same query.",
"type": "string"
},
"limit": {
"description": "The page size; default the query's `limit`, else 50.",
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"params": {
"description": "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,
"type": "string"
},
"query": {
"description": "A pub.techne.draft.query object, as JSON. Give this or `queryUri`.",
"maxLength": 16384,
"type": "string"
},
"queryUri": {
"description": "A published pub.techne.draft.query record to run. Give this or `query`.",
"format": "at-uri",
"type": "string"
}
},
"type": "params"
},
"type": "query"
},
"matchedLocation": {
"description": "One stated location that matched.",
"properties": {
"asserter": {
"description": "Who stated it: the record's author, or a claim's writer.",
"format": "did",
"type": "string"
},
"entry": {
"description": "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.",
"refs": [
"community.lexicon.location.geo",
"community.lexicon.location.hthree",
"community.lexicon.location.address",
"com.atproto.repo.strongRef",
"pub.techne.draft.locationEntry"
],
"type": "union"
},
"kind": {
"description": "How the thing relates to the place (`at`, `serves`, `registered`, ...).",
"type": "string"
},
"source": {
"description": "The record that stated it (the record itself, or a claim about it).",
"format": "at-uri",
"type": "string"
}
},
"required": [
"kind",
"asserter",
"source"
],
"type": "object"
},
"notServedHere": {
"description": "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": {
"description": "The reason, in words, for a person to read.",
"maxLength": 300,
"type": "string"
},
"reason": {
"description": "`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"
],
"type": "string"
}
},
"required": [
"reason",
"message"
],
"type": "object"
},
"record": {
"description": "One indexed record.",
"properties": {
"author": {
"description": "The DID whose repo holds the record.",
"format": "did",
"type": "string"
},
"cid": {
"format": "cid",
"type": "string"
},
"collection": {
"format": "nsid",
"type": "string"
},
"curated": {
"description": "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).",
"type": "boolean"
},
"held": {
"description": "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.",
"type": "boolean"
},
"matched": {
"description": "With a `location` `in` or `covers` condition: the stated locations that matched (with `followed`, its subject's), at most 8.",
"items": {
"ref": "#matchedLocation",
"type": "ref"
},
"maxLength": 8,
"type": "array"
},
"measures": {
"description": "The numbers the query's operators produced for this record, by name (a `near` distance in metres, a `matches` rank).",
"type": "unknown"
},
"signals": {
"description": "The server-side signals the query asked for, by name; a signal with no value for this record is absent.",
"type": "unknown"
},
"source": {
"description": "Whether the record is public (on the firehose) or permissioned.",
"knownValues": [
"public",
"permissioned"
],
"type": "string"
},
"space": {
"description": "The space a permissioned record counts in. Absent for a public record, and for a caller's own record that counts in none.",
"format": "at-uri",
"type": "string"
},
"time": {
"description": "The record's indexed time (the `written` role).",
"format": "datetime",
"type": "string"
},
"uri": {
"format": "at-uri",
"type": "string"
},
"value": {
"description": "The record body.",
"type": "unknown"
}
},
"required": [
"uri",
"cid",
"author",
"collection",
"value",
"time",
"source"
],
"type": "object"
}
},
"id": "pub.techne.draft.query.listRecords",
"lexicon": 1
}