cPanel Mysql API

MySQL database operations (Mysql module)

OpenAPI Specification

cpanel-mysql-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: cPanel U DomainInfo Mysql API
  description: 'cPanel UAPI is the modern HTTP API exposed by the cPanel web hosting

    control panel. Endpoints follow the pattern

    `/execute/{Module}/{Function}` and accept parameters as query string

    values. UAPI returns JSON responses and authenticates calls via API

    tokens or Basic Authentication. UAPI runs on the cPanel account ports

    (2083 secure, 2082 unsecure) and Webmail ports (2096 secure, 2095

    unsecure).

    '
  version: '1'
  contact:
    name: cPanel
    url: https://api.docs.cpanel.net/cpanel/introduction/
servers:
- url: https://{hostname}:2083
  description: Secure cPanel account access
  variables:
    hostname:
      default: example.com
      description: The cPanel server hostname.
- url: https://{hostname}:2096
  description: Secure Webmail session
  variables:
    hostname:
      default: example.com
security:
- BearerAuth: []
- BasicAuth: []
tags:
- name: Mysql
  description: MySQL database operations (Mysql module)
paths:
  /execute/Mysql/list_databases:
    get:
      tags:
      - Mysql
      summary: List MySQL databases
      operationId: mysqlListDatabases
      responses:
        '200':
          description: List of MySQL databases.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UapiResponse'
components:
  schemas:
    UapiResponse:
      type: object
      properties:
        status:
          type: integer
          description: 1 on success, 0 on failure.
        data:
          description: Function-specific response payload.
        errors:
          type: array
          items:
            type: string
        messages:
          type: array
          items:
            type: string
        warnings:
          type: array
          items:
            type: string
        metadata:
          type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: cPanel API Token
      description: 'Provide a cPanel API token using

        `Authorization: cpanel <username>:<token>` (cPanel''s documented

        token header format). Standard `Authorization: Bearer` is also

        accepted by some deployments.

        '
    BasicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication with cPanel account credentials.