Calyptia pipeline_log API

The pipeline_log API from Calyptia — 2 operation(s) for pipeline_log.

OpenAPI Specification

calyptia-pipeline-log-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Calyptia Cloud agent pipeline_log API
  version: '1.0'
  description: HTTP API service of Calyptia Cloud
  contact:
    name: Calyptia
    email: hello@calyptia.com
    url: https://cloud.calyptia.com
  termsOfService: https://calyptia.com/terms/
servers:
- url: https://cloud-api.calyptia.com
  description: prod
- url: https://cloud-api-dev.calyptia.com
  description: dev
- url: https://cloud-api-staging.calyptia.com
  description: staging
- url: http://localhost:{port}
  description: local
  variables:
    port:
      default: '5000'
tags:
- name: pipeline_log
paths:
  /v1/pipelines/{pipelineID}/logs:
    parameters:
    - name: pipelineID
      schema:
        type: string
        format: uuid
      in: path
      description: Parent pipeline ID.
      required: true
    post:
      operationId: createPipelineLog
      summary: Create Pipeline Log
      description: 'Create a new log within a pipeline.

        The log will be created with the given `logs` blob of text.'
      tags:
      - pipeline_log
      security:
      - user: []
      - project: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePipelineLog'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Created'
    get:
      operationId: pipelineLogs
      summary: Pipeline Logs
      description: Logs from a pipeline with backward pagination.
      tags:
      - pipeline_log
      security:
      - user: []
      - project: []
      parameters:
      - name: last
        schema:
          type: integer
          minimum: 0
        in: query
        description: Limit to the last logs.
      - name: before
        schema:
          type: string
        in: query
        description: Paginate logs before the given cursor.
      - name: status
        schema:
          type: string
          enum:
          - NEW
          - DONE
        in: query
        description: Filter logs by status
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineLogs'
  /v1/pipeline_logs/{pipelineLogID}:
    parameters:
    - name: pipelineLogID
      in: path
      schema:
        type: string
        format: uuid
      required: true
    get:
      tags:
      - pipeline_log
      summary: Pipeline log
      operationId: pipelineLog
      description: Pipeline log by ID.
      security:
      - user: []
      - project: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineLog'
    patch:
      operationId: updatePipelineLog
      summary: Update Pipeline Log
      description: 'Update a log given its ID.

        The log will be updated with the given `logs` blob of text.'
      tags:
      - pipeline_log
      security:
      - user: []
      - project: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePipelineLog'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Updated'
    delete:
      operationId: deletePipelineLog
      summary: Delete Pipeline Log
      description: Delete a log given its ID.
      tags:
      - pipeline_log
      security:
      - user: []
      - project: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deleted'
components:
  schemas:
    PipelineLog:
      type: object
      properties:
        id:
          type: string
          format: uuid
        pipelineID:
          type: string
          format: uuid
        logs:
          type: string
        lines:
          type: integer
          default: 100
        status:
          $ref: '#/components/schemas/PipelineLogStatus'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
      - id
      - pipelineID
      - logs
      - lines
      - status
      - createdAt
      - updatedAt
    CreatePipelineLog:
      type: object
      properties:
        logs:
          type: string
        lines:
          type: integer
          default: 100
      required:
      - logs
    UpdatePipelineLog:
      type: object
      properties:
        logs:
          type: string
          nullable: true
          default: null
        lines:
          type: integer
          nullable: true
          default: null
        status:
          type: string
          nullable: true
          default: null
          enum:
          - NEW
          - DONE
    Created:
      type: object
      properties:
        id:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
      required:
      - id
      - createdAt
    Deleted:
      type: object
      properties:
        deleted:
          type: boolean
        deletedAt:
          type: string
          format: date-time
          nullable: true
          default: null
      required:
      - deleted
      - deletedAt
    Updated:
      type: object
      properties:
        updatedAt:
          type: string
          format: date-time
      required:
      - updatedAt
    PipelineLogs:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PipelineLog'
        endCursor:
          type: string
          nullable: true
          default: null
        count:
          type: number
          format: int32
          minimum: 0
        pollingIntervalMs:
          type: integer
          format: int32
          minimum: 0
          description: Recommended polling interval in milliseconds for agents to poll for new log requests. Calculated server-side based on active agent count. (v3 pipelines only, 0 for legacy pipelines)
      required:
      - items
      - endCursor
      - count
      - pollingIntervalMs
    PipelineLogStatus:
      type: string
      description: 'The status of a pipeline log, if NEW hasn''t been updated from the cluster.

        If DONE, logs have been retrieved from the cluster.

        '
      default: NEW
      enum:
      - NEW
      - DONE
  securitySchemes:
    user:
      type: http
      scheme: bearer
    project:
      name: X-Project-Token
      type: apiKey
      in: header
    auth0:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://sso.calyptia.com/oauth/token
          scopes: {}
        authorizationCode:
          authorizationUrl: https://sso.calyptia.com/authorize
          tokenUrl: https://sso.calyptia.com/oauth/token
          scopes: {}