Skip to main content
Fetch Drafts
Requires the entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.
Returns a paginated list of draft entities belonging to the authenticated user. Drafts are invisible to all other users and excluded from all other entity list endpoints until published. Authentication required.

Query Parameters

number
default:"1"
Page number (1-indexed). A whole number of at least 1 — 0, a negative number or a non-integer value returns 400 entity/invalid-query.
number
default:"10"
Number of drafts per page. A whole number of at least 1 — 0, a negative number or a non-integer value returns 400 entity/invalid-query. Maximum 100 — larger values are treated as 100.
string
Only drafts with this exact sourceId. none returns drafts with no source. Left out, or sent empty, drafts from any source (or none) are returned. null and undefined are refused with 400 entity/unsupported-param (see Saying “no value”).
string
Only drafts in this space. none returns drafts in no space. Left out, or sent empty, drafts in any space or in none are returned. null and undefined are refused with 400 entity/unsupported-param (see Saying “no value”).
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 (null when the viewer can’t see that space; see Space visibility)
  • files — uploaded file/image attachments
  • grants — the reputation-grant summary for the entity
Values are case-insensitive. Drafts have no comments and aren’t saved, so topComments and saved aren’t accepted here: any other value returns 400 entity/invalid-query.
string
Service key only, and required with one: the user this request acts as, whose drafts are listed. A user token always acts as its own user and must not send it (400 entity/acting-user-not-allowed).

Response

Returns a paginated response:
Each item is an Entity with isDraft: true. Results are ordered by most recently updated.

Error Responses

Returned when page or limit is below 1 or not a whole number, or include contains a value that isn’t accepted here.
null or undefined as the value of sourceId or spaceId. The error names the spelling to use instead; for spaceId it reads Use `spaceId=none` for drafts in no space, or leave it out for any space.
Returned when no user is authenticated.
A service key sent no actingUserId.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.
The request sent userId. On this route the user a service key acts as is actingUserId.With a service key:
With a user token, or with no credentials: