> ## 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.

# Get database descriptor ID

> Retrieve the database's descriptor ID.



## OpenAPI

````yaml /openapi/cluster-api-v2.json get /databases/{database}/
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}/:
    get:
      summary: Get database descriptor ID
      description: Retrieve the database's descriptor ID.
      operationId: databaseDetails
      parameters:
        - description: Name of the database being looked up.
          name: database
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Database details response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/databaseDetailsResponse'
        '404':
          description: Database not found
      x-codeSamples:
        - lang: Shell + Curl
          source: |-
            curl --request GET \
              --url https://localhost/api/v2/databases/%7Bdatabase%7D/
components:
  schemas:
    databaseDetailsResponse:
      type: object
      title: Response for databaseDetails.
      properties:
        descriptor_id:
          description: >-
            An identifier used to uniquely identify this database.

            It can be used to find events pertaining to this database by
            filtering on

            the `target_id` field of events.
          type: integer
          format: int64
          x-go-name: DescriptorID
      x-go-package: github.com/cockroachdb/cockroach/pkg/server

````