> ## Documentation Index
> Fetch the complete documentation index at: https://cockroachlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List tables on a database

> List names of all tables in the database. The names of all responses will
be schema-qualified.



## OpenAPI

````yaml /openapi/cluster-api-v2.json get /databases/{database}/tables/
openapi: 3.0.0
info:
  description: >-
    REST API for querying information about CockroachDB cluster health, nodes,
    ranges,

    sessions, and other meta information. For additional details, see
    cockroachlabs.com/docs/stable/cluster-api.
  title: CockroachDB v2 API
  license:
    name: Business Source License
  version: '2.0'
  x-logo:
    url: https://www.cockroachlabs.com/docs/images/cockroachlabs-logo-170.png
    backgroundColor: '#FFFFFF'
    altText: Cockroach Labs logo
servers:
  - url: https://localhost/api/v2
  - url: http://localhost/api/v2
security: []
paths:
  /databases/{database}/tables/:
    get:
      summary: List tables on a database
      description: >-
        List names of all tables in the database. The names of all responses
        will

        be schema-qualified.
      operationId: databaseTables
      parameters:
        - description: Name of the database being looked up.
          name: database
          in: path
          required: true
          schema:
            type: string
        - description: Maximum number of tables to return in this call.
          name: limit
          in: query
          schema:
            type: integer
        - description: Continuation token for results after a past limited run.
          name: offset
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: Database tables response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/databaseTablesResponse'
        '404':
          description: Database not found
      x-codeSamples:
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url 'https://localhost/api/v2/databases/%7Bdatabase%7D/tables/?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE'
components:
  schemas:
    databaseTablesResponse:
      type: object
      title: Response for databaseTables.
      properties:
        next:
          description: >-
            The continuation token, for use in the next paginated call in the
            `offset`

            parameter.
          type: integer
          format: int64
          x-go-name: Next
        table_names:
          description: >-
            The names of all tables in this database. Note that

            all responses will be schema-qualified (schema.table) and that every
            schema

            or table that contains a "sql unsafe character" such as uppercase
            letters

            or dots will be surrounded with double quotes, such as "Naughty
            schema".table.
          type: array
          items:
            type: string
          x-go-name: TableNames
      x-go-package: github.com/cockroachdb/cockroach/pkg/server

````