---
swagger: "2.0"
info:
  version: "1"
  title: "Public API"
basePath: "/external"
tags:
- name: "configuration"
  description: "Retrieve configurations"
schemes:
- "http"
- "https"
paths:
  /external/configurations:
    post:
      tags:
      - "configuration"
      summary: "All configuration for the given applications in JSON format"
      description: ""
      operationId: "getConfigurationsAsJson"
      produces:
      - "application/json;charset=UTF-8"
      parameters:
      - in: "body"
        name: "requestConfiguration"
        description: "Configuration Request"
        required: false
        schema:
          $ref: "#/definitions/ConfigurationRequest"
      - name: "download"
        in: "query"
        description: "Should return as download"
        required: false
        type: "boolean"
      responses:
        200:
          description: "Successfully retrieved configurations"
          schema:
            $ref: "#/definitions/ConfigurationValue"
        401:
          description: "You are not authorized to view the configurations"
        403:
          description: "Accessing the configurations you were trying to reach is forbidden"
        404:
          description: "At least one of the parameters passed are not known to the\
            \ system"
securityDefinitions:
  Authorization:
    type: "apiKey"
    name: "Authorization"
    in: "header"
definitions:
  ConfigurationRequest:
    type: "object"
    required:
    - "configurations"
    - "environmentKey"
    properties:
      tenantKey:
        type: "string"
        description: "The key of the Tenant. Defaults to 'default'"
      environmentKey:
        type: "string"
        description: "Filter values by the given key of the environment"
      context:
        type: "string"
        description: "Filters values by the given context. If empty, context specific\
          \ entries will be ignored."
      version:
        type: "string"
        description: "Filters values by the given version. If empty, version specific\
          \ entries will be ignored."
      dateTime:
        type: "string"
        format: "date-time"
        description: "Filters values by the given date time. If empty, date specific\
          \ entries will be ignored."
      configurations:
        type: "array"
        description: "All configuration groups from which values should be retrieved.\
          \ At least one."
        items:
          $ref: "#/definitions/ConfigurationRequestGroup"
    description: "Represents a configuration request"
  ConfigurationRequestGroup:
    type: "object"
    required:
    - "groupKey"
    properties:
      groupKey:
        type: "string"
        description: "The unique key defined on a ConfigurationGroup."
      versionNumber:
        type: "integer"
        format: "int32"
        description: "The version of the ConfigurationGroup to be retrieved. Only\
          \ needed if selectionMode is VERSION_NUMBER"
      selectionMode:
        type: "string"
        description: "The selection mode of the version of a ConfigurationGroup. Defaults\
          \ to LATEST."
        enum:
        - "LATEST"
        - "LATEST_RELEASED"
        - "VERSION_NUMBER"
    description: "Represents a configuration request of a specific configuration group"
  ConfigurationValue:
    type: "object"
    required:
    - "configurationValueId"
    - "key"
    - "type"
    - "value"
    properties:
      key:
        type: "string"
        description: "Key of the configuration value"
      value:
        type: "string"
        description: "Serialized configuration value"
      type:
        type: "string"
        description: "Type of the configuration value"
        enum:
        - "STRING"
      configurationValueId:
        type: "string"
        description: "Internal id of the configuration value"
      secured:
        type: "boolean"
        description: "Hint if the attribute as flagged as secured"
      environment:
        type: "string"
        description: "For which environment the configuration value is designed. If\
          \ empty it's default for all"
      validFrom:
        type: "string"
        format: "date-time"
        description: "From which time on this entry is valid"
      validTo:
        type: "string"
        format: "date-time"
        description: "Until which time on this entry is valid"
      versionFrom:
        type: "string"
        description: "From which version this entry is valid"
      versionTo:
        type: "string"
        description: "From which version this entry is valid"
      context:
        type: "string"
        description: "To which context this value is bound"
      lastUpdateInMilliseconds:
        type: "integer"
        format: "int64"
        description: "Last update in milliseconds."
      lastUpdate:
        type: "string"
        format: "date-time"
        description: "Last update."
    description: "Representation of a configuration value."
