Aptible Backups API

The Backups API from Aptible — 5 operation(s) for backups.

OpenAPI Specification

aptible-backups-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@aptible.com
  description: REST API for the core Aptible platform.
  title: Aptible API v1 Backups API
  version: v1
servers:
- url: '{baseUrl}'
  variables:
    baseUrl:
      default: https://api.aptible.com
      description: Override for local or test environments
security:
- token: []
tags:
- name: Backups
paths:
  /backups:
    get:
      description: Returns a paginated list of all backups.
      operationId: ListBackups
      parameters:
      - description: Current page of paginated results
        explode: true
        in: query
        name: page
        required: false
        schema:
          type: integer
        style: form
      - description: Number of results to return per page
        explode: true
        in: query
        name: per_page
        required: false
        schema:
          type: integer
        style: form
      - description: wether deleted records should be returned or not
        explode: true
        in: query
        name: with_deleted
        required: false
        schema:
          type: boolean
        style: form
      - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.'
        explode: true
        in: query
        name: no_embed
        required: false
        schema:
          type: boolean
        style: form
      - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.
        explode: false
        in: header
        name: Prefer
        required: false
        schema:
          enum:
          - no_sensitive_extras=true
          type: string
        style: simple
      responses:
        '200':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/ListBackups_200_response'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: list backups
      tags:
      - Backups
  /accounts/{account_id}/backups:
    get:
      description: Returns a paginated list of backups for the specified account.
      operationId: ListBackupsForAccount
      parameters:
      - description: account_id
        explode: false
        in: path
        name: account_id
        required: true
        schema:
          type: integer
        style: simple
      - description: Current page of paginated results
        explode: true
        in: query
        name: page
        required: false
        schema:
          type: integer
        style: form
      - description: Number of results to return per page
        explode: true
        in: query
        name: per_page
        required: false
        schema:
          type: integer
        style: form
      - description: wether deleted records should be returned or not
        explode: true
        in: query
        name: with_deleted
        required: false
        schema:
          type: boolean
        style: form
      - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.'
        explode: true
        in: query
        name: no_embed
        required: false
        schema:
          type: boolean
        style: form
      - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.
        explode: false
        in: header
        name: Prefer
        required: false
        schema:
          enum:
          - no_sensitive_extras=true
          type: string
        style: simple
      responses:
        '200':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/ListBackups_200_response'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: list backups
      tags:
      - Backups
  /databases/{database_id}/backups:
    get:
      description: Returns a paginated list of backups for the specified database.
      operationId: ListBackupsForDatabase
      parameters:
      - description: database_id
        explode: false
        in: path
        name: database_id
        required: true
        schema:
          type: integer
        style: simple
      - description: Current page of paginated results
        explode: true
        in: query
        name: page
        required: false
        schema:
          type: integer
        style: form
      - description: Number of results to return per page
        explode: true
        in: query
        name: per_page
        required: false
        schema:
          type: integer
        style: form
      - description: wether deleted records should be returned or not
        explode: true
        in: query
        name: with_deleted
        required: false
        schema:
          type: boolean
        style: form
      - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.'
        explode: true
        in: query
        name: no_embed
        required: false
        schema:
          type: boolean
        style: form
      - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.
        explode: false
        in: header
        name: Prefer
        required: false
        schema:
          enum:
          - no_sensitive_extras=true
          type: string
        style: simple
      responses:
        '200':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/ListBackups_200_response'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: list backups
      tags:
      - Backups
  /backups/{backup_id}/copies:
    get:
      description: Returns a paginated list of copies for the specified backup.
      operationId: ListCopiesForBackup
      parameters:
      - description: backup_id
        explode: false
        in: path
        name: backup_id
        required: true
        schema:
          type: integer
        style: simple
      - description: Current page of paginated results
        explode: true
        in: query
        name: page
        required: false
        schema:
          type: integer
        style: form
      - description: Number of results to return per page
        explode: true
        in: query
        name: per_page
        required: false
        schema:
          type: integer
        style: form
      - description: wether deleted records should be returned or not
        explode: true
        in: query
        name: with_deleted
        required: false
        schema:
          type: boolean
        style: form
      - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.'
        explode: true
        in: query
        name: no_embed
        required: false
        schema:
          type: boolean
        style: form
      - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.
        explode: false
        in: header
        name: Prefer
        required: false
        schema:
          enum:
          - no_sensitive_extras=true
          type: string
        style: simple
      responses:
        '200':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/ListBackups_200_response'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: list backups
      tags:
      - Backups
  /backups/{id}:
    get:
      description: Returns the details of a specific backup by ID.
      operationId: GetBackup
      parameters:
      - description: id
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: integer
        style: simple
      - description: 'When true, omits embedded resources from the response. Also triggered when the Prefer: no_sensitive_extras=true header is present.'
        explode: true
        in: query
        name: no_embed
        required: false
        schema:
          type: boolean
        style: form
      - description: When set to no_sensitive_extras=true, omits sensitive fields and embedded resources from the response.
        explode: false
        in: header
        name: Prefer
        required: false
        schema:
          enum:
          - no_sensitive_extras=true
          type: string
        style: simple
      responses:
        '200':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/backup'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: show backup
      tags:
      - Backups
components:
  schemas:
    backup__links:
      properties:
        account:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        database:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        copied_from:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        database_image:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        copies:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        operations:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        self:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
      type: object
    ListBackups_200_response:
      properties:
        _embedded:
          $ref: '#/components/schemas/ListBackups_200_response__embedded'
        total_count:
          type: integer
        per_page:
          type: integer
        current_page:
          type: integer
        _links:
          $ref: '#/components/schemas/ListBackups_200_response__links'
      required:
      - _embedded
      - _links
      - current_page
      - per_page
      - total_count
      type: object
    ListBackups_200_response__links:
      properties:
        account:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        database:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        next:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        prev:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        self:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
      type: object
    error:
      properties:
        code:
          type: integer
        error:
          type: string
        message:
          type: string
      required:
      - code
      - error
      - message
      type: object
    ListBackups_200_response__embedded:
      properties:
        backups:
          items:
            $ref: '#/components/schemas/backup'
          type: array
      type: object
    backup__embedded:
      properties:
        copied_from:
          type: object
      type: object
    ListAccountsForStack_200_response__links_stack:
      properties:
        href:
          format: uri
          type: string
      type: object
    backup:
      properties:
        id:
          type: integer
        _type:
          type: string
        aws_snapshot_id:
          type: string
        aws_region:
          type: string
        database_handle:
          type: string
        created_at:
          format: dateTime
          type: string
        updated_at:
          format: dateTime
          type: string
        kms_arn:
          type: string
          x-nullable: true
        size:
          type: integer
          x-nullable: true
        manual:
          type: boolean
          x-nullable: true
        _embedded:
          $ref: '#/components/schemas/backup__embedded'
        _links:
          $ref: '#/components/schemas/backup__links'
      required:
      - _embedded
      - _type
      - aws_region
      - aws_snapshot_id
      - created_at
      - database_handle
      - id
      - kms_arn
      - manual
      - size
      - updated_at
  securitySchemes:
    token:
      in: header
      name: Authorization
      type: apiKey