Reference · Type registry

pub.techne.draft.registry.requestType

procedure · POSTIn the SDK, techne.platform.pub.techne.draft.registry.requestType

Ask the platform to index a record type defined elsewhere on the network.

The type's schema must be published (a com.atproto.lexicon.schema record its NSID authority's _lexicon TXT record leads to); one that is not is refused. The platform reads the schema and a sample of the network, and answers with a preview. You can build on it at once: while the request is pending, records of the type written through the platform are indexed under the type's real name, so nothing moves later. An operator approves or declines it. Approval starts a walk of the type's existing records on the network; its new writes there reach the platform once a release adds the type to what the platform subscribes to. One request per type: the requester asking again updates the query roles (and rereads the schema) and returns the request; anyone else asking gets it back as it stands. The answer carries the type's techne.pub page; share it.

Input application/json

NameTypeWhat it is
nsidrequirednsid
queryobjectWhich of the type's fields fill the shared query roles, as a {nsid}.query document (pub.techne.draft.query#roles). Without it the type's records can only be got and listed.

Output application/json · requestView

NameTypeWhat it is
nsidrequirednsid
requesterrequireddid
staterequiredstringpending until an operator decides. approved: an operator's live commons credential pinned this request's CID when the platform read it; the approval stands after that, even if the credential is later withdrawn (only a block, registry.purgeType, ends it). Approval starts a walk of the type's existing records on the network; its new writes there reach the platform once a release adds the type to what the platform subscribes to. declined: an operator declined it; records written through the platform are still indexed. blocked: an operator stopped indexing the type (registry.purgeType); nothing of it is indexed, and an approval or a decline no longer changes that. One of pending, approved, declined, blocked.
urirequiredat-uriThe pub.techne.draft.registry.typeRequest record, in the registry's repo.
cidrequiredcidIts CID, which an approval pins.
queryobjectThe query roles the requester mapped, as a {nsid}.query document.
previewpreview
decidedBydidThe operator who approved or declined it.
decidedAtdatetime
decisionat-uriThe record that decided it: the approving credential or the declining verdict.
createdAtrequireddatetime
pagerequireduriThe type's page on techne.pub.

Errors: AuthenticationRequired (Requesting is a signed-in act: the requester is the caller); NoSchema (No published schema was found for this NSID (no _lexicon TXT record, or no schema record where it points)); InvalidLexicon (The published schema is not a record lexicon the platform can check records against); InvalidQuery (The query document names a role or a field the schema does not have); AlreadyIndexed (The platform already has this type and it needs no request (a platform type, a community draft, or an approved request)); InvalidRequest (HTTP 400. nsid is not an NSID, is in the platform's own namespace (publish a draft type with publishType instead), or names a type an operator blocked (registry.purgeType)); TooLarge (HTTP 413. The query document is larger than the platform takes (64 KiB as JSON)); NotConfigured (HTTP 503. This platform has no type registry account to write the request in); RateLimitExceeded (Too many requests from this account; try again later). The full lexicon is at requestType.registry.draft.techne.pub.

preview What indexing a foreign type would take on, read when it was requested: where its schema is published and how big it is on the network.

NameTypeWhat it is
schemarequiredstrongRefThe com.atproto.lexicon.schema record its NSID authority's _lexicon TXT record led to.
schemaCreatedAtdatetimeWhen that schema record was first written, as far as the platform can tell.
fieldsrequiredstring[]The main record's top-level fields, each as name: type.
reposintegerAccounts the relay lists as holding records of it (com.atproto.sync.listReposByCollection), counted up to a ceiling.
reposCappedbooleanWhether repos stopped at the ceiling.
sampledRecordsintegerRecords read from a sample of those accounts.
sampledValidintegerHow many of the sampled records satisfy the schema.
estimatedRecordsintegerRecords of it on the network, estimated from the sample.
readAtdatetime
Ask to index a type from another app

The SDK's generated client has every platform method on techne.platform, typed from its lexicon. The call goes through the user's PDS, which signs it for the platform.

Ask to index a type from another app
What comes back

The Bearer token is your session, or an atproto service-auth JWT with lxm set to this method. Every answer carries page, the type’s techne.pub page; share it.