Calyptia config_section API

The config_section API from Calyptia — 3 operation(s) for config_section.

OpenAPI Specification

calyptia-config-section-api-openapi.yml Raw ↑
openapi: 3.0.4
info:
  title: Calyptia Cloud agent config_section 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: config_section
paths:
  /v1/projects/{projectID}/config_sections:
    parameters:
    - name: projectID
      in: path
      schema:
        type: string
        format: uuid
      required: true
    post:
      tags:
      - config_section
      security:
      - user: []
      - project: []
      summary: Create config section
      operationId: createConfigSection
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConfigSection'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedConfigSection'
    get:
      tags:
      - config_section
      security:
      - user: []
      - project: []
      parameters:
      - name: last
        schema:
          type: integer
          minimum: 0
        in: query
        description: Last config sections.
      - name: before
        schema:
          type: string
        in: query
        description: Config sections before the given cursor.
      - name: include_processing_rules
        schema:
          type: boolean
        in: query
        description: 'Include config sections

          that were created through a processing rule.

          '
      summary: Config sections
      operationId: configSections
      responses:
        '200':
          description: OK
          headers:
            Link:
              schema:
                type: string
                example: </v1/projects/foo/config_sections?before=bar>; rel="next"
              description: RFC5988 with `rel="next"`.
          links:
            NextTraceRecordsPage:
              operationId: configSections
              parameters:
                before: $response.header.Link#rel=next
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConfigSection'
  /v1/config_sections/{configSectionID}:
    parameters:
    - name: configSectionID
      in: path
      schema:
        type: string
        format: uuid
      required: true
    get:
      tags:
      - config_section
      security:
      - user: []
      - project: []
      summary: Config section
      operationId: configSection
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigSection'
          links:
            Project:
              operationId: project
              parameters:
                projectID: $response.body.projectID
    patch:
      tags:
      - config_section
      summary: Update config section
      operationId: updateConfigSection
      security:
      - user: []
      - project: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConfigSection'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatedConfigSection'
    delete:
      tags:
      - config_section
      summary: Delete config section
      operationId: deleteConfigSection
      security:
      - user: []
      - project: []
      responses:
        '204':
          description: Deleted
  /v1/pipelines/{pipelineID}/config_section_set:
    parameters:
    - name: pipelineID
      in: path
      schema:
        type: string
        format: uuid
      required: true
    patch:
      tags:
      - config_section
      summary: Update config section set
      operationId: updateConfigSectionSet
      security:
      - user: []
      - project: []
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                format: uuid
              description: Config section IDs.
      responses:
        '204':
          description: Updated
components:
  schemas:
    ConfigSectionKind:
      type: string
      enum:
      - input
      - filter
      - output
      - service
    Pairs:
      type: array
      items:
        $ref: '#/components/schemas/Pair'
    UpdatedConfigSection:
      type: object
      properties:
        updatedAt:
          type: string
          format: date-time
      required:
      - updatedAt
    ConfigSection:
      type: object
      properties:
        id:
          type: string
          format: uuid
        projectID:
          type: string
          format: uuid
        processingRuleID:
          type: string
          format: uuid
          nullable: true
          default: null
        kind:
          $ref: '#/components/schemas/ConfigSectionKind'
        properties:
          $ref: '#/components/schemas/Pairs'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
      - id
      - projectID
      - processingRuleID
      - kind
      - properties
      - createdAt
      - updatedAt
    CreatedConfigSection:
      type: object
      properties:
        id:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
      required:
      - id
      - createdAt
    UpdateConfigSection:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/Pairs'
          nullable: true
          default: null
        skipConfigValidation:
          type: boolean
          default: false
    Pair:
      type: object
      properties:
        key:
          type: string
          example: name
        value:
          anyOf:
          - type: integer
          - type: number
          - type: boolean
          - type: string
          - type: array
            items:
              type: string
          example: dummy
      required:
      - key
      - value
    CreateConfigSection:
      type: object
      properties:
        kind:
          $ref: '#/components/schemas/ConfigSectionKind'
        properties:
          $ref: '#/components/schemas/Pairs'
        skipConfigValidation:
          type: boolean
          default: false
      required:
      - kind
      - properties
      - skipConfigValidation
  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: {}