> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.sevalla.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This is the Sevalla REST API reference. Base URL: https://api.sevalla.com/v3. Authenticate with an API key in the Authorization header as a Bearer token.
> The OpenAPI spec is at https://api.sevalla.com/v3/openapi.json. Concepts and dashboard guides are at https://docs.sevalla.com (index: https://docs.sevalla.com/llms.txt).
> To act on a Sevalla account from an AI agent, prefer the Sevalla MCP server (https://mcp.sevalla.com/mcp, see https://docs.sevalla.com/ai-agents/overview.md) or the Sevalla CLI (https://api-docs.sevalla.com/v3/cli.md).

# List external database backups

> Retrieve the external backups of a database across all of its backup targets. External backups are dump files stored in the backup target buckets; the bucket content is the source of truth, so this endpoint lists the buckets live. Databases without backup targets return an empty list. A target whose bucket cannot be listed, for example because its credentials were revoked, is skipped. Databases that do not support external backups return a 400.



## OpenAPI

````yaml https://api.sevalla.com/v3/openapi.json get /databases/{id}/external-backups
openapi: 3.1.0
info:
  title: Sevalla API docs
  version: 1.0.0
servers:
  - url: https://api.sevalla.com/v3
security:
  - bearerAuth: []
paths:
  /databases/{id}/external-backups:
    get:
      tags:
        - Databases
      summary: List external database backups
      description: >-
        Retrieve the external backups of a database across all of its backup
        targets. External backups are dump files stored in the backup target
        buckets; the bucket content is the source of truth, so this endpoint
        lists the buckets live. Databases without backup targets return an empty
        list. A target whose bucket cannot be listed, for example because its
        credentials were revoked, is skipped. Databases that do not support
        external backups return a 400.
      operationId: listDatabaseExternalBackupsV3
      parameters:
        - schema:
            type: string
            enum:
              - automatic
              - manual
          in: query
          name: type
          required: false
          description: >-
            Filter backups by type. `automatic` matches scheduled backups,
            `manual` matches user-created backups. When omitted, both are
            returned.
        - schema:
            example: fb5e5168-4281-4bec-94c5-0d1584e9e657
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: path
          name: id
          required: true
          description: Database identifier
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: >-
                        External backup identifier, the dump file name in the
                        backup target bucket
                      example: 20250115-013000_manual_pg17_my-backup.sql.gz
                    display_name:
                      type: string
                      description: >-
                        Human-readable name for the backup. Manual backups use
                        the name given at creation, automatic backups use the
                        backup target name.
                      example: My Manual Backup
                    type:
                      type: string
                      enum:
                        - automatic
                        - manual
                      description: >-
                        Backup type. `automatic` - created by the backup target
                        schedule, pruned after the target retention days.
                        `manual` - user-created, pruned after the target manual
                        retention days.
                      example: manual
                    format:
                      type: string
                      enum:
                        - sql_dump
                        - rdb_dump
                      description: >-
                        Backup file format. `sql_dump` - gzip-compressed SQL
                        dump (postgresql, mysql, mariadb). `rdb_dump` -
                        gzip-compressed RDB file (redis, valkey).
                      example: sql_dump
                    size_bytes:
                      type: number
                      description: Size of the backup file in bytes
                      example: 4830
                    engine_version:
                      type: string
                      description: Version of the database engine the backup was taken from
                      example: '17'
                    target_id:
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      description: Identifier of the backup target holding this backup
                      example: fb5e5168-4281-4bec-94c5-0d1584e9e657
                    created_at:
                      type: string
                      format: date-time
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      description: >-
                        Timestamp when the backup was created, in ISO 8601
                        format
                      example: '2025-01-30T00:00:00.000Z'
                    expires_at:
                      anyOf:
                        - type: string
                          format: date-time
                          pattern: >-
                            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                        - type: 'null'
                      description: >-
                        Timestamp when the backup expires and gets pruned from
                        the bucket, in ISO 8601 format. Null when the backup is
                        kept forever, which happens for manual backups on a
                        target with manual retention set to 0.
                      example: '2025-02-06T00:00:00.000Z'
                  required:
                    - id
                    - display_name
                    - type
                    - format
                    - size_bytes
                    - engine_version
                    - target_id
                    - created_at
                    - expires_at
                  additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Bad request
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 400
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 401
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: >-
                      This API key is missing the <RESOURCE>:<ACTION>
                      permission. Grant it to the key or use a key that has it.
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 403
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not found
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 404
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 500
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Pass your API key as a Bearer token in the
        Authorization header.

````

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