List a piece's versions (keyset-paginated)
GET/pieces/:pieceId/versions
Returns one page of the piece's versions, newest first, in the uniform list envelope { data, pagination }. Each has a name to say to the person and a version number to go back to with POST /pieces/{pieceId}/versions/{version}/restore. Keep paginating while pagination.nextCursor is non-null, passing it back verbatim as ?cursor=.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 422
- 429
OK. One keyset-paginated page of versions.
Bad Request. The cursor query parameter is not a valid opaque keyset cursor (INVALID_CURSOR).
Unauthorized. Missing, malformed, unknown, revoked, or expired bearer token — or the token owner no longer holds the required entitlement (ENTITLEMENT_LOST). A uniform problem body is returned with a distinct code; no owner/condition detail (no-leak).
Forbidden. The key lacks the required scope (API_TOKEN_SCOPE_DENIED), or the account's plan does not include drafts (BETA_ACCESS_REQUIRED).
Not Found. No piece of this account has that id (PIECE_NOT_FOUND).
Unprocessable Content. A query parameter failed field validation (e.g. a non-string shape); the offending fields are enumerated in errors[].
Too Many Requests. The per-token sliding window of 200 requests/minute was exceeded. The body is express-rate-limit's DEFAULT plain-text message (NOT the JSON problem+json envelope).
Response Headers
IETF draft-7 rate-limit policy/state (limit, remaining, reset).
Seconds to wait before retrying.