AT URI

From ATProto Wiki
Revision as of 05:06, 13 March 2025 by Baldemo.to (talk | contribs) (Created page with "'''AT URI''' is the addressing scheme used in the AT Protocol to reference repositories, collections, and individual records. Using the <code>at://</code> scheme, these URIs provide a consistent way to identify and locate content within the ATmosphere. AT URIs serve several functions within the AT Protocol. They are used to identify users accross the network, provide references during repository syncing, and standardized linking to AT Protoco...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

AT URI is the addressing scheme used in the AT Protocol to reference repositories, collections, and individual records. Using the at:// scheme, these URIs provide a consistent way to identify and locate content within the ATmosphere.

AT URIs serve several functions within the AT Protocol. They are used to identify users accross the network, provide references during repository syncing, and standardized linking to AT Protocol content.

Applications typically display handle-based URIs for readability, but may use DID-based URIs internally for stability.

Structure

AT URIs follow a simple hierarchical structure:

at://{authority}/{collection}/{record-key}

Where:

For example, these two URIs reference the same post:

at://alice.bsky.social/app.bsky.feed.post/3jzfcijpj2z2a
at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3jzfcijpj2z2a

URI Types

AT URIs can reference different levels of specificity.

Repository URIs reference an entire user repository:

at://alice.bsky.social

Collection URIs reference all records of a specific type in a repository:

at://alice.bsky.social/app.bsky.feed.post

Record URIs reference a specific individual record:

at://alice.bsky.social/app.bsky.feed.post/3jzfcijpj2z2a

Implementation Considerations

Usage of handles or DIDs in URIs depends on context. Handle-based URIs (at://alice.bsky.social/...) are human-readable but are not permanent. DID-based URIs (at://did:plc:z72i7hdynmk6r22z27h6tvur/...) are less readable, but provide stable, permanent references. For critical references, using DID-based URIs is recommended to ensure long-term stability.