openapi: 3.0.0
info:
  title: Language API - ValueStreamer
  version: 1.0.0
  description: "This is the specification of the REST interface for the language API."
servers:
  - url: https://api-tenant.valuestreamer.de/api
security:
  - basicAuth: []
tags:
- name: "Languages"
  description: ""
paths:
  /exchange/languages:
    get:
      tags:
        - "Languages"
      summary: "Retrieve all available languages on the tenant"
      description: ""
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Languages'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  securitySchemes:
    basicAuth:           
      type: http
      scheme: basic
  schemas:
    # Schema for error response body
    Error:
      description: "Common error response object returned if a request failed."
      type: object
      properties:
        errorId:
          type: string
          description: "Unique error ID for this error response"
        errorMessage:
          type: string
    Languages:
      type: object
      properties:
        language:
          type: string
          description: "ISO 639-1 Language code, e.g. DE, EN, CS"
          example: "CS"
        name:
          type: string
          description: "ISO language name, e.g. German, English, Czech"
          example: "Czech"
        active:
          type: boolean
          description: "Indicates whether the language is currently active and displayed to users in the UI or not."
          example: true
  responses:
    Unauthorized:
      description: Not authorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
