Version History

Get Version History

Changed on

This endpoint returns a list of version history snapshots for the room. The versions are returned sorted by creation date, from newest to oldest. Corresponds to liveblocks.getVersionHistory.

get/rooms/{roomId}/versions

Request

  • Base URL: https://api.liveblocks.io/v2
  • URL: https://api.liveblocks.io/v2/rooms/{roomId}/versions
  • Auth: none declared

Path parameters

roomIdstring required

ID of the room

Example:my-room-id

Query parameters

limitinteger

A limit on the number of versions to be returned. The limit can range between 1 and 100, and defaults to 20.

Example:20
cursorstring

A cursor used for pagination. Get the value from the nextCursor response of the previous page.

Example:eyJjcmVhdGVkQXQiOjE2NjAwMDA5ODgxMzd9

Response

Success. Returns the list of version history snapshots and the next page cursor.

nextCursorstring nullable required

Cursor for pagination to get the next page of results

Example response

{
  "data": [
    {
      "id": "vh_abc123",
      "createdAt": "2024-10-15T10:30:00.000Z",
      "authors": [
        {
          "id": "user-123"
        }
      ]
    }
  ],
  "nextCursor": "eyJjcmVhdGVkQXQiOiIyMDI0LTEwLTE1VDEwOjMwOjAwLjAwMFoifQ=="
}

Changes

    • info

      api tag Version History added

    • info

      api tag Yjs removed

    • breaking

      removed the required property // from the response with the status

    • breaking

      removed the required property // from the response with the status

    • info

      api operation id get-yjs-versions removed and replaced with get-version-history

    • info

      the response property // became required for the status