Aptible Log Drains API

The LogDrains API from Aptible — 2 operation(s) for logdrains.

OpenAPI Specification

aptible-logdrains-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 Log Drains API
  version: v1
servers:
- url: '{baseUrl}'
  variables:
    baseUrl:
      default: https://api.aptible.com
      description: Override for local or test environments
security:
- token: []
tags:
- name: LogDrains
paths:
  /accounts/{account_id}/log_drains:
    get:
      description: Returns a paginated list of log drains for the specified account.
      operationId: ListLogDrainsForAccount
      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/ListLogDrainsForAccount_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 log_drains
      tags:
      - LogDrains
    post:
      description: Creates a new log drain for the specified account.
      operationId: CreateLogDrain
      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/CreateLogDrain_request'
      responses:
        '201':
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/log_drain'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: create log_drain
      tags:
      - LogDrains
  /log_drains/{id}:
    delete:
      description: Deletes a log drain by ID.
      operationId: DeleteLogDrain
      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 log_drain
      tags:
      - LogDrains
    get:
      description: Returns the details of a specific log drain by ID.
      operationId: GetLogDrain
      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/log_drain'
          description: successful
        default:
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/error'
          description: Error response. Often a 4xx or 5xx status code
      summary: show log_drain
      tags:
      - LogDrains
    patch:
      description: Partially updates a log drain's attributes.
      operationId: PatchLogDrain
      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/UpdateLogDrain_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 log_drain
      tags:
      - LogDrains
    put:
      description: Updates a log drain's attributes.
      operationId: UpdateLogDrain
      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/UpdateLogDrain_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 log_drain
      tags:
      - LogDrains
components:
  schemas:
    log_drain__links:
      properties:
        account:
          $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'
        containers:
          $ref: '#/components/schemas/ListAccountsForStack_200_response__links_stack'
        ephemeral_containers:
          $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
    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
    CreateLogDrain_request:
      properties:
        handle:
          type: string
        drain_type:
          type: string
        drain_host:
          description: For syslog-tls-tcp drains
          format: uri
          type: string
        drain_port:
          description: For syslog-tls-tcp drains
          type: integer
        drain_username:
          description: 'DEPRECATED: For legacy Elasticsearch drains'
          type: string
        drain_password:
          description: For Tail drains
          type: string
        database:
          description: For Deploy-hosted Elasticsearch drains
          format: uri
          type: string
        database_id:
          description: For Deploy-hosted Elasticsearch drains
          type: integer
        url:
          description: For HTTPs Post drains
          format: uri
          type: string
        logging_token:
          type: string
        drain_apps:
          type: boolean
          x-omitempty: false
        drain_databases:
          type: boolean
          x-omitempty: false
        drain_ephemeral_sessions:
          type: boolean
          x-omitempty: false
        drain_proxies:
          type: boolean
          x-omitempty: false
      required:
      - drain_type
      - handle
      type: object
    UpdateLogDrain_request:
      properties:
        drain_apps:
          type: boolean
          x-omitempty: false
        drain_databases:
          type: boolean
          x-omitempty: false
        drain_ephemeral_sessions:
          type: boolean
          x-omitempty: false
        drain_proxies:
          type: boolean
          x-omitempty: false
      type: object
    log_drain:
      properties:
        id:
          type: integer
        _type:
          type: string
        handle:
          type: string
        drain_type:
          type: string
        drain_host:
          type: string
        drain_port:
          type: integer
        created_at:
          format: dateTime
          type: string
        updated_at:
          format: dateTime
          type: string
        status:
          type: string
        drain_username:
          type: string
          x-nullable: true
        drain_password:
          type: string
          x-nullable: true
        drain_apps:
          type: boolean
        drain_databases:
          type: boolean
        drain_ephemeral_sessions:
          type: boolean
        drain_proxies:
          type: boolean
        gentlemanjerry_certificate:
          type: string
          x-nullable: true
        gentlemanjerry_docker_name:
          type: string
          x-nullable: true
        gentlemanjerry_instance_id:
          type: string
          x-nullable: true
        gentlemanjerry_host:
          type: string
          x-nullable: true
        gentlemanjerry_port_mapping:
          items:
            items:
              type: integer
            type: array
          type: array
        gentlemanjerry_allocation:
          items:
            type: string
          type: array
        url:
          type: string
          x-nullable: true
        logging_token:
          type: string
          x-nullable: true
        _links:
          $ref: '#/components/schemas/log_drain__links'
      required:
      - _type
      - created_at
      - drain_apps
      - drain_databases
      - drain_ephemeral_sessions
      - drain_host
      - drain_port
      - drain_proxies
      - drain_type
      - gentlemanjerry_allocation
      - gentlemanjerry_certificate
      - gentlemanjerry_docker_name
      - gentlemanjerry_host
      - gentlemanjerry_instance_id
      - gentlemanjerry_port_mapping
      - handle
      - id
      - status
      - updated_at
    ListLogDrainsForAccount_200_response:
      properties:
        _embedded:
          $ref: '#/components/schemas/ListLogDrainsForAccount_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
    ListAccountsForStack_200_response__links_stack:
      properties:
        href:
          format: uri
          type: string
      type: object
    ListLogDrainsForAccount_200_response__embedded:
      properties:
        log_drains:
          items:
            $ref: '#/components/schemas/log_drain'
          type: array
      type: object
  securitySchemes:
    token:
      in: header
      name: Authorization
      type: apiKey