Aptible Apps API

The Apps API from Aptible — 5 operation(s) for apps.

OpenAPI Specification

aptible-apps-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 Apps API
  version: v1
servers:
- url: '{baseUrl}'
  variables:
    baseUrl:
      default: https://api.aptible.com
      description: Override for local or test environments
security:
- token: []
tags:
- name: Apps
paths:
  /accounts/{account_id}/apps:
    get:
      description: Returns a paginated list of apps belonging to the specified account.
      operationId: ListAppsForAccount
      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: '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/ListAppsForAccount_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 apps
      tags:
      - Apps
    post:
      description: Creates a new app within the specified account.
      operationId: CreateApp
      parameters:
      - description: account_id
        explode: false
        in: path
        name: account_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
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApp_request'
      responses:
        '201':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/app'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: create app
      tags:
      - Apps
  /apps:
    get:
      description: Returns a paginated list of all apps.
      operationId: ListApps
      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: '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/ListAppsForAccount_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 apps
      tags:
      - Apps
  /apps/{id}:
    delete:
      description: Deletes an app by ID.
      operationId: DeleteApp
      parameters:
      - description: id
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: integer
        style: simple
      responses:
        '204':
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: delete app
      tags:
      - Apps
    get:
      description: Returns the details of a specific app by ID.
      operationId: GetApp
      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/app'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: show app
      tags:
      - Apps
    patch:
      description: Partially updates an app's attributes.
      operationId: PatchApp
      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
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateApp_request'
      responses:
        '200':
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: update app
      tags:
      - Apps
    put:
      description: Updates an app's attributes.
      operationId: UpdateApp
      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
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateApp_request'
      responses:
        '200':
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: update app
      tags:
      - Apps
  /certificates/{certificate_id}/apps:
    get:
      description: Returns a paginated list of apps using the specified certificate.
      operationId: ListAppsForCertificate
      parameters:
      - description: certificate_id
        explode: false
        in: path
        name: certificate_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: '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/ListAppsForAccount_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 apps
      tags:
      - Apps
  /find/app:
    get:
      description: Returns the app matching the specified handle.
      operationId: GetAppByHandle
      parameters:
      - description: app handle
        explode: true
        in: query
        name: handle
        required: true
        schema:
          type: string
        style: form
      - description: account handle to disambiguate when multiple apps share the same handle
        explode: true
        in: query
        name: environment
        required: false
        schema:
          type: string
        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/app'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: find app by handle
      tags:
      - Apps
