Humanitec Logs API

A container log entry.

OpenAPI Specification

humanitec-logs-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Humanitec AccountType Logs API
  version: 0.28.24
  description: '# Introduction

    The *Humanitec API* allows you to automate and integrate Humanitec into your developer and operational workflows.

    The API is a REST based API. It is based around a set of concepts:


    * Core

    * External Resources

    * Sets and Deltas


    ## Authentication


    Almost all requests made to the Humanitec API require Authentication. See our [Developer Docs on API Authentication](https://developer.humanitec.com/platform-orchestrator/reference/api-references/#authentication) for instructions.


    ## Content Types

    The Humanitec API, unless explicitly specified, only accepts content types of `application/json` and will always return valid `application/json` or an empty response.


    ## Response Codes

    ### Success

    Any response code in the `2xx` range should be regarded as success.


    | **Code** | **Meaning**                         |

    |----------|-------------------------------------|

    | `200`    | Success                             |

    | `201`    | Success, a new resource was created |

    | `204`    | Success, but no content in response |


    _Note: We plan to simplify the interface by replacing 201 with 200 status codes._


    ### Failure

    Any response code in the `4xx` range should be regarded as an error that can be rectified by the client. `5xx` error codes indicate errors that cannot be corrected by the client.


    | **Code** | **Meaning**                                                                                                           |

    |----------|-----------------------------------------------------------------------------------------------------------------------|

    | `400`    | General error. (Body will contain details)                                                                            |

    | `401`    | Attempt to access protected resource without `Authorization` Header.                                                  |

    | `403`    | The `Bearer` or `JWT` does not grant access to the requested resource.                                                |

    | `404`    | Resource not found.                                                                                                   |

    | `405`    | Method not allowed                                                                                                    |

    | `409`    | Conflict. Usually indicated a resource with that ID already exists.                                                   |

    | `422`    | Unprocessable Entity. The body was not valid JSON, was empty or contained an object different from what was expected. |

    | `429`    | Too many requests - request rate limit has been reached.                                                              |

    | `500`    | Internal Error. If it occurs repeatedly, contact support.                                                             |

    '
  contact:
    name: Humanitec Support
    email: support@humanitec.com
  x-logo:
    url: humanitec-logo.png
    altText: Humanitec logo
servers:
- url: https://api.humanitec.io/
tags:
- name: Logs
  x-displayName: Container Logs
  description: 'A container log entry.

    <SchemaDefinition schemaRef="#/components/schemas/OutputEntryResponse" />

    '
paths:
  /orgs/{orgId}/apps/{appId}/envs/{envId}/logs:
    get:
      tags:
      - Logs
      summary: Get container log entries for the environment
      parameters:
      - name: orgId
        in: path
        description: 'The Organization ID


          '
        required: true
        schema:
          type: string
      - name: appId
        in: path
        description: 'The Application ID


          '
        required: true
        schema:
          type: string
      - name: envId
        in: path
        description: 'The Environment ID


          '
        required: true
        schema:
          type: string
      - name: workload_id
        in: query
        description: 'filter by workload ID


          '
        schema:
          type: string
      - name: container_id
        in: query
        description: 'filter by container ID


          '
        schema:
          type: string
      - name: deployment_id
        in: query
        description: 'filter by deployment ID


          '
        schema:
          type: string
      - name: timestamp_from
        in: query
        description: 'filter by min time, RFC 3339 format, e.g. "2021-10-02T15:01:23.045Z"


          '
        schema:
          type: string
      - name: timestamp_to
        in: query
        description: 'filter by max time, RFC 3330 format, e.g. "2021-10-02T15:01:23.045Z"


          '
        schema:
          type: string
      - name: limit
        in: query
        description: 'limit log entries returned


          '
        schema:
          type: string
      - name: asc
        in: query
        description: 'if true request results in ascending order, default order is descending


          '
        schema:
          type: boolean
      - name: invert
        in: query
        description: 'if true reverse the order of the log entries in the output


          '
        schema:
          type: boolean
      responses:
        '200':
          description: 'List of log entries returned.


            '
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/OutputEntryResponse'
                type: array
        '400':
          description: 'The request is invalid.


            '
        '404':
          description: 'The environment is not found.


            '
        '429':
          description: 'Too Many Requests.


            '
components:
  schemas:
    OutputEntryResponse:
      description: A container log entry.
      properties:
        container_id:
          type: string
        level:
          type: string
        payload:
          type: string
        timestamp:
          type: string
        workload_id:
          type: string
      required:
      - level
      - payload
      - timestamp
      - workload_id
      - container_id
      type: object
externalDocs:
  description: Find out more about how to use Humanitec in your every-day development work.
  url: https://developer.humanitec.com/
x-tagGroups:
- name: Core
  tags:
  - Agents
  - Application
  - Artefact
  - ArtefactVersion
  - AuditLogs
  - Logs
  - Deployment
  - EnvironmentType
  - Environment
  - Image
  - PublicKeys
  - Organization
  - Registry
  - RuntimeInfo
  - SecretStore
  - Value
  - ValueSetVersion
- name: App Configuration
  tags:
  - Delta
  - Set
  - WorkloadProfile
- name: Resources
  tags:
  - ActiveResource
  - DriverDefinition
  - MatchingCriteria
  - ResourceDefinition
  - ResourceDefinitionVersion
  - ResourceProvision
  - AccountType
  - ResourceAccount
  - ResourceType
  - ResourceClass
- name: Automation
  tags:
  - AutomationRule
  - Event
  - Pipelines
  - PipelineRuns
  - PipelineApprovals
- name: Users
  tags:
  - UserProfile
  - UserRole
  - Group
  - TokenInfo