---
title: "Gets a data table definition by ID."
method: GET
path: "/datatables/{tableId}"
tags: ["DataTables"]
---

# Gets a data table definition by ID.

`GET /datatables/{tableId}`

## Request

- Base URL: `https://api.reveldigital.com`
- URL: `https://api.reveldigital.com/datatables/{tableId}`
- 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/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `tableId` string, required

## Response `200`

OK

- DataTableDetail
  - `id` string, nullable
  - `name` string, nullable
  - `description` string, nullable
  - `columns` DataTableColumnModel[], nullable
    - `id` string, nullable
    - `name` string, required
    - `key` string, required
    - `type` 'string' | 'number' | 'boolean' | 'date' | 'select' | 'media' | 'url' | 'richtext' | 'time' | 'hidden', required
    - `required` boolean
    - `sortable` boolean
    - `locked` boolean
    - `options` string[], nullable
    - `default` unknown
  - `groupId` string, nullable
  - `rowCount` integer
  - `cacheTtlSeconds` integer, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `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)
