At this level
social.grain · 10- social.grain.authFull permission-set Everything a Grain app does as an account: write and delete Grain's records in its repository, and call Grain's methods at the service the include names (`include:social.grain.authFull?aud=did:web:grain.social%23grain_appview`). Grows as Grain does: a collection or method added here reaches signed-in accounts as their tokens are refreshed.
- social.grain.basePermissions permission-set The photo pools of an account's groups, to read and to add galleries, photos, favorites and comments of its own to.
- social.grain.comment record A comment on the record its subject names, or a reply to another comment.
- social.grain.defs defs width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.
- social.grain.favorite record A favorite of the record its subject names.
- social.grain.gallery record A gallery of photos, which its items place in it in order.
- social.grain.group space A group's pool of galleries: the photos its members put in, and their favourites and comments on them, held together as one space. The group is its authority and its space key is self. Each member's records stay in their own repo; the space says who may read them, which is the group's members. A favourite or a comment belongs here rather than in the public repo for the same reason the photos do: in the public repo it would name a private gallery to the whole network.
- social.grain.photo record A photo, with its alt text and aspect ratio, placed in galleries by gallery items.
- social.grain.privateGallery space One private gallery, anchored on its author's account. The space key is the gallery's rkey. The author writes the gallery, its items and its photos; members only read them.
- social.grain.story record A story: a photo or video posted to an account's stories.
- social.grain.actor.defs defs How each kind of notification reaches the viewer. A kind left out takes the default: push and in-app, from anyone.
- social.grain.actor.getFavorites query Get galleries favorited by the authenticated actor. Only the actor themselves can view their favorites.
- social.grain.actor.getPreferences query Get the viewer's grain preferences, one of each kind they have set. Requires auth.
- social.grain.actor.getProfile query Get an actor's profile with gallery stats and follow relationships.
- social.grain.actor.getSuggestedFollows query Get suggested profiles to follow based on bsky follow graph.
- social.grain.actor.profile record A declaration of a basic account profile.
- social.grain.actor.putPreferences procedure Set the viewer's grain preferences, replacing all of them, as app.bsky.actor.putPreferences does. Requires auth.
- social.grain.actor.searchActors query Full-text search for user profiles.
- social.grain.actor.searchActorsTypeahead query Typeahead search for actors, merging bsky and grain profiles.
- social.grain.actor.setPreference procedure Set one of the viewer's grain preferences: the one of its $type they have is replaced by it, or it is added where they have none, and every other kind is left as it is. Answers the whole set after. Requires auth.
- social.grain.admin.actOnReview procedure Decide a subject in the review queue: take its account down, label it, or dismiss it. Closes every open report against the subject either way. A takedown is com.atproto.admin.updateSubjectStatus's, made in the same step. Requires an admin session.
- social.grain.admin.addRepos procedure Start tracking repos, and backfill them. Requires an admin session.
- social.grain.admin.applyLabel procedure Apply a label as this server's labeler. Requires an admin session.
- social.grain.admin.defs defs One subject in the review queue, however many classifiers scored it.
- social.grain.admin.getInfo query The state of this server: repos by status, records by collection, open reports and the database's size. Requires an admin session.
- social.grain.admin.getRepo query One tracked repo's status. Requires an admin session.
- social.grain.admin.getReport query A report by its id, in any state. Requires an admin session.
- social.grain.admin.getReviewQueue query The classifier review queue, one item per subject, highest score first. Requires an admin session.
- social.grain.admin.getReviewStats query Rollups for the review queue, the classifiers there are, and the progress of the latest scan. Requires an admin session.
- social.grain.admin.getReviewSubject query Everything needed to judge one account: its status, the labels on it and on its records, the reports against them, a sample of its records and how many it has of each kind. Requires an admin session.
- social.grain.admin.listLabelDefinitions query The labels this server's labeler can apply. Requires an admin session.
- social.grain.admin.listReports query List reports, newest first. Requires an admin session.
- social.grain.admin.listRepos query Tracked repos, most recently backfilled first. q finds them by part of a DID or handle. Requires an admin session.
- social.grain.admin.negateLabel procedure Negate a label this server's labeler applied. Requires an admin session.
- social.grain.admin.removeRepos procedure Stop tracking repos, and drop what was indexed from them. Requires an admin session.
- social.grain.admin.resolveReport procedure Close an open report. Resolving it applies the label it asked for; dismissing it does not. Requires an admin session.
- social.grain.admin.resyncRepos procedure Fetch repos again from their PDS and reindex them. Requires an admin session.
- social.grain.admin.searchRecords query Search the indexed records. q is an at:// URI, a DID (that account's records) or text; with no q, the newest records the firehose brought. Requires an admin session.
- social.grain.admin.startScan procedure Start a classifier scan. Answers once it is under way; progress is polled from getReviewStats. Requires an admin session.
- social.grain.feed.defs defs
- social.grain.feed.describeFeeds query List the feeds this server serves, as app.bsky.feed.describeFeedGenerator does for a feed generator.
- social.grain.feed.getFeed query Get a page of one of grain's gallery feeds, named by its URI as app.bsky.feed.getFeed names a feed generator. The filters each apply only to the feed that takes them.
- social.grain.gallery.defs defs Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.
- social.grain.gallery.deleteGallery procedure Delete one of the logged-in account's galleries with what hangs off it: its items, the photos they place that no other of the account's galleries does, those photos' EXIF, and the account's own favorite of it and comments on it, children first, at the account's PDS and from the index before answering. What others wrote about it stays theirs. For the web, by its session cookie, from a page of the site; a service token is refused (the apps commit social.grain.gallery.getDeletionPlan's deletes at t
- social.grain.gallery.getCameras query Get top cameras by photo count.
- social.grain.gallery.getCrossPost query Get the Bluesky post that shares a gallery or a story, for its author to write to their own repository as it is: its title, #GrainSocial and a link to it, and its photos.
- social.grain.gallery.getDeletionPlan query Plan the deletion of one of the viewer's galleries with what hangs off it, as social.grain.gallery.deleteGallery deletes it: its items, the photos they place that no other of the viewer's galleries does, those photos' EXIF, and the viewer's own favorite of it and comments on it, children first, then the gallery. What others wrote about it stays theirs. Answered as the deletes of one com.atproto.repo.applyWrites, for an app to commit at the viewer's PDS all or none, then call social.grain.sync.re
- social.grain.gallery.getFavorites query Get the accounts that have favorited a gallery, most recent first.
- social.grain.gallery.getGallery query Get a single gallery view by AT URI.
- social.grain.gallery.getLocations query Get top locations by gallery count.
- social.grain.gallery.item record A photo's place in a gallery: which photo, which gallery, and where in it.
- social.grain.gallery.searchGalleries query Full-text search for galleries, returning full gallery views.
- social.grain.graph.block record A block of another account.
- social.grain.graph.defs defs
- social.grain.graph.follow record A follow of another account.
- social.grain.graph.getBlocks query Get the viewer's blocked users.
- social.grain.graph.getFollowers query Get followers for a given user.
- social.grain.graph.getFollowing query Get users that a given user follows.
- social.grain.graph.getKnownFollowers query Get followers of a given actor that the viewer, named by their service token, also follows.
- social.grain.graph.getMutes query Get the viewer's muted users.
- social.grain.graph.muteActor procedure Mute an actor. Mutes are private and only affect the muter's feeds.
- social.grain.graph.unmuteActor procedure Unmute an actor.
- social.grain.group.createComment procedure Comment on a gallery in a group's pool. The comment is the viewer's own record, written into the pool beside the gallery it answers, so only that group's members can read it.
- social.grain.group.createGallery procedure Add a gallery to a group's pool: one permissioned space (social.grain.group) anchored on the group, holding every member's galleries. The gallery, its photos and its items are the author's own records in their own repo, written inside that space — so only the group's members can read them, and they leave with the author.
- social.grain.group.createGroup procedure Start a group on Grain's group host. The host creates the group with the viewer as its founder and hands Grain its own session on it (fyi.opensocial.provisionGroup); Grain then gives the group its pool and its Grain profile. The viewer never leaves Grain.
- social.grain.group.decline record A group turning a submission down. Written into the group's repo by whoever is acting as it; the submission leaves the queue for good and stays in the member's repo as their own record. Delete this to reconsider.
- social.grain.group.defs defs
- social.grain.group.deleteComment procedure Delete one of your own comments from a group's pool.
- social.grain.group.deleteGallery procedure Withdraw the viewer's own gallery from a group's pool. The gallery, its photos and the items joining them are the viewer's records in the viewer's repo, held inside the group's space, so this removes them from that space and nothing else. Only the author's own repo is touched: whoever acts as the group evicts by a different route.
- social.grain.group.getGallery query One gallery from a group's pool, read from the repo that holds it through a credential the group's host issues.
- social.grain.group.getGroup query A group: a group DID that has declared itself and shows up in Grain as an author whose pool is other people's galleries.
- social.grain.group.getGroupHost query The group host this Grain creates groups on, and the domain a new group's handle ends in. Absent when this Grain creates none.
- social.grain.group.getSubmissions query Submissions to a group that no item has answered yet — the review queue.
- social.grain.group.item record A gallery in a group's pool. Written into the group's own repo by whoever is acting as it; the gallery itself stays in its author's repo. Accept a submission by creating one of these, remove from the pool by deleting it.
- social.grain.group.joinGroup procedure Ask a group's group host to admit the viewer: Grain mints service auth for the host from the viewer's PDS and calls fyi.opensocial.requestJoin. Admitted immediately when the group is open; queued for its moderators when it takes requests.
- social.grain.group.leaveGroup procedure Leave a group: fyi.opensocial.leaveGroup on its host, with service auth from the viewer's PDS.
- social.grain.group.listFeed query Every gallery in every pool the viewer is a member of, newest first. Assembled per viewer at request time: which groups they belong to is a public fact in the index, but what is in each pool is a permissioned space, read with a credential that group's host issues. Nothing here is shared between viewers or cached.
- social.grain.group.listGalleries query Every gallery in a group's pool, newest first. Assembled at request time from the repos of the members who wrote them — a pool space never reaches a firehose, so none of it is in the index — and readable only by a member the group's host issues a credential to.
- social.grain.group.listGroups query Groups worth browsing, most recently active first. With `gallery`, each group carries the viewer's standing for that gallery.
- social.grain.group.putFavorite procedure Favourite, or unfavourite, a gallery in a group's pool. The record is the viewer's own, written into the pool rather than their public repo: in the public repo it would name a private gallery to the whole network.
- social.grain.group.submission record A member offering one of their own galleries to a group's pool. Lives in the member's repo; the group answers with a social.grain.group.item.
- social.grain.moderation.defs defs A com.atproto.moderation.createReport reasonType: content that infringes on copyright or intellectual property. grain files it under its copyright label.
- social.grain.moderation.describeLabels query The labels this server gives out and what each means, as an app.bsky.labeler.service record's policies say for a Bluesky labeler. Anyone may ask.
- social.grain.notification.defs defs
- social.grain.notification.getUnreadCount query Count the viewer's notifications since they were last seen, as app.bsky.notification.getUnreadCount does. Requires auth.
- social.grain.notification.listNotifications query Get the authenticated user's notifications, the latest first, as app.bsky.notification.listNotifications does. Requires auth.
- social.grain.notification.registerPush procedure Register a device's push token for the viewer, as app.bsky.notification.registerPush does. Requires auth.
- social.grain.notification.unregisterPush procedure Stop sending pushes to a device token, as app.bsky.notification.unregisterPush does. Requires auth.
- social.grain.notification.updateSeen procedure Mark the viewer's notifications seen up to a time, as app.bsky.notification.updateSeen does. getUnreadCount counts from it. Requires auth.
- social.grain.photo.defs defs Metadata about the photo's relationship with the subject content. Only has meaningful content when photo is attached to a gallery.
- social.grain.photo.exif record Basic EXIF metadata for a photo. Integers are scaled by 1000000 to accommodate decimal values and potentially other tags in the future.
- social.grain.repo.applyWrites procedure Make several writes in the logged-in account's repo at once, as com.atproto.repo.applyWrites makes them at its PDS, and index them before answering. Called as social.grain.repo.createRecord is.
- social.grain.repo.createRecord procedure Create a record in the logged-in account's repo, at its PDS, and index it before answering. For the web, by its session cookie, from a page of the site; a service token is refused (the apps write to their own PDS, then call social.grain.sync.refreshRecords).
- social.grain.repo.defs defs A record written, as its PDS answered.
- social.grain.repo.deleteRecord procedure Delete a record from the logged-in account's repo, at its PDS, and from the index before answering. Called as social.grain.repo.createRecord is.
- social.grain.repo.putRecord procedure Write a record in the logged-in account's repo, creating or replacing it, at its PDS, and index it before answering. Called as social.grain.repo.createRecord is.
- social.grain.repo.uploadBlob procedure Upload a blob to the logged-in account's PDS, for a record written after to reference. Called as social.grain.repo.createRecord is.
- social.grain.server.defs defs
- social.grain.server.deleteAccount procedure Deletes every grain record from the asking account, then has grain forget it.
- social.grain.server.getAccountDeletionPlan query Plan the next part of deleting the viewer's grain data, for an app to delete at the viewer's own PDS: the deletes of one com.atproto.repo.applyWrites, of the viewer's records in every social.grain.* collection their PDS lists, read from the PDS rather than grain's index, so that records grain never indexed go too. Collections go in the order social.grain.server.deleteAccount deletes them, what hangs off a gallery before the gallery and the profile last, and one is exhausted before the next begin
- social.grain.server.getSitemap query One page of the public profiles or galleries a search engine may index, for the sitemap. Leaves out anything labeled, taken down, or in a space.
- social.grain.server.getSpaceSupport query Whether the viewer's PDS serves permissioned spaces (proposal 0016). Answered from a cached probe of community.lexicon.service.describe.
- social.grain.story.defs defs Metadata about the requesting account's relationship with the story.
- social.grain.story.getArchive query Get all stories for an actor, including expired ones. For archive browsing.
- social.grain.story.getAuthors query Get authors who have active stories (posted within the last 24 hours).
- social.grain.story.getStories query Get a user's active stories (posted within the last 24 hours).
- social.grain.story.getStory query Get one story, by its URI.
- social.grain.story.markViewed procedure Record that the requesting account has watched these stories. Viewed state is private to the viewer and held by the appview, not written to the repo, so it follows the account across web, iOS and Android without being visible to anyone else.
- social.grain.sync.indexRecords procedure Deprecated: use social.grain.sync.refreshRecords, which this is answered from, in its own shape, for apps built before it. Index records the caller has just written to their own PDS, without waiting for the firehose. The server reads each one back from the caller's PDS, proved, before answering, so a read after this sees the write. Requires service auth; every URI must name the caller's repo.
- social.grain.sync.refreshRecords procedure Read records of the caller's own again from their own PDS, proved (com.atproto.sync.getRecord: the commit signed by the account's key, the record reached from the tree it signed), and keep each, or its absence, at that commit's revision wherever the index keeps its collection: what a client just wrote or deleted shows at once, rather than when the network brings it, and the network's copy of the same revision or an older one changes nothing. A record of a collection grain does not index, or that
- social.grain.unspecced.addSpaceMember procedure Share an existing private gallery with another account. Adds them to the space's member list on the author's PDS, which is what the authority consults when it mints a credential.
- social.grain.unspecced.createGroup procedure Start a group on Grain's group host. The host creates the group with the viewer as its founder and hands Grain its own session on it (fyi.opensocial.provisionGroup); Grain then gives the group its pool and its Grain profile. The viewer never leaves Grain.
- social.grain.unspecced.createPoolComment procedure Comment on a gallery in a group's pool. The comment is the viewer's own record, written into the pool beside the gallery it answers, so only that group's members can read it.
- social.grain.unspecced.createPoolGallery procedure Add a gallery to a group's pool: one permissioned space (social.grain.group) anchored on the group, holding every member's galleries. The gallery, its photos and its items are the author's own records in their own repo, written inside that space — so only the group's members can read them, and they leave with the author.
- social.grain.unspecced.createPrivateGallery procedure Create a gallery that lives in a permissioned space (proposal 0016) rather than in the public repo. The gallery, its photos and its items are written to the author's space repo, and only the accounts named in members can read them.
- social.grain.unspecced.deleteAccount procedure Delete the authenticated user's Grain account. Removes all of their Grain records from their PDS and clears supporting server-side state (mutes, preferences, push tokens, OAuth session). Reports and labels are preserved.
- social.grain.unspecced.deleteGallery procedure Delete a gallery and all associated records (items, photos, EXIF, favorites, comments).
- social.grain.unspecced.deletePoolComment procedure Delete one of your own comments from a group's pool.
- social.grain.unspecced.deletePoolGallery procedure Withdraw the viewer's own gallery from a group's pool. The gallery, its photos and the items joining them are the viewer's records in the viewer's repo, held inside the group's space, so this removes them from that space and nothing else. Only the author's own repo is touched: whoever acts as the group evicts by a different route.
- social.grain.unspecced.getActorFavorites query Get galleries favorited by the authenticated actor. Only the actor themselves can view their favorites.
- social.grain.unspecced.getActorProfile query Get an actor's profile with gallery stats and follow relationships.
- social.grain.unspecced.getBlocks query Get the viewer's blocked users.
- social.grain.unspecced.getCameras query Get top cameras by photo count.
- social.grain.unspecced.getCommentThread query Get comments for a subject (gallery or story), sorted oldest-first with author profiles.
- social.grain.unspecced.getFollowers query Get followers for a given user.
- social.grain.unspecced.getFollowing query Get users that a given user follows.
- social.grain.unspecced.getGallery query Get a single gallery view by AT URI.
- social.grain.unspecced.getGalleryFavorites query Get the accounts that have favorited a gallery, most recent first.
- social.grain.unspecced.getGroup query A group: a group DID that has declared itself and shows up in Grain as an author whose pool is other people's galleries.
- social.grain.unspecced.getGroupHost query The group host this Grain creates groups on, and the domain a new group's handle ends in. Absent when this Grain creates none.
- social.grain.unspecced.getGroupSubmissions query Submissions to a group that no item has answered yet — the review queue.
- social.grain.unspecced.getKnownFollowers query Get followers of a given actor that the viewer also follows.
- social.grain.unspecced.getLocations query not from the namespace authority Get top locations by gallery count.
- social.grain.unspecced.getMutes query Get the viewer's muted users.
- social.grain.unspecced.getNotifications query Get notifications for the authenticated user.
- social.grain.unspecced.getPoolGallery query One gallery from a group's pool, read from the repo that holds it through a credential the group's host issues.
- social.grain.unspecced.getPrivateGallery query Assemble a gallery that lives in a permissioned space. Read from the repos that hold it at request time — space records never reach a firehose, so none of this is in the index.
- social.grain.unspecced.getSitemap query One page of the public profiles or galleries a search engine may index, for the sitemap. Leaves out anything labeled, taken down, or in a space.
- social.grain.unspecced.getSpaceMembers query Who a private gallery is shared with. Read from the space's authority, which is the only place the member list exists, so only the gallery's author can ask.
- social.grain.unspecced.getSpaceSupport query Whether the viewer's PDS serves permissioned spaces (proposal 0016). Answered from a cached probe of community.lexicon.service.describe.
- social.grain.unspecced.getStories query Get a user's active stories (posted within the last 24 hours).
- social.grain.unspecced.getStory query
- social.grain.unspecced.getStoryArchive query Get all stories for an actor, including expired ones. For archive browsing.
- social.grain.unspecced.getStoryAuthors query Get authors who have active stories (posted within the last 24 hours).
- social.grain.unspecced.getSuggestedFollows query Get suggested profiles to follow based on bsky follow graph.
- social.grain.unspecced.joinGroup procedure Ask a group's group host to admit the viewer: Grain mints service auth for the host from the viewer's PDS and calls fyi.opensocial.requestJoin. Admitted immediately when the group is open; queued for its moderators when it takes requests.
- social.grain.unspecced.leaveGroup procedure Leave a group: fyi.opensocial.leaveGroup on its host, with service auth from the viewer's PDS.
- social.grain.unspecced.listGroups query Groups worth browsing, most recently active first. With `gallery`, each group carries the viewer's standing for that gallery.
- social.grain.unspecced.listPoolFeed query Every gallery in every pool the viewer is a member of, newest first. Assembled per viewer at request time: which groups they belong to is a public fact in the index, but what is in each pool is a permissioned space, read with a credential that group's host issues. Nothing here is shared between viewers or cached.
- social.grain.unspecced.listPoolGalleries query Every gallery in a group's pool, newest first. Assembled at request time from the repos of the members who wrote them — a pool space never reaches a firehose, so none of it is in the index — and readable only by a member the group's host issues a credential to.
- social.grain.unspecced.listPrivateGalleries query The viewer's own private galleries, read from the spaces their PDS holds. Authors only: a space tells its members nothing about itself, so an account added to someone else's gallery cannot enumerate it and needs the link.
- social.grain.unspecced.listSharedGalleries query Private galleries other accounts have shared with the viewer. Answered from grain's own record of who a gallery was shared with, because a space leaves no trace on a member's PDS — then confirmed against the authority, so a gallery the viewer was removed from does not appear.
- social.grain.unspecced.markStoriesViewed procedure Record that the requesting account has watched these stories. Viewed state is private to the viewer and held by the appview, not written to the repo, so it follows the account across web, iOS and Android without being visible to anyone else.
- social.grain.unspecced.putPoolFavorite procedure Favourite, or unfavourite, a gallery in a group's pool. The record is the viewer's own, written into the pool rather than their public repo: in the public repo it would name a private gallery to the whole network.
- social.grain.unspecced.searchActorsTypeahead query Typeahead search for actors, merging bsky and grain profiles.
- social.grain.unspecced.searchGalleries query Full-text search for galleries, returning full gallery views.
- social.grain.unspecced.searchProfiles query Full-text search for user profiles.