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

# List database versions

> Lists the version labels available for each database type. No API token is needed. `GET /v1/me` also returns the versions with their `value`s, which you use when creating a database.



## OpenAPI

````yaml /spec/dbaas.yaml get /v1/databases/versions
openapi: 3.0.1
info:
  title: Databases
  version: 1.0.0
  description: >
    Create managed databases, connect to them, change their plans and

    settings, back them up and restore them, and read their metrics and

    events.


    Supported types: `mysql`, `mariadb`, `postgres`, `mongodb`, `redis`,

    `mssql`, `elasticsearch`, `rabbitmq` and `clickhouse`. Databases are

    created in one of your private networks (see Networks in Apps &

    Deployments).


    ## Connecting


    `GET /v1/databases/{databaseID}` returns the connection details:


    - **From apps in the same network:** `hostname` and `internalPort`.

    - **Over the public network** (if `publicNetwork` is on):
    `network.node.host`
      and `port`.
    - **Credentials:** `username` and `root_password`.


    ## Team permissions


    With `teamID`, each endpoint needs one of the database permissions it

    lists (`view`, `operate` or `manage`). A permission from your role or a

    resource permission on that database both count.
servers:
  - url: https://api.liara.ir
security:
  - bearerAuth: []
tags:
  - name: Databases
    description: Create, list, inspect and delete databases.
  - name: Configuration
    description: Plans, scaling, settings, public network, password and control panel.
  - name: Backups
    description: Back up databases, download backups and import backup files.
  - name: Metrics & Events
    description: >-
      Resource usage, lifecycle events and the progress of background
      operations.
paths:
  /v1/databases/versions:
    get:
      tags:
        - Databases
      summary: List database versions
      description: >-
        Lists the version labels available for each database type. No API token
        is needed. `GET /v1/me` also returns the versions with their `value`s,
        which you use when creating a database.
      operationId: listDatabaseVersions
      responses:
        '200':
          description: Versions by type.
          content:
            application/json:
              schema:
                type: object
                properties:
                  databases:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          $ref: '#/components/schemas/DatabaseType'
                        labels:
                          type: array
                          items:
                            type: string
              example:
                databases:
                  - name: mysql
                    labels:
                      - '9.0'
                      - '8.0'
                      - '5.7'
      security: []
components:
  schemas:
    DatabaseType:
      type: string
      enum:
        - mysql
        - mariadb
        - postgres
        - mongodb
        - redis
        - mssql
        - elasticsearch
        - rabbitmq
        - clickhouse
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your API token as `Authorization: Bearer <api-token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.