---
title: "Rolls back a row to a specific version."
method: POST
path: "/datatables/{tableId}/rows/{rowId}/rollback"
tags: ["DataTables"]
---

# Rolls back a row to a specific version.

`POST /datatables/{tableId}/rows/{rowId}/rollback`

## Request

- Base URL: `https://api.reveldigital.com`
- URL: `https://api.reveldigital.com/datatables/{tableId}/rows/{rowId}/rollback`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://id.reveldigital.com/connect/authorize`
    - Token URL: `https://id.reveldigital.com/connect/token` scopes: `webapi`
  - API key in header `X-RevelDigital-ApiKey`
  - API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/docs/datatables/:tableId/rows/:rowId/rollback/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `tableId` string, required
- `rowId` string, required

## Request body

- RollbackRequest
  - `version` integer, required

## Response `200`

OK

- RollbackResponse
  - `success` boolean
  - `newVersion` integer
  - `restoredRow` DataTableRowModel
    - `id` string, nullable
    - `sortOrder` integer
    - `data` object, nullable: Stored row data as a JSON object keyed by column `key`. Values follow each column's `ColumnType` rules: STRING/RICHTEXT/HIDDEN/SELECT/URL/DATE/TIME are JSON strings, NUMBER is a JSON number, BOOLEAN is JSON true/false, and MEDIA is always a normalized object `{ url, thumbnailUrl, name, mimeType, mediaId? }` (id and id-object input forms are expanded server-side at write time).
    - `updatedAt` string, date-time
    - `eTag` string, nullable: Optimistic concurrency token. To ensure the row hasn't changed since you read it, send this value back as the `If-Match` request header on the REST `updateDataTableRow` (HTTP `PUT`) call, or as the `eTag` input field on the GraphQL `updateDataTableRow` mutation. A stale token results in `409 Conflict` (REST) or a mutation error (GraphQL). Note: the REST endpoint does not read an `eTag` body property — it uses the `If-Match` header.
  - `error` string, nullable

## Other responses

- `400`: Bad Request
- `404`: Not Found

---

[API](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api.md) - [All operations](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reveldigital/apis/revel-digital-rest-api/revisions/39d5c8302822?raw)
