Skip to main content
GET
/
api
/
public
/
v2
/
tables
/
{table_id}
/
sheets
/
{sheet_id}
/
versions
List Table Sheet Versions
curl --request GET \
  --url https://api.promptlayer.com/api/public/v2/tables/{table_id}/sheets/{sheet_id}/versions \
  --header 'X-API-KEY: <api-key>'
{
  "success": true,
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sheet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "version_number": 123,
      "name": "<string>",
      "created_by": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "metadata": {},
      "deltas": [
        {}
      ],
      "snapshot": {},
      "score": {},
      "score_configuration": {}
    }
  ],
  "pagination": {
    "next_cursor": "<string>",
    "prev_cursor": "<string>",
    "has_more": true,
    "limit": 123
  },
  "filters": {},
  "count": 123
}
List saved versions for a Table sheet using cursor pagination. Results are sorted by version_number; use order=asc or order=desc to control direction. The response includes version summaries and related metadata in data. Pagination metadata is returned in pagination, including next_cursor, has_more, and limit. Treat next_cursor as opaque. It includes the current sort, order, cursor value, and a hash of the active filters. Reuse a cursor only with the same sort, order, and filter parameters from the request that produced it; changing any of those while passing an old cursor returns an invalid cursor error.

Authorizations

X-API-KEY
string
header
required

Headers

X-API-KEY
string
required

Your PromptLayer API key. The key's workspace scopes table resources for this request.

Path Parameters

table_id
string<uuid>
required

Table ID.

sheet_id
string<uuid>
required

Table sheet ID.

Query Parameters

cursor
string

Cursor returned from the previous page. Public table cursors encode the current sort, order, cursor value, and a hash of the active filters; reuse the cursor with the same sort, order, and filter parameters from the previous request.

limit
integer
default:20

Number of versions to return.

Required range: 1 <= x <= 100
sort
enum<string>
default:version_number

Sort field. Currently supports version_number.

Available options:
version_number
order
enum<string>
default:desc

Sort order.

Available options:
asc,
desc

Response

Successful response

success
boolean
required
data
TableSheetVersion · object[]
required

Items returned on this page.

pagination
PublicListPagination · object
required

Cursor pagination metadata for public table list endpoints. Cursors are opaque and include the active sort, order, cursor value, and a hash of the active filter set.

filters
EmptyPublicFilters · object
required

Filters applied to this page. The cursor includes a hash of this filter set, so changing filters while reusing a cursor returns an invalid cursor error.

count
integer
required

Number of items returned on this page.