Reference · Platform methods

pub.techne.draft.query.getRecords

query · GETIn the SDK, getRecords

Records by URI, as written, in the order asked.

It is the query {"where": {"uri": {"in": uris}}}, run through the same read path as listRecords. A URI you may not read, or that names nothing, is left out. So is a record whose author is blocked either way (signed in), or whose account is hidden or suspended.

Input query parameters

NameTypeWhat it is
urisrequiredat-uri[], 1–100The records to read. Repeat the parameter once per URI.
handlesbooleanAlso answer handles, the public handle of each repo the URIs name.
curatedbooleanAnswer each URI as the curated record it resolves to, when that record is listed in public now. Otherwise the URI answers as itself.
curationbooleanAlso answer curation when signed in. It is the curation status of each URI that is your own record.
defaultsbooleanAlso answer defaults when signed in. It is the starting value the platform reads for a record of yours that is missing.
includeBlockedByMebooleanLift your own blocks for this read when signed in. A block against you is never lifted.

Every boolean defaults to false.

Output application/json

NameTypeWhat it is
recordsrequiredrecord[]Each record as listRecords answers it, in the order asked, once each.
withheldat-uri[]Asked URIs moderation holds back from you. They answer not found. Do not show another copy in their place.
handleshandle[]{ did, handle } per repo, found or not. Only with handles.
resolvedresolved[]{ uri, curated } for each URI that answered as another record. Only with curated.
curationcuration[]{ uri, status, curated, reason }, only with curation. Its status is pending, curated or notCurated.
defaultsdefault[]{ uri, value }, only with defaults. Show value until the record is written.

Each list but records is absent when empty. InvalidRequest (400) answers a call with no URIs, more than 100, one that is not an AT-URI, or a flag not true or false. The full lexicon is at getRecords.query.draft.techne.pub.

One place, exactly that record
What comes back

getRecords answers a Map by URI, in batches this method accepts. An address with nothing you may read is not in it. For the curated view and the other versions, read commons.getVersions (eventState).

One place, with its author's handle
What comes back

Signed out, only public records come back. Add Authorization: Bearer … to read records in spaces you may read.