components:
  schemas:
    app__links:
      properties:
        account:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        current_configuration:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        current_image:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        operations:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        images:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        configurations:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        services:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        vhosts:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        ephemeral_sessions:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        service_definitions:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        prerelease_commands:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        code_scan_results:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        last_code_scan_result:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        deployments:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        current_deployment:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        settings:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        current_setting:
          $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
    operation__links:
      properties:
        user:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        resource:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        account:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        destination_account:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        ssh_portal_connections:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        ephemeral_sessions:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        code_scan_result:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        service:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        self:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
      type: object
    operation:
      properties:
        id:
          type: integer
        _type:
          type: string
        type:
          type: string
        status:
          type: string
        cancelled:
          type: boolean
        aborted:
          type: boolean
        git_ref:
          type: string
          x-nullable: true
        docker_ref:
          type: string
          x-nullable: true
        env:
          type: object
          x-nullable: true
        container_size:
          type: integer
          x-nullable: true
        container_count:
          type: integer
          x-nullable: true
        disk_size:
          type: integer
        command:
          type: string
          x-nullable: true
        handle:
          type: string
          x-nullable: true
        created_at:
          format: dateTime
          type: string
        updated_at:
          format: dateTime
          type: string
        certificate:
          type: string
          x-nullable: true
        private_key:
          type: string
          x-nullable: true
        user_name:
          type: string
        user_email:
          type: string
        destination_region:
          type: string
          x-nullable: true
        interactive:
          type: boolean
          x-nullable: true
        instance_profile:
          type: string
          x-nullable: true
        mount_point:
          type: string
          x-nullable: true
        daily:
          type: integer
          x-nullable: true
        monthly:
          type: integer
          x-nullable: true
        yearly:
          type: integer
          x-nullable: true
        pitr_days:
          type: integer
          x-nullable: true
        make_copy:
          type: boolean
          x-nullable: true
        keep_final:
          type: boolean
          x-nullable: true
        enable_backups:
          type: boolean
          x-nullable: true
        enable_pitr:
          type: boolean
          x-nullable: true
        settings:
          type: object
        sensitive_settings:
          type: object
        _links:
          $ref: '#/components/schemas/operation__links'
      required:
      - _type
      - aborted
      - cancelled
      - certificate
      - command
      - container_count
      - container_size
      - created_at
      - daily
      - destination_region
      - disk_size
      - docker_ref
      - enable_backups
      - enable_pitr
      - git_ref
      - handle
      - id
      - instance_profile
      - interactive
      - keep_final
      - make_copy
      - monthly
      - mount_point
      - pitr_days
      - settings
      - status
      - type
      - updated_at
      - user_email
      - user_name
      - yearly
    ListActivityReportsForAccount_200_response__links:
      properties:
        account:
          $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
    app__embedded:
      properties:
        services:
          items:
            $ref: '#/components/schemas/service'
          type: array
        last_operation:
          $ref: '#/components/schemas/operation'
        last_deploy_operation:
          $ref: '#/components/schemas/operation'
        current_image:
          $ref: '#/components/schemas/image'
      type: object
    service__links:
      properties:
        account:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        current_release:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        app:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        database:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        operations:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        releases:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        vhosts:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        settings:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        current_setting:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        self:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
      type: object
    UpdateApp_request:
      properties:
        current_configuration:
          format: uri
          type: string
        current_image:
          format: uri
          type: string
        handle:
          type: string
        status:
          type: string
      type: object
    ListAppsForAccount_200_response__embedded:
      properties:
        apps:
          items:
            $ref: '#/components/schemas/app'
          type: array
      type: object
    app:
      properties:
        id:
          type: integer
        handle:
          type: string
        git_repo:
          type: string
        _type:
          type: string
        created_at:
          format: dateTime
          type: string
        updated_at:
          format: dateTime
          type: string
        status:
          type: string
        deployment_method:
          type: string
          x-nullable: true
        _embedded:
          $ref: '#/components/schemas/app__embedded'
        _links:
          $ref: '#/components/schemas/app__links'
      required:
      - _embedded
      - _type
      - created_at
      - deployment_method
      - git_repo
      - handle
      - id
      - status
      - updated_at
    image__links:
      properties:
        app:
          $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
    image:
      properties:
        id:
          type: integer
        git_repo:
          type: string
          x-nullable: true
        git_ref:
          type: string
          x-nullable: true
        docker_repo:
          type: string
          x-nullable: true
        docker_ref:
          type: string
          x-nullable: true
        dualstack_hint:
          type: integer
          x-nullable: true
        platform:
          type: string
          x-nullable: true
        release:
          type: string
          x-nullable: true
        scan:
          type: string
          x-nullable: true
        exposed_ports:
          items:
            type: integer
          type: array
        _type:
          type: string
        created_at:
          format: dateTime
          type: string
        updated_at:
          format: dateTime
          type: string
        _links:
          $ref: '#/components/schemas/image__links'
      required:
      - _type
      - created_at
      - docker_ref
      - docker_repo
      - dualstack_hint
      - exposed_ports
      - git_ref
      - git_repo
      - id
      - platform
      - release
      - scan
      - updated_at
    service:
      properties:
        id:
          type: integer
        _type:
          type: string
        handle:
          type: string
        docker_repo:
          type: string
          x-nullable: true
        docker_ref:
          type: string
          x-nullable: true
        process_type:
          type: string
        command:
          type: string
        container_count:
          type: integer
        created_at:
          format: dateTime
          type: string
        updated_at:
          format: dateTime
          type: string
        container_memory_limit_mb:
          type: integer
          x-nullable: true
        instance_class:
          type: string
        force_zero_downtime:
          type: boolean
        naive_health_check:
          type: boolean
        restart_free_scaling:
          type: boolean
        stop_timeout:
          type: integer
          x-nullable: true
        _links:
          $ref: '#/components/schemas/service__links'
      required:
      - _type
      - command
      - container_count
      - container_memory_limit_mb
      - created_at
      - docker_ref
      - docker_repo
      - force_zero_downtime
      - handle
      - id
      - instance_class
      - naive_health_check
      - process_type
      - restart_free_scaling
      - stop_timeout
      - updated_at
    ListAppsForAccount_200_response:
      properties:
        _embedded:
          $ref: '#/components/schemas/ListAppsForAccount_200_response__embedded'
        total_count:
          type: integer
        per_page:
          type: integer
        current_page:
          type: integer
        _links:
          $ref: '#/components/schemas/ListActivityReportsForAccount_200_response__links'
      required:
      - _embedded
      - _links
      - current_page
      - per_page
      - total_count
      type: object
    CreateApp_request:
      properties:
        handle:
          type: string
      required:
      - handle
      type: object
    ListAccountsForStack_200_response__links_stack:
      properties:
        href:
          format: uri
          type: string
      type: object
  securitySchemes:
    token:
      in: header
      name: Authorization
      type: apiKey