Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
ATProto Wiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
XPRC
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
'''XPRC''' is the standardized HTTP API convention used throughout the [[AT Protocol]] for client-server and server-server communication. It provides a consistent way for applications to interact with [[Personal Data Server (PDS)|Personal Data Server (PDSes)]], [[Relay|relays]], [[AppView|AppViews]], and other services in the [[ATmosphere]]. XPRC enables a wide range of interactions within the AT Protocol, such as fetching and creating content, managing user accounts and profiles, synchronizing [[Data repository|data repositories]] between services, uploading [[Blob|blobs]], and facilitating user interactions. == Structure == XPRC requests follow a simple pattern: * All API endpoints begin with <code>/xprc/</code> followed by a [[Namespaced Identifier (NSID)]] * The NSID identifies the specific [[lexicon]] schema that defines the request and response formats * Requests are either ''queries'' (HTTP GET) or ''procedures'' (HTTP POST) For example, a request to fetch a user's profile might look like:<syntaxhighlight lang="text"> GET /xrpc/app.bsky.actor.getProfile?actor=alice.bsky.social </syntaxhighlight> == Key Features == === Request Types === XPRC supports two primary request types: * '''Queries''' (HTTP GET): Used for retrieving data without changing server state * '''Procedures''' (HTTP POST): Used for operations that modify data or state The distinction follows standard HTTP [[wikipedia:REST|REST]] semantics, with queries being cacheable and procedures being non-cacheable. === Parameters and Data (WIP) === * '''URL Parameters''': Simple data types passed in the URL query string * [[Blob|'''Blobs''']]: Binary data like images handled through specialized upload/download endpoints === Authentication === XPRC uses several authentication methods: * '''[[OAuth]]''': The primary authentication method for client applications * '''[[wikipedia:JSON_Web_Token|JWTs]]''': Used for session management and service-to-service communication * '''[[App Passwords]]''': Special credentials that provide limited access for third-party applications === Pagination === For endpoints that return large sets of data, XPRC uses [[wikipedia:Cursor_(databases)|cursor]]-based pagination. Initial requests are made without cursor parameters. If more data is available, the response will include a cursor value that must be included in follow-up requests to retrieve the next batch of data. This continues until no cursor is returned, indicating the end of the dataset.
Summary:
Please note that all contributions to ATProto Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
ATProto Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width