Laravel Databases (Legacy) API

The Databases (Legacy) API from Laravel — 2 operation(s) for databases (legacy).

OpenAPI Specification

laravel-databases-legacy-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Laravel Cloud Applications Databases (Legacy) API
  version: 0.0.1
servers:
- url: https://cloud.laravel.com/api
security:
- http: []
tags:
- name: Databases (Legacy)
paths:
  /databases:
    get:
      operationId: public.databases.deprecated.index
      description: Use GET /databases/clusters instead.
      summary: List databases
      deprecated: true
      tags:
      - Databases (Legacy)
      parameters:
      - name: filter[type]
        in: query
        schema:
          type: string
      - name: filter[region]
        in: query
        schema:
          type: string
      - name: filter[status]
        in: query
        schema:
          type: string
      - name: include
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - schemas
        explode: false
      responses:
        '200':
          description: Paginated set of `DatabaseResource`
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DatabaseResource'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                      last:
                        type: string
                      prev:
                        type: string
                      next:
                        type: string
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        minimum: 1
                      from:
                        type:
                        - integer
                        - 'null'
                        minimum: 1
                      last_page:
                        type: integer
                        minimum: 1
                      links:
                        type: array
                        description: Generated paginator links.
                        items:
                          type: object
                          properties:
                            url:
                              type:
                              - string
                              - 'null'
                            label:
                              type: string
                            active:
                              type: boolean
                          required:
                          - url
                          - label
                          - active
                      path:
                        type:
                        - string
                        - 'null'
                        description: Base path for paginator generated URLs.
                      per_page:
                        type: integer
                        description: Number of items shown per page.
                        minimum: 0
                      to:
                        type:
                        - integer
                        - 'null'
                        description: Number of the last item in the slice.
                        minimum: 1
                      total:
                        type: integer
                        description: Total number of items being paginated.
                        minimum: 0
                    required:
                    - current_page
                    - from
                    - last_page
                    - links
                    - path
                    - per_page
                    - to
                    - total
                  included:
                    type: array
                    items:
                      $ref: '#/components/schemas/DatabaseSchemaResource'
                required:
                - data
                - links
                - meta
        '401':
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                    examples:
                    - ''
                required:
                - message
        '403':
          $ref: '#/components/responses/AuthorizationException'
    post:
      operationId: public.databases.deprecated.store
      description: Use POST /databases/clusters instead.
      summary: Create database
      deprecated: true
      tags:
      - Databases (Legacy)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreDatabaseRequest'
      responses:
        '201':
          description: '`DatabaseResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DatabaseResource'
                  included:
                    type: array
                    items:
                      $ref: '#/components/schemas/DatabaseSchemaResource'
                required:
                - data
        '401':
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                    examples:
                    - ''
                required:
                - message
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
  /databases/{database}:
    get:
      operationId: public.databases.deprecated.show
      description: Use GET /databases/clusters/{database} instead.
      summary: Get database
      deprecated: true
      tags:
      - Databases (Legacy)
      parameters:
      - name: database
        in: path
        required: true
        description: The database identifier
        schema:
          type:
          - string
          - 'null'
      - name: include
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - schemas
        explode: false
      responses:
        '200':
          description: '`DatabaseResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DatabaseResource'
                  included:
                    type: array
                    items:
                      $ref: '#/components/schemas/DatabaseSchemaResource'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
    patch:
      operationId: public.databases.deprecated.update
      description: Use PATCH /databases/clusters/{database} instead.
      summary: Update database
      deprecated: true
      tags:
      - Databases (Legacy)
      parameters:
      - name: database
        in: path
        required: true
        description: The database identifier
        schema:
          type:
          - string
          - 'null'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDatabaseRequest'
      responses:
        '200':
          description: '`DatabaseResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DatabaseResource'
                  included:
                    type: array
                    items:
                      $ref: '#/components/schemas/DatabaseSchemaResource'
                required:
                - data
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
    delete:
      operationId: public.databases.deprecated.destroy
      description: Use DELETE /databases/clusters/{database} instead.
      summary: Delete database
      deprecated: true
      tags:
      - Databases (Legacy)
      parameters:
      - name: database
        in: path
        required: true
        description: The database identifier
        schema:
          type:
          - string
          - 'null'
      responses:
        '204':
          description: No content
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    CloudRegion:
      type: string
      enum:
      - us-east-2
      - us-east-1
      - ca-central-1
      - eu-central-1
      - eu-west-1
      - eu-west-2
      - me-central-1
      - ap-southeast-1
      - ap-southeast-2
      - ap-northeast-1
      title: CloudRegion
    DatabaseResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - databases
        attributes:
          type: object
          properties:
            name:
              type: string
            type:
              $ref: '#/components/schemas/DatabaseType'
            status:
              $ref: '#/components/schemas/DatabaseStatus'
            region:
              $ref: '#/components/schemas/CloudRegion'
            created_at:
              type:
              - string
              - 'null'
              format: date-time
            config:
              description: Configuration object. Fields vary based on database type.
              oneOf:
              - title: Neon Serverless Postgres
                type: object
                description: Configuration for Neon Serverless Postgres databases
                properties:
                  cu_min:
                    type: number
                    description: Minimum compute units for auto-scaling
                    enum:
                    - 0.25
                    - 0.5
                    - 1
                    - 2
                    - 4
                    - 8
                    - 10
                  cu_max:
                    type: number
                    description: Maximum compute units for auto-scaling
                    enum:
                    - 0.25
                    - 0.5
                    - 1
                    - 2
                    - 4
                    - 8
                    - 10
                  suspend_seconds:
                    type: integer
                    description: 'Seconds of inactivity before hibernation (0 = never, otherwise 60–604800) (min: 0, max: 604800)'
                  retention_days:
                    type: integer
                    description: 'Days to retain point-in-time recovery data (min: 0, max: 30)'
                required:
                - cu_min
                - cu_max
                - suspend_seconds
                - retention_days
              - title: Laravel MySQL
                type: object
                description: Configuration for Laravel MySQL databases
                properties:
                  size:
                    type: string
                    description: Instance size for the database cluster
                    enum:
                    - mysql-flex-512mb
                    - mysql-flex-1gb
                    - mysql-flex-2gb
                    - db-flex.m-1vcpu-512mb
                    - db-flex.m-1vcpu-1gb
                    - db-flex.m-1vcpu-2gb
                    - db-flex.m-1vcpu-4gb
                    - db-pro.m-1vcpu-4gb
                    - db-pro.m-2vcpu-8gb
                    - db-pro.m-4vcpu-16gb
                    - db-pro.m-8vcpu-32gb
                    - mysql-pro-4gb
                    - mysql-pro-8gb
                    - mysql-pro-16gb
                    - mysql-pro-32gb
                  storage:
                    type: integer
                    description: 'Storage allocation in gigabytes (min: 5, max: 1000)'
                  is_public:
                    type: boolean
                    description: Whether the database is publicly accessible
                  uses_scheduled_snapshots:
                    type: boolean
                    description: Whether scheduled backups are enabled
                  retention_days:
                    type: integer
                    description: 'Days to retain backup data (min: 0, max: 30)'
                  maintenance_window:
                    type:
                    - string
                    - 'null'
                    description: UTC maintenance window for automated updates
                    examples:
                    - sun:06:00-sun:06:30
                  suspend_seconds:
                    type: integer
                    description: 'Seconds of inactivity before scaling to zero (0 = never). Requires an eligible size and the scale-to-zero feature. (min: 0, max: 3600)'
                required:
                - size
                - storage
                - is_public
                - uses_scheduled_snapshots
                - retention_days
              - title: AWS RDS
                type: object
                description: Configuration for AWS RDS MySQL databases
                properties:
                  size:
                    type: string
                    description: Instance size for the database cluster
                    enum:
                    - db.m8g.large
                    - db.m8g.xlarge
                    - db.m8g.2xlarge
                    - db.m8g.4xlarge
                    - db.m8g.8xlarge
                    - db.m8g.12xlarge
                    - db.m8g.16xlarge
                    - db.m8g.24xlarge
                    - db.m8g.48xlarge
                    - db.m7g.large
                    - db.m7g.xlarge
                    - db.m7g.2xlarge
                    - db.m7g.4xlarge
                    - db.m7g.8xlarge
                    - db.m7g.12xlarge
                    - db.m7g.16xlarge
                    - db.t4g.micro
                    - db.t4g.small
                    - db.t4g.medium
                    - db.t4g.large
                    - db.t4g.xlarge
                    - db.t4g.2xlarge
                    - db.r8g.large
                    - db.r8g.xlarge
                    - db.r8g.2xlarge
                    - db.r8g.4xlarge
                    - db.r8g.8xlarge
                    - db.r8g.12xlarge
                    - db.r8g.16xlarge
                  storage:
                    type: integer
                    description: 'Storage allocation in gigabytes (min: 5, max: 1000)'
                  is_public:
                    type: boolean
                    description: Whether the database is publicly accessible
                  uses_pitr:
                    type: boolean
                    description: Whether point-in-time recovery is enabled
                  retention_days:
                    type: integer
                    description: 'Days to retain backup data (min: 0, max: 30)'
                  maintenance_window:
                    type:
                    - string
                    - 'null'
                    description: UTC maintenance window for automated updates
                    examples:
                    - sun:06:00-sun:06:30
                  deployment_option:
                    type: string
                    description: Deployment configuration (single-az or multi-az)
                    enum:
                    - single-az
                    - single-az-with-read-replicas
                    - multi-az
                  read_replicas:
                    type:
                    - integer
                    - 'null'
                    description: The number of configured read replicas
                required:
                - size
                - storage
                - is_public
                - uses_pitr
                - retention_days
                - deployment_option
              discriminator:
                propertyName: type
                mapping:
                  laravel_mysql_84: '#/components/schemas/LaravelMysqlConfig'
                  laravel_mysql_8: '#/components/schemas/LaravelMysqlConfig'
                  aws_rds_mysql_8: '#/components/schemas/AwsRdsConfig'
                  aws_rds_postgres_18: '#/components/schemas/AwsRdsConfig'
                  neon_serverless_postgres_18: '#/components/schemas/NeonServerlessConfig'
                  neon_serverless_postgres_17: '#/components/schemas/NeonServerlessConfig'
                  neon_serverless_postgres_16: '#/components/schemas/NeonServerlessConfig'
            connection:
              type: object
              properties:
                hostname:
                  type: string
                port:
                  type: integer
                  enum:
                  - 3306
                  - 5432
                protocol:
                  type: string
                  enum:
                  - mysql
                  - postgres
                driver:
                  type: string
                  enum:
                  - mysql
                  - pgsql
                ? ''
                : anyOf:
                  - type: object
                    properties:
                      username:
                        type: string
                      password:
                        type: string
                    required:
                    - username
                    - password
                  - type: array
                    items:
                      type: string
                    minItems: 0
                    maxItems: 0
                    additionalItems: false
              required:
              - hostname
              - port
              - protocol
              - driver
              - null
          required:
          - name
          - type
          - status
          - region
          - created_at
          - config
          - connection
        relationships:
          type: object
          properties:
            schemas:
              type: object
              description: 'TODO: Remove the schemas relationship by March 2026.'
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/DatabaseSchemaResourceIdentifier'
              required:
              - data
            databases:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/DatabaseSchemaResourceIdentifier'
              required:
              - data
      required:
      - id
      - type
      title: DatabaseResource
    DatabaseResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
          - databases
        id:
          type: string
      required:
      - type
      - id
      title: DatabaseResourceIdentifier
    DatabaseType:
      type: string
      enum:
      - laravel_mysql_84
      - laravel_mysql_8
      - aws_rds_mysql_8
      - aws_rds_postgres_18
      - neon_serverless_postgres_18
      - neon_serverless_postgres_17
      - neon_serverless_postgres_16
      title: DatabaseType
    UpdateDatabaseRequest:
      type: object
      properties:
        config:
          description: Configuration object. Fields vary based on database type.
          oneOf:
          - title: Neon Serverless Postgres
            type: object
            description: Configuration for Neon Serverless Postgres databases
            properties:
              cu_min:
                type: number
                description: Minimum compute units for auto-scaling
                enum:
                - 0.25
                - 0.5
                - 1
                - 2
                - 4
                - 8
                - 10
              cu_max:
                type: number
                description: Maximum compute units for auto-scaling
                enum:
                - 0.25
                - 0.5
                - 1
                - 2
                - 4
                - 8
                - 10
              suspend_seconds:
                type: integer
                description: 'Seconds of inactivity before hibernation (0 = never, otherwise 60–604800) (min: 0, max: 604800)'
              retention_days:
                type: integer
                description: 'Days to retain point-in-time recovery data (min: 0, max: 30)'
            required:
            - cu_min
            - cu_max
            - suspend_seconds
            - retention_days
          - title: Laravel MySQL
            type: object
            description: Configuration for Laravel MySQL databases
            properties:
              size:
                type: string
                description: Instance size for the database cluster
                enum:
                - mysql-flex-512mb
                - mysql-flex-1gb
                - mysql-flex-2gb
                - db-flex.m-1vcpu-512mb
                - db-flex.m-1vcpu-1gb
                - db-flex.m-1vcpu-2gb
                - db-flex.m-1vcpu-4gb
                - db-pro.m-1vcpu-4gb
                - db-pro.m-2vcpu-8gb
                - db-pro.m-4vcpu-16gb
                - db-pro.m-8vcpu-32gb
                - mysql-pro-4gb
                - mysql-pro-8gb
                - mysql-pro-16gb
                - mysql-pro-32gb
              storage:
                type: integer
                description: 'Storage allocation in gigabytes (min: 5, max: 1000)'
              is_public:
                type: boolean
                description: Whether the database is publicly accessible
              uses_scheduled_snapshots:
                type: boolean
                description: Whether scheduled backups are enabled
              retention_days:
                type: integer
                description: 'Days to retain backup data (min: 0, max: 30)'
              maintenance_window:
                type:
                - string
                - 'null'
                description: UTC maintenance window for automated updates
                examples:
                - sun:06:00-sun:06:30
              suspend_seconds:
                type: integer
                description: 'Seconds of inactivity before scaling to zero (0 = never). Requires an eligible size and the scale-to-zero feature. (min: 0, max: 3600)'
            required:
            - size
            - storage
            - is_public
            - uses_scheduled_snapshots
            - retention_days
          - title: AWS RDS
            type: object
            description: Configuration for AWS RDS MySQL databases
            properties:
              size:
                type: string
                description: Instance size for the database cluster
                enum:
                - db.m8g.large
                - db.m8g.xlarge
                - db.m8g.2xlarge
                - db.m8g.4xlarge
                - db.m8g.8xlarge
                - db.m8g.12xlarge
                - db.m8g.16xlarge
                - db.m8g.24xlarge
                - db.m8g.48xlarge
                - db.m7g.large
                - db.m7g.xlarge
                - db.m7g.2xlarge
                - db.m7g.4xlarge
                - db.m7g.8xlarge
                - db.m7g.12xlarge
                - db.m7g.16xlarge
                - db.t4g.micro
                - db.t4g.small
                - db.t4g.medium
                - db.t4g.large
                - db.t4g.xlarge
                - db.t4g.2xlarge
                - db.r8g.large
                - db.r8g.xlarge
                - db.r8g.2xlarge
                - db.r8g.4xlarge
                - db.r8g.8xlarge
                - db.r8g.12xlarge
                - db.r8g.16xlarge
              storage:
                type: integer
                description: 'Storage allocation in gigabytes (min: 5, max: 1000)'
              is_public:
                type: boolean
                description: Whether the database is publicly accessible
              uses_pitr:
                type: boolean
                description: Whether point-in-time recovery is enabled
              retention_days:
                type: integer
                description: 'Days to retain backup data (min: 0, max: 30)'
              maintenance_window:
                type:
                - string
                - 'null'
                description: UTC maintenance window for automated updates
                examples:
                - sun:06:00-sun:06:30
              deployment_option:
                type: string
                description: Deployment configuration (single-az or multi-az)
                enum:
                - single-az
                - single-az-with-read-replicas
                - multi-az
              read_replicas:
                type:
                - integer
                - 'null'
                description: The number of configured read replicas
            required:
            - size
            - storage
            - is_public
            - uses_pitr
            - retention_days
            - deployment_option
          discriminator:
            propertyName: type
            mapping:
              laravel_mysql_84: '#/components/schemas/LaravelMysqlConfig'
              laravel_mysql_8: '#/components/schemas/LaravelMysqlConfig'
              aws_rds_mysql_8: '#/components/schemas/AwsRdsConfig'
              aws_rds_postgres_18: '#/components/schemas/AwsRdsConfig'
              neon_serverless_postgres_18: '#/components/schemas/NeonServerlessConfig'
              neon_serverless_postgres_17: '#/components/schemas/NeonServerlessConfig'
              neon_serverless_postgres_16: '#/components/schemas/NeonServerlessConfig'
      required:
      - config
      title: UpdateDatabaseRequest
    DatabaseSchemaResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - databaseSchemas
        attributes:
          type: object
          properties:
            name:
              type: string
            status:
              type: string
            created_at:
              type:
              - string
              - 'null'
              format: date-time
          required:
          - name
          - status
          - created_at
        relationships:
          type: object
          properties:
            database:
              type: object
              properties:
                data:
                  anyOf:
                  - $ref: '#/components/schemas/DatabaseResourceIdentifier'
                  - type: 'null'
              required:
              - data
            environments:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/EnvironmentResourceIdentifier'
              required:
              - data
      required:
      - id
      - type
      title: DatabaseSchemaResource
    DatabaseSchemaResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
          - databaseSchemas
        id:
          type: string
      required:
      - type
      - id
      title: DatabaseSchemaResourceIdentifier
    StoreDatabaseRequest:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/DatabaseType'
        name:
          type: string
          pattern: ^[a-z0-9_-]+$
          minLength: 3
          maxLength: 40
        region:
          $ref: '#/components/schemas/CloudRegion'
        config:
          description: Configuration object. Fields vary based on database type.
          oneOf:
          - title: Neon Serverless Postgres
            type: object
            description: Configuration for Neon Serverless Postgres databases
            properties:
              cu_min:
                type: number
                description: Minimum compute units for auto-scaling
                enum:
                - 0.25
                - 0.5
                - 1
                - 2
                - 4
                - 8
                - 10
              cu_max:
                type: number
                description: Maximum compute units for auto-scaling
                enum:
                - 0.25
                - 0.5
                - 1
                - 2
                - 4
                - 8
                - 10
              suspend_seconds:
                type: integer
                description: 'Seconds of inactivity before hibernation (0 = never, otherwise 60–604800) (min: 0, max: 604800)'
              retention_days:
                type: integer
                description: 'Days to retain point-in-time recovery data (min: 0, max: 30)'
            required:
            - cu_min
            - cu_max
            - suspend_seconds
            - retention_days
          - title: Laravel MySQL
            type: object
            description: Configuration for Laravel MySQL databases
            properties:
              size:
                type: string
                description: Instance size for the database cluster
                enum:
                - mysql-flex-512mb
                - mysql-flex-1gb
                - mysql-flex-2gb
                - db-flex.m-1vcpu-512mb
                - db-flex.m-1vcpu-1gb
                - db-flex.m-1vcpu-2gb
                - db-flex.m-1vcpu-4gb
                - db-pro.m-1vcpu-4gb
                - db-pro.m-2vcpu-8gb
                - db-pro.m-4vcpu-16gb
                - db-pro.m-8vcpu-32gb
                - mysql-pro-4gb
                - mysql-pro-8gb
                - mysql-pro-16gb
                - mysql-pro-32gb
              storage:
                type: integer
                description: 'Storage allocation in gigabytes (min: 5, max: 1000)'
              is_public:
                type: boolean
                description: Whether the database is publicly accessible
              uses_scheduled_snapshots:
                type: boolean
                description: Whether scheduled backups are enabled
              retention_days:
                type: integer
                description: 'Days to retain backup data (min: 0, max: 30)'
              maintenance_window:
                type:
                - string
                - 'null'
                description: UTC maintenance window for automated updates
                examples:
                - sun:06:00-sun:06:30
              suspend_seconds:
                type: integer
                description: 'Seconds of inactivity before scaling to zero (0 = never). Requires an eligible size and the scale-to-zero feature. (min: 0, max: 3600)'
            required:
            - size
            - storage
            - is_public
            - uses_scheduled_snapshots
            - retention_days
          - title: AWS RDS
            type: object
            description: Configuration for AWS RDS MySQL databases
            properties:
              size:
                type: string
                description: Instance size for the database cluster
                enum:
                - db.m8g.large
                - db.m8g.xlarge
                - db.m8g.2xlarge
                - db.m8g.4xlarge
                - db.m8g.8xlarge
                - db.m8g.12xlarge
                - db.m8g.16xlarge
                - db.m8g.24xlarge
                - db.m8g.48xlarge
                - db.m7g.large
                - db.m7g.xlarge
                - db.m7g.2xlarge
                - db.m7g.4xlarge
                - db.m7g.8xlarge
                - db.m7g.

# --- truncated at 32 KB (36 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/laravel/refs/heads/main/openapi/laravel-databases-legacy-api-openapi.yml