10. XRPC: every API call is a Lexicon method over HTTP
API calls are HTTP at /xrpc/ plus the method's NSID; queries are GET and procedures are POST; the Lexicon types inputs and outputs; the atproto-proxy header asks the PDS to forward a call with a token it signs; one method name works on every server.

10. XRPC: every API call is a Lexicon method over HTTP

API calls are HTTP at /xrpc/ plus the method's NSID; queries are GET and procedures are POST; the Lexicon types inputs and outputs; the atproto-proxy header asks the PDS to forward a call with a token it signs; one method name works on every server.

It keeps the network one network without a central API.

Atproto's API is HTTP with one convention. The path is slash xrpc slash the method's namespaced ID.

A query is a GET. Read only, cacheable. A procedure is a POST. It can change things.

The Lexicon describes the parameters, the body, and the response. So clients are typed, and inputs are checked.

You talk to your own host. A header can ask it to forward the call to another service. The host signs the forwarded request on your behalf.

One name, every server. That is what makes the network one network.

Terms. XRPC: the HTTP convention for Lexicon methods at /xrpc/<nsid>.

For developers. The token the host attaches to a forwarded request is an inter-service JWT, signed with the account's signing key, with the target service's DID as its audience, so it cannot be replayed elsewhere.

Check yourself. What does the PDS add when it forwards a proxied request?

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Connections0

Connections show where other documents or comments link to this document.

Related documents

Loading connections…