···11+{
22+ "lexicon": 1,
33+ "id": "app.bsky.feed.searchPosts",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Find posts matching search criteria, returning views of those posts.",
88+ "parameters": {
99+ "type": "params",
1010+ "required": ["q"],
1111+ "properties": {
1212+ "q": {
1313+ "type": "string",
1414+ "description": "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."
1515+ },
1616+ "sort": {
1717+ "type": "string",
1818+ "knownValues": ["top", "latest"],
1919+ "default": "latest",
2020+ "description": "Specifies the ranking order of results."
2121+ },
2222+ "since": {
2323+ "type": "string",
2424+ "description": "Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."
2525+ },
2626+ "until": {
2727+ "type": "string",
2828+ "description": "Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."
2929+ },
3030+ "mentions": {
3131+ "type": "string",
3232+ "format": "at-identifier",
3333+ "description": "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."
3434+ },
3535+ "author": {
3636+ "type": "string",
3737+ "format": "at-identifier",
3838+ "description": "Filter to posts by the given account. Handles are resolved to DID before query-time."
3939+ },
4040+ "lang": {
4141+ "type": "string",
4242+ "format": "language",
4343+ "description": "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."
4444+ },
4545+ "domain": {
4646+ "type": "string",
4747+ "description": "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."
4848+ },
4949+ "url": {
5050+ "type": "string",
5151+ "format": "uri",
5252+ "description": "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."
5353+ },
5454+ "tag": {
5555+ "type": "array",
5656+ "items": {
5757+ "type": "string",
5858+ "maxLength": 640,
5959+ "maxGraphemes": 64
6060+ },
6161+ "description": "Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."
6262+ },
6363+ "limit": {
6464+ "type": "integer",
6565+ "minimum": 1,
6666+ "maximum": 100,
6767+ "default": 25
6868+ },
6969+ "cursor": {
7070+ "type": "string",
7171+ "description": "Optional pagination mechanism; may not necessarily allow scrolling through entire result set."
7272+ }
7373+ }
7474+ },
7575+ "output": {
7676+ "encoding": "application/json",
7777+ "schema": {
7878+ "type": "object",
7979+ "required": ["posts"],
8080+ "properties": {
8181+ "cursor": { "type": "string" },
8282+ "hitsTotal": {
8383+ "type": "integer",
8484+ "description": "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."
8585+ },
8686+ "posts": {
8787+ "type": "array",
8888+ "items": {
8989+ "type": "ref",
9090+ "ref": "app.bsky.feed.defs#postView"
9191+ }
9292+ }
9393+ }
9494+ }
9595+ },
9696+ "errors": [{ "name": "BadQueryString" }]
9797+ }
9898+ }
9999+}
···11+{
22+ "lexicon": 1,
33+ "id": "app.bsky.richtext.facet",
44+ "defs": {
55+ "main": {
66+ "type": "object",
77+ "description": "Annotation of a sub-string within rich text.",
88+ "required": ["index", "features"],
99+ "properties": {
1010+ "index": { "type": "ref", "ref": "#byteSlice" },
1111+ "features": {
1212+ "type": "array",
1313+ "items": { "type": "union", "refs": ["#mention", "#link", "#tag"] }
1414+ }
1515+ }
1616+ },
1717+ "mention": {
1818+ "type": "object",
1919+ "description": "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",
2020+ "required": ["did"],
2121+ "properties": {
2222+ "did": { "type": "string", "format": "did" }
2323+ }
2424+ },
2525+ "link": {
2626+ "type": "object",
2727+ "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.",
2828+ "required": ["uri"],
2929+ "properties": {
3030+ "uri": { "type": "string", "format": "uri" }
3131+ }
3232+ },
3333+ "tag": {
3434+ "type": "object",
3535+ "description": "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').",
3636+ "required": ["tag"],
3737+ "properties": {
3838+ "tag": { "type": "string", "maxLength": 640, "maxGraphemes": 64 }
3939+ }
4040+ },
4141+ "byteSlice": {
4242+ "type": "object",
4343+ "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.",
4444+ "required": ["byteStart", "byteEnd"],
4545+ "properties": {
4646+ "byteStart": { "type": "integer", "minimum": 0 },
4747+ "byteEnd": { "type": "integer", "minimum": 0 }
4848+ }
4949+ }
5050+ }
5151+}
···11+{
22+ "lexicon": 1,
33+ "id": "app.bsky.unspecced.searchPostsSkeleton",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Backend Posts search, returns only skeleton",
88+ "parameters": {
99+ "type": "params",
1010+ "required": ["q"],
1111+ "properties": {
1212+ "q": {
1313+ "type": "string",
1414+ "description": "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."
1515+ },
1616+ "sort": {
1717+ "type": "string",
1818+ "knownValues": ["top", "latest"],
1919+ "default": "latest",
2020+ "description": "Specifies the ranking order of results."
2121+ },
2222+ "since": {
2323+ "type": "string",
2424+ "description": "Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."
2525+ },
2626+ "until": {
2727+ "type": "string",
2828+ "description": "Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."
2929+ },
3030+ "mentions": {
3131+ "type": "string",
3232+ "format": "at-identifier",
3333+ "description": "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."
3434+ },
3535+ "author": {
3636+ "type": "string",
3737+ "format": "at-identifier",
3838+ "description": "Filter to posts by the given account. Handles are resolved to DID before query-time."
3939+ },
4040+ "lang": {
4141+ "type": "string",
4242+ "format": "language",
4343+ "description": "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."
4444+ },
4545+ "domain": {
4646+ "type": "string",
4747+ "description": "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."
4848+ },
4949+ "url": {
5050+ "type": "string",
5151+ "format": "uri",
5252+ "description": "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."
5353+ },
5454+ "tag": {
5555+ "type": "array",
5656+ "items": {
5757+ "type": "string",
5858+ "maxLength": 640,
5959+ "maxGraphemes": 64
6060+ },
6161+ "description": "Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."
6262+ },
6363+ "viewer": {
6464+ "type": "string",
6565+ "format": "did",
6666+ "description": "DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries."
6767+ },
6868+ "limit": {
6969+ "type": "integer",
7070+ "minimum": 1,
7171+ "maximum": 100,
7272+ "default": 25
7373+ },
7474+ "cursor": {
7575+ "type": "string",
7676+ "description": "Optional pagination mechanism; may not necessarily allow scrolling through entire result set."
7777+ }
7878+ }
7979+ },
8080+ "output": {
8181+ "encoding": "application/json",
8282+ "schema": {
8383+ "type": "object",
8484+ "required": ["posts"],
8585+ "properties": {
8686+ "cursor": { "type": "string" },
8787+ "hitsTotal": {
8888+ "type": "integer",
8989+ "description": "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."
9090+ },
9191+ "posts": {
9292+ "type": "array",
9393+ "items": {
9494+ "type": "ref",
9595+ "ref": "app.bsky.unspecced.defs#skeletonSearchPost"
9696+ }
9797+ }
9898+ }
9999+ }
100100+ },
101101+ "errors": [{ "name": "BadQueryString" }]
102102+ }
103103+ }
104104+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.identity.requestPlcOperationSignature",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Request an email with a code to in order to request a signed PLC operation. Requires Auth."
88+ }
99+ }
1010+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.label.defs",
44+ "defs": {
55+ "label": {
66+ "type": "object",
77+ "description": "Metadata tag on an atproto resource (eg, repo or record).",
88+ "required": ["src", "uri", "val", "cts"],
99+ "properties": {
1010+ "ver": {
1111+ "type": "integer",
1212+ "description": "The AT Protocol version of the label object."
1313+ },
1414+ "src": {
1515+ "type": "string",
1616+ "format": "did",
1717+ "description": "DID of the actor who created this label."
1818+ },
1919+ "uri": {
2020+ "type": "string",
2121+ "format": "uri",
2222+ "description": "AT URI of the record, repository (account), or other resource that this label applies to."
2323+ },
2424+ "cid": {
2525+ "type": "string",
2626+ "format": "cid",
2727+ "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to."
2828+ },
2929+ "val": {
3030+ "type": "string",
3131+ "maxLength": 128,
3232+ "description": "The short string name of the value or type of this label."
3333+ },
3434+ "neg": {
3535+ "type": "boolean",
3636+ "description": "If true, this is a negation label, overwriting a previous label."
3737+ },
3838+ "cts": {
3939+ "type": "string",
4040+ "format": "datetime",
4141+ "description": "Timestamp when this label was created."
4242+ },
4343+ "exp": {
4444+ "type": "string",
4545+ "format": "datetime",
4646+ "description": "Timestamp at which this label expires (no longer applies)."
4747+ },
4848+ "sig": {
4949+ "type": "bytes",
5050+ "description": "Signature of dag-cbor encoded label."
5151+ }
5252+ }
5353+ },
5454+ "selfLabels": {
5555+ "type": "object",
5656+ "description": "Metadata tags on an atproto record, published by the author within the record.",
5757+ "required": ["values"],
5858+ "properties": {
5959+ "values": {
6060+ "type": "array",
6161+ "items": { "type": "ref", "ref": "#selfLabel" },
6262+ "maxLength": 10
6363+ }
6464+ }
6565+ },
6666+ "selfLabel": {
6767+ "type": "object",
6868+ "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.",
6969+ "required": ["val"],
7070+ "properties": {
7171+ "val": {
7272+ "type": "string",
7373+ "maxLength": 128,
7474+ "description": "The short string name of the value or type of this label."
7575+ }
7676+ }
7777+ },
7878+ "labelValueDefinition": {
7979+ "type": "object",
8080+ "description": "Declares a label value and its expected interpretations and behaviors.",
8181+ "required": ["identifier", "severity", "blurs", "locales"],
8282+ "properties": {
8383+ "identifier": {
8484+ "type": "string",
8585+ "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
8686+ "maxLength": 100,
8787+ "maxGraphemes": 100
8888+ },
8989+ "severity": {
9090+ "type": "string",
9191+ "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
9292+ "knownValues": ["inform", "alert", "none"]
9393+ },
9494+ "blurs": {
9595+ "type": "string",
9696+ "description": "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.",
9797+ "knownValues": ["content", "media", "none"]
9898+ },
9999+ "defaultSetting": {
100100+ "type": "string",
101101+ "description": "The default setting for this label.",
102102+ "knownValues": ["ignore", "warn", "hide"],
103103+ "default": "warn"
104104+ },
105105+ "adultOnly": {
106106+ "type": "boolean",
107107+ "description": "Does the user need to have adult content enabled in order to configure this label?"
108108+ },
109109+ "locales": {
110110+ "type": "array",
111111+ "items": { "type": "ref", "ref": "#labelValueDefinitionStrings" }
112112+ }
113113+ }
114114+ },
115115+ "labelValueDefinitionStrings": {
116116+ "type": "object",
117117+ "description": "Strings which describe the label in the UI, localized into a specific language.",
118118+ "required": ["lang", "name", "description"],
119119+ "properties": {
120120+ "lang": {
121121+ "type": "string",
122122+ "description": "The code of the language these strings are written in.",
123123+ "format": "language"
124124+ },
125125+ "name": {
126126+ "type": "string",
127127+ "description": "A short human-readable name for the label.",
128128+ "maxGraphemes": 64,
129129+ "maxLength": 640
130130+ },
131131+ "description": {
132132+ "type": "string",
133133+ "description": "A longer description of what the label means and why it might be applied.",
134134+ "maxGraphemes": 10000,
135135+ "maxLength": 100000
136136+ }
137137+ }
138138+ },
139139+ "labelValue": {
140140+ "type": "string",
141141+ "knownValues": [
142142+ "!hide",
143143+ "!no-promote",
144144+ "!warn",
145145+ "!no-unauthenticated",
146146+ "dmca-violation",
147147+ "doxxing",
148148+ "porn",
149149+ "sexual",
150150+ "nudity",
151151+ "nsfl",
152152+ "gore"
153153+ ]
154154+ }
155155+ }
156156+}
+47
lexicons/com/atproto/label/queryLabels.json
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.label.queryLabels",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.",
88+ "parameters": {
99+ "type": "params",
1010+ "required": ["uriPatterns"],
1111+ "properties": {
1212+ "uriPatterns": {
1313+ "type": "array",
1414+ "items": { "type": "string" },
1515+ "description": "List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI."
1616+ },
1717+ "sources": {
1818+ "type": "array",
1919+ "items": { "type": "string", "format": "did" },
2020+ "description": "Optional list of label sources (DIDs) to filter on."
2121+ },
2222+ "limit": {
2323+ "type": "integer",
2424+ "minimum": 1,
2525+ "maximum": 250,
2626+ "default": 50
2727+ },
2828+ "cursor": { "type": "string" }
2929+ }
3030+ },
3131+ "output": {
3232+ "encoding": "application/json",
3333+ "schema": {
3434+ "type": "object",
3535+ "required": ["labels"],
3636+ "properties": {
3737+ "cursor": { "type": "string" },
3838+ "labels": {
3939+ "type": "array",
4040+ "items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
4141+ }
4242+ }
4343+ }
4444+ }
4545+ }
4646+ }
4747+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.repo.uploadBlob",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.",
88+ "input": {
99+ "encoding": "*/*"
1010+ },
1111+ "output": {
1212+ "encoding": "application/json",
1313+ "schema": {
1414+ "type": "object",
1515+ "required": ["blob"],
1616+ "properties": {
1717+ "blob": { "type": "blob" }
1818+ }
1919+ }
2020+ }
2121+ }
2222+ }
2323+}
+10
lexicons/com/atproto/server/activateAccount.json
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.server.activateAccount",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup."
88+ }
99+ }
1010+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.server.deactivateAccount",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.",
88+ "input": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "properties": {
1313+ "deleteAfter": {
1414+ "type": "string",
1515+ "format": "datetime",
1616+ "description": "A recommendation to server as to how long they should hold onto the deactivated account before deleting."
1717+ }
1818+ }
1919+ }
2020+ }
2121+ }
2222+ }
2323+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.server.getServiceAuth",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Get a signed token on behalf of the requesting DID for the requested service.",
88+ "parameters": {
99+ "type": "params",
1010+ "required": ["aud"],
1111+ "properties": {
1212+ "aud": {
1313+ "type": "string",
1414+ "format": "did",
1515+ "description": "The DID of the service that the token will be used to authenticate with"
1616+ },
1717+ "exp": {
1818+ "type": "integer",
1919+ "description": "The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope."
2020+ },
2121+ "lxm": {
2222+ "type": "string",
2323+ "format": "nsid",
2424+ "description": "Lexicon (XRPC) method to bind the requested token to"
2525+ }
2626+ }
2727+ },
2828+ "output": {
2929+ "encoding": "application/json",
3030+ "schema": {
3131+ "type": "object",
3232+ "required": ["token"],
3333+ "properties": {
3434+ "token": {
3535+ "type": "string"
3636+ }
3737+ }
3838+ }
3939+ },
4040+ "errors": [
4141+ {
4242+ "name": "BadExpiration",
4343+ "description": "Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes."
4444+ }
4545+ ]
4646+ }
4747+ }
4848+}
+31
lexicons/com/atproto/server/getSession.json
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.server.getSession",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Get information about the current auth session. Requires auth.",
88+ "output": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "required": ["handle", "did"],
1313+ "properties": {
1414+ "handle": { "type": "string", "format": "handle" },
1515+ "did": { "type": "string", "format": "did" },
1616+ "email": { "type": "string" },
1717+ "emailConfirmed": { "type": "boolean" },
1818+ "emailAuthFactor": { "type": "boolean" },
1919+ "didDoc": { "type": "unknown" },
2020+ "active": { "type": "boolean" },
2121+ "status": {
2222+ "type": "string",
2323+ "description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",
2424+ "knownValues": ["takendown", "suspended", "deactivated"]
2525+ }
2626+ }
2727+ }
2828+ }
2929+ }
3030+ }
3131+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.server.reserveSigningKey",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.",
88+ "input": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "properties": {
1313+ "did": {
1414+ "type": "string",
1515+ "format": "did",
1616+ "description": "The DID to reserve a key for."
1717+ }
1818+ }
1919+ }
2020+ },
2121+ "output": {
2222+ "encoding": "application/json",
2323+ "schema": {
2424+ "type": "object",
2525+ "required": ["signingKey"],
2626+ "properties": {
2727+ "signingKey": {
2828+ "type": "string",
2929+ "description": "The public key for the reserved signing key, in did:key serialization."
3030+ }
3131+ }
3232+ }
3333+ }
3434+ }
3535+ }
3636+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.sync.getRecord",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.",
88+ "parameters": {
99+ "type": "params",
1010+ "required": ["did", "collection", "rkey"],
1111+ "properties": {
1212+ "did": {
1313+ "type": "string",
1414+ "format": "did",
1515+ "description": "The DID of the repo."
1616+ },
1717+ "collection": { "type": "string", "format": "nsid" },
1818+ "rkey": { "type": "string", "description": "Record Key" },
1919+ "commit": {
2020+ "type": "string",
2121+ "format": "cid",
2222+ "description": "DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit"
2323+ }
2424+ }
2525+ },
2626+ "output": {
2727+ "encoding": "application/vnd.ipld.car"
2828+ },
2929+ "errors": [
3030+ { "name": "RecordNotFound" },
3131+ { "name": "RepoNotFound" },
3232+ { "name": "RepoTakendown" },
3333+ { "name": "RepoSuspended" },
3434+ { "name": "RepoDeactivated" }
3535+ ]
3636+ }
3737+ }
3838+}
+34
lexicons/com/atproto/sync/getRepo.json
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.sync.getRepo",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.",
88+ "parameters": {
99+ "type": "params",
1010+ "required": ["did"],
1111+ "properties": {
1212+ "did": {
1313+ "type": "string",
1414+ "format": "did",
1515+ "description": "The DID of the repo."
1616+ },
1717+ "since": {
1818+ "type": "string",
1919+ "description": "The revision ('rev') of the repo to create a diff from."
2020+ }
2121+ }
2222+ },
2323+ "output": {
2424+ "encoding": "application/vnd.ipld.car"
2525+ },
2626+ "errors": [
2727+ { "name": "RepoNotFound" },
2828+ { "name": "RepoTakendown" },
2929+ { "name": "RepoSuspended" },
3030+ { "name": "RepoDeactivated" }
3131+ ]
3232+ }
3333+ }
3434+}
+42
lexicons/com/atproto/sync/getRepoStatus.json
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.sync.getRepoStatus",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.",
88+ "parameters": {
99+ "type": "params",
1010+ "required": ["did"],
1111+ "properties": {
1212+ "did": {
1313+ "type": "string",
1414+ "format": "did",
1515+ "description": "The DID of the repo."
1616+ }
1717+ }
1818+ },
1919+ "output": {
2020+ "encoding": "application/json",
2121+ "schema": {
2222+ "type": "object",
2323+ "required": ["did", "active"],
2424+ "properties": {
2525+ "did": { "type": "string", "format": "did" },
2626+ "active": { "type": "boolean" },
2727+ "status": {
2828+ "type": "string",
2929+ "description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",
3030+ "knownValues": ["takendown", "suspended", "deactivated"]
3131+ },
3232+ "rev": {
3333+ "type": "string",
3434+ "description": "Optional field, the current rev of the repo, if active=true"
3535+ }
3636+ }
3737+ }
3838+ },
3939+ "errors": [{ "name": "RepoNotFound" }]
4040+ }
4141+ }
4242+}
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.sync.listRepos",
44+ "defs": {
55+ "main": {
66+ "type": "query",
77+ "description": "Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.",
88+ "parameters": {
99+ "type": "params",
1010+ "properties": {
1111+ "limit": {
1212+ "type": "integer",
1313+ "minimum": 1,
1414+ "maximum": 1000,
1515+ "default": 500
1616+ },
1717+ "cursor": { "type": "string" }
1818+ }
1919+ },
2020+ "output": {
2121+ "encoding": "application/json",
2222+ "schema": {
2323+ "type": "object",
2424+ "required": ["repos"],
2525+ "properties": {
2626+ "cursor": { "type": "string" },
2727+ "repos": {
2828+ "type": "array",
2929+ "items": { "type": "ref", "ref": "#repo" }
3030+ }
3131+ }
3232+ }
3333+ }
3434+ },
3535+ "repo": {
3636+ "type": "object",
3737+ "required": ["did", "head", "rev"],
3838+ "properties": {
3939+ "did": { "type": "string", "format": "did" },
4040+ "head": {
4141+ "type": "string",
4242+ "format": "cid",
4343+ "description": "Current repo commit CID"
4444+ },
4545+ "rev": { "type": "string" },
4646+ "active": { "type": "boolean" },
4747+ "status": {
4848+ "type": "string",
4949+ "description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",
5050+ "knownValues": ["takendown", "suspended", "deactivated"]
5151+ }
5252+ }
5353+ }
5454+ }
5555+}
+23
lexicons/com/atproto/sync/notifyOfUpdate.json
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.sync.notifyOfUpdate",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay.",
88+ "input": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "required": ["hostname"],
1313+ "properties": {
1414+ "hostname": {
1515+ "type": "string",
1616+ "description": "Hostname of the current service (usually a PDS) that is notifying of update."
1717+ }
1818+ }
1919+ }
2020+ }
2121+ }
2222+ }
2323+}
+23
lexicons/com/atproto/sync/requestCrawl.json
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.sync.requestCrawl",
44+ "defs": {
55+ "main": {
66+ "type": "procedure",
77+ "description": "Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.",
88+ "input": {
99+ "encoding": "application/json",
1010+ "schema": {
1111+ "type": "object",
1212+ "required": ["hostname"],
1313+ "properties": {
1414+ "hostname": {
1515+ "type": "string",
1616+ "description": "Hostname of the current service (eg, PDS) that is requesting to be crawled."
1717+ }
1818+ }
1919+ }
2020+ }
2121+ }
2222+ }
2323+}
+205
lexicons/com/atproto/sync/subscribeRepos.json
···11+{
22+ "lexicon": 1,
33+ "id": "com.atproto.sync.subscribeRepos",
44+ "defs": {
55+ "main": {
66+ "type": "subscription",
77+ "description": "Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.",
88+ "parameters": {
99+ "type": "params",
1010+ "properties": {
1111+ "cursor": {
1212+ "type": "integer",
1313+ "description": "The last known event seq number to backfill from."
1414+ }
1515+ }
1616+ },
1717+ "message": {
1818+ "schema": {
1919+ "type": "union",
2020+ "refs": ["#commit", "#identity", "#account", "#handle", "#migrate", "#tombstone", "#info"]
2121+ }
2222+ },
2323+ "errors": [
2424+ { "name": "FutureCursor" },
2525+ {
2626+ "name": "ConsumerTooSlow",
2727+ "description": "If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection."
2828+ }
2929+ ]
3030+ },
3131+ "commit": {
3232+ "type": "object",
3333+ "description": "Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.",
3434+ "required": [
3535+ "seq",
3636+ "rebase",
3737+ "tooBig",
3838+ "repo",
3939+ "commit",
4040+ "rev",
4141+ "since",
4242+ "blocks",
4343+ "ops",
4444+ "blobs",
4545+ "time"
4646+ ],
4747+ "nullable": ["prev", "since"],
4848+ "properties": {
4949+ "seq": {
5050+ "type": "integer",
5151+ "description": "The stream sequence number of this message."
5252+ },
5353+ "rebase": { "type": "boolean", "description": "DEPRECATED -- unused" },
5454+ "tooBig": {
5555+ "type": "boolean",
5656+ "description": "Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data."
5757+ },
5858+ "repo": {
5959+ "type": "string",
6060+ "format": "did",
6161+ "description": "The repo this event comes from."
6262+ },
6363+ "commit": {
6464+ "type": "cid-link",
6565+ "description": "Repo commit object CID."
6666+ },
6767+ "prev": {
6868+ "type": "cid-link",
6969+ "description": "DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability."
7070+ },
7171+ "rev": {
7272+ "type": "string",
7373+ "description": "The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event."
7474+ },
7575+ "since": {
7676+ "type": "string",
7777+ "description": "The rev of the last emitted commit from this repo (if any)."
7878+ },
7979+ "blocks": {
8080+ "type": "bytes",
8181+ "description": "CAR file containing relevant blocks, as a diff since the previous repo state.",
8282+ "maxLength": 1000000
8383+ },
8484+ "ops": {
8585+ "type": "array",
8686+ "items": {
8787+ "type": "ref",
8888+ "ref": "#repoOp",
8989+ "description": "List of repo mutation operations in this commit (eg, records created, updated, or deleted)."
9090+ },
9191+ "maxLength": 200
9292+ },
9393+ "blobs": {
9494+ "type": "array",
9595+ "items": {
9696+ "type": "cid-link",
9797+ "description": "List of new blobs (by CID) referenced by records in this commit."
9898+ }
9999+ },
100100+ "time": {
101101+ "type": "string",
102102+ "format": "datetime",
103103+ "description": "Timestamp of when this message was originally broadcast."
104104+ }
105105+ }
106106+ },
107107+ "identity": {
108108+ "type": "object",
109109+ "description": "Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.",
110110+ "required": ["seq", "did", "time"],
111111+ "properties": {
112112+ "seq": { "type": "integer" },
113113+ "did": { "type": "string", "format": "did" },
114114+ "time": { "type": "string", "format": "datetime" },
115115+ "handle": {
116116+ "type": "string",
117117+ "format": "handle",
118118+ "description": "The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details."
119119+ }
120120+ }
121121+ },
122122+ "account": {
123123+ "type": "object",
124124+ "description": "Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",
125125+ "required": ["seq", "did", "time", "active"],
126126+ "properties": {
127127+ "seq": { "type": "integer" },
128128+ "did": { "type": "string", "format": "did" },
129129+ "time": { "type": "string", "format": "datetime" },
130130+ "active": {
131131+ "type": "boolean",
132132+ "description": "Indicates that the account has a repository which can be fetched from the host that emitted this event."
133133+ },
134134+ "status": {
135135+ "type": "string",
136136+ "description": "If active=false, this optional field indicates a reason for why the account is not active.",
137137+ "knownValues": ["takendown", "suspended", "deleted", "deactivated"]
138138+ }
139139+ }
140140+ },
141141+ "handle": {
142142+ "type": "object",
143143+ "description": "DEPRECATED -- Use #identity event instead",
144144+ "required": ["seq", "did", "handle", "time"],
145145+ "properties": {
146146+ "seq": { "type": "integer" },
147147+ "did": { "type": "string", "format": "did" },
148148+ "handle": { "type": "string", "format": "handle" },
149149+ "time": { "type": "string", "format": "datetime" }
150150+ }
151151+ },
152152+ "migrate": {
153153+ "type": "object",
154154+ "description": "DEPRECATED -- Use #account event instead",
155155+ "required": ["seq", "did", "migrateTo", "time"],
156156+ "nullable": ["migrateTo"],
157157+ "properties": {
158158+ "seq": { "type": "integer" },
159159+ "did": { "type": "string", "format": "did" },
160160+ "migrateTo": { "type": "string" },
161161+ "time": { "type": "string", "format": "datetime" }
162162+ }
163163+ },
164164+ "tombstone": {
165165+ "type": "object",
166166+ "description": "DEPRECATED -- Use #account event instead",
167167+ "required": ["seq", "did", "time"],
168168+ "properties": {
169169+ "seq": { "type": "integer" },
170170+ "did": { "type": "string", "format": "did" },
171171+ "time": { "type": "string", "format": "datetime" }
172172+ }
173173+ },
174174+ "info": {
175175+ "type": "object",
176176+ "required": ["name"],
177177+ "properties": {
178178+ "name": {
179179+ "type": "string",
180180+ "knownValues": ["OutdatedCursor"]
181181+ },
182182+ "message": {
183183+ "type": "string"
184184+ }
185185+ }
186186+ },
187187+ "repoOp": {
188188+ "type": "object",
189189+ "description": "A repo operation, ie a mutation of a single record.",
190190+ "required": ["action", "path", "cid"],
191191+ "nullable": ["cid"],
192192+ "properties": {
193193+ "action": {
194194+ "type": "string",
195195+ "knownValues": ["create", "update", "delete"]
196196+ },
197197+ "path": { "type": "string" },
198198+ "cid": {
199199+ "type": "cid-link",
200200+ "description": "For creates and updates, the new record CID. For deletions, null."
201201+ }
202202+ }
203203+ }
204204+ }
205205+}