Skip to main content
Fetch Entity
Requires the entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.
Returns a single entity by its Sublay UUID. Always returns the entity regardless of moderation status, so the client can display the appropriate moderation state. Drafts are only returned to their author (or with a service/master key).

Path Parameters

string
required
The UUID of the entity to fetch.

Query Parameters

string
Associations to include. Pass it as one comma-separated value (include=user,space) or as repeated params (include=user&include=space). Values:
  • user — the author’s user profile
  • space — the space the entity belongs to
  • topComments — the entity’s best top-level comments, as full Comment objects (see Top comments)
  • saved — whether the authenticated user has saved this entity (requires auth)
  • files — uploaded file/image attachments
  • grants — the reputation-grant summary for the entity
number
default:"1"
With include=topComments: how many top comments per entity. A whole number of at least 1 — 0, a negative number or a non-integer value returns 400 entity/invalid-query. Maximum 5 — larger values are treated as 5.
string
default:"upvote"
With include=topComments: the reaction whose raw count ranks the top comments (ties newest first). One of upvote, downvote, like, love, wow, sad, angry, funny.
include values are case-insensitive. An unknown value returns 400 entity/invalid-query, as does sending topCommentsLimit or topCommentsSortByReaction without include=topComments. topComments lists real content only — deleted, removed and block-edged comments are left out — and is [] when nothing qualifies.

Space-scoped reputation

This endpoint has a space in context, so it accepts the opt-in reputation params. They add a spaceReputation field to the populated author user, alongside the always-present reputation total. Requires the reputation bundle. See the Reputation data model for the full contract.

Response

Returns an Entity object.

Error Responses

Returned with code entity/invalid-query for an unknown include value, when topCommentsLimit is below 1 or not a whole number, or when topCommentsLimit / topCommentsSortByReaction is sent without include=topComments.
include=topComment is rejected with a pointer to its replacement.
Also returned for draft entities when the requester is not the author.