Sevalla Databases API

Provision and manage managed databases.

OpenAPI Specification

sevalla-databases-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Sevalla Applications Databases API
  description: The Sevalla API lets you deploy, scale, and manage your entire cloud infrastructure programmatically - applications, deployments, managed databases, static sites, S3-compatible object storage, pipelines, and operational metrics. Sevalla is a Kinsta product built on Google Cloud Platform and Cloudflare. A single API token authenticates every endpoint.
  termsOfService: https://sevalla.com/legal/terms-of-service/
  contact:
    name: Sevalla Support
    url: https://sevalla.com/contact/
  version: v3
servers:
- url: https://api.sevalla.com/v3
  description: Production
security:
- bearerAuth: []
tags:
- name: Databases
  description: Provision and manage managed databases.
paths:
  /databases:
    get:
      operationId: listDatabases
      tags:
      - Databases
      summary: List databases
      parameters:
      - $ref: '#/components/parameters/CompanyId'
      responses:
        '200':
          description: A list of databases.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatabaseList'
    post:
      operationId: createDatabase
      tags:
      - Databases
      summary: Create a database
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDatabaseRequest'
      responses:
        '201':
          description: The created database.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Database'
  /databases/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: getDatabase
      tags:
      - Databases
      summary: Get database details
      responses:
        '200':
          description: The database.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Database'
    delete:
      operationId: deleteDatabase
      tags:
      - Databases
      summary: Delete a database
      responses:
        '204':
          description: The database was deleted.
  /databases/{id}/backups:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      operationId: listBackups
      tags:
      - Databases
      summary: List database backups
      responses:
        '200':
          description: A list of backups.
          content:
            application/json:
              schema:
                type: object
                properties:
                  backups:
                    type: array
                    items:
                      $ref: '#/components/schemas/Backup'
    post:
      operationId: createBackup
      tags:
      - Databases
      summary: Create a database backup
      responses:
        '201':
          description: The created backup.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Backup'
components:
  schemas:
    CreateDatabaseRequest:
      type: object
      required:
      - name
      - type
      - resource_type
      properties:
        name:
          type: string
        type:
          type: string
          enum:
          - postgresql
          - mysql
          - mariadb
          - mongodb
          - redis
          - valkey
        version:
          type: string
        resource_type:
          type: string
        cluster:
          type: string
    Backup:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - scheduled
          - manual
        status:
          type: string
        size_bytes:
          type: integer
          format: int64
        created_at:
          type: string
          format: date-time
    DatabaseList:
      type: object
      properties:
        databases:
          type: array
          items:
            $ref: '#/components/schemas/Database'
        total_count:
          type: integer
    Database:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        display_name:
          type: string
        type:
          type: string
          enum:
          - postgresql
          - mysql
          - mariadb
          - mongodb
          - redis
          - valkey
        version:
          type: string
        status:
          type: string
          enum:
          - active
          - suspended
          - provisioning
          - failed
        resource_type:
          type: string
          description: Database pod resource tier.
        cluster:
          type: string
        created_at:
          type: string
          format: date-time
  parameters:
    CompanyId:
      name: company
      in: query
      required: false
      description: The company (organization) identifier to scope the request.
      schema:
        type: string
    ResourceId:
      name: id
      in: path
      required: true
      description: The unique identifier of the resource.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: apiToken
      description: Provide your Sevalla API token as a bearer token in the Authorization header. Create a token from the Sevalla dashboard; one token authenticates every endpoint.