openapi: 3.0.1
info:
  title: Topology service
  contact:
    name: co.brick
    url: https://cobrick.com
    email: aiops@cobrick.com
  license:
    name: Commercial
    url: https://cobrick.com
  version: v1
servers:
  - url: https://app.observe.digital/api/v1
    description: Production environment
  - url: https://stage.observe.digital/api/v1
    description: Staging environment
  - url: http://localhost:8080
    description: Local environment
paths:
  /topology:
    get:
      tags:
        - topology
      summary: Get topology
      description: Returns list of basic information about services and their connections
      operationId: getTopology
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned topology data
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/Topology'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/Topology'
              example: null
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/addresses:
    get:
      tags:
        - addresses
      summary: Get addresses
      description: Returns list of addresses
      operationId: getAddresses
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned addresses
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/Address'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/Address'
              example: null
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    post:
      tags:
        - addresses
      summary: Create or update an address mapping
      description: Creates or updates an address mapping entry
      operationId: storeAddress
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      requestBody:
        description: JSON representation of the address to be created/updated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Address'
        required: true
      responses:
        '200':
          description: Successfully created or updated an address
        '400':
          description: Incorrect payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/addresses/{namespace}:
    delete:
      tags:
        - addresses
      summary: Remove an address
      description: Removes an address mapping for a given namespace
      operationId: deleteAddress
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            type: string
        - name: name
          in: path
          description: Namespace
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '204':
          description: Successfully deleted address
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/cleanup:
    post:
      tags:
        - topology
      summary: Cleanup old topology data
      description: >-
        Removes topology related resources which were not "seen" for a longer
        period of time
      operationId: cleanup
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully removed old data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemovedItemsCounts'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/health:
    get:
      tags:
        - health
      summary: Get grouped health statuses divided for resource type
      operationId: getHealthStatuses
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: node
          in: query
          description: The node filter
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned health statuses
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCountsResponse'
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/log-templates:
    get:
      tags:
        - log templates
      summary: Get log templates
      operationId: getLogTemplates
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: includeInvalid
          in: query
          description: Should templates with invalid names be included in the response
          schema:
            oneOf:
              - type: boolean
                default: true
              - type: boolean
                default: true
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned log templates
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/LogTemplateDTO'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/LogTemplateDTO'
              example: null
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/metrics:
    get:
      tags:
        - metrics
      summary: Get metrics
      operationId: getMetrics
      parameters:
        - name: nameFilter
          in: query
          description: >-
            Only metrics which names start with the provided value will be
            returned
          schema:
            type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned metrics
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/Metric'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/Metric'
              example: null
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/nodes:
    get:
      tags:
        - nodes
      summary: Get nodes
      description: Returns list of nodes
      operationId: getNodes
      parameters:
        - name: deleted
          in: query
          description: >-
            If set to true, returns only deleted nodes, false returns
            non-deleted, or all when not set
          schema:
            type: boolean
        - name: serviceName
          in: query
          description: Service name
          schema:
            minItems: 0
            type: array
            items:
              type: string
        - name: serviceNamespace
          in: query
          description: Service namespace
          schema:
            oneOf:
              - minItems: 0
                type: array
                items:
                  type: string
              - minItems: 0
                type: array
                items:
                  type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: health
          in: query
          description: The health status filter
          schema:
            minItems: 0
            type: array
            items:
              $ref: '#/components/schemas/HealthStatus'
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned nodes
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sNode'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sNode'
              example: null
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    post:
      tags:
        - nodes
      summary: Create or update a node
      operationId: updateNode
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      requestBody:
        description: JSON representation of the node to be created/updated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/K8sNode'
        required: true
      responses:
        '200':
          description: Successfully created or updated a node
        '400':
          description: Incorrect payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/nodes/{name}:
    get:
      tags:
        - nodes
      summary: Get node details
      operationId: getNode
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Node name
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned node details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/K8sNode'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '404':
          description: Node not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    delete:
      tags:
        - nodes
      summary: Remove a node
      description: Removes a cluster node
      operationId: deleteNode
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Node name
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '204':
          description: Successfully deleted node
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/nodes/{name}/pods:
    get:
      tags:
        - nodes
      summary: Get node pods
      description: Returns list of pods for a node
      operationId: getPods
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Node name
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned pods
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPod'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPod'
              example: null
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/pods:
    get:
      tags:
        - pods
      summary: Get pods
      description: Returns a list of pods with basic information about them
      operationId: getPods_1
      parameters:
        - name: node
          in: query
          description: The node filter
          schema:
            minItems: 0
            type: array
            items:
              type: string
        - name: serviceNamespace
          in: query
          description: Service namespace
          schema:
            minItems: 0
            type: array
            items:
              type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: serviceName
          in: query
          description: Service name
          schema:
            oneOf:
              - minItems: 0
                type: array
                items:
                  type: string
              - minItems: 0
                type: array
                items:
                  type: string
        - name: deleted
          in: query
          description: >-
            If set to true, returns only deleted services, false returns
            non-deleted, or all when not set
          schema:
            oneOf:
              - type: boolean
              - type: boolean
        - name: health
          in: query
          description: The health status filter
          schema:
            minItems: 0
            type: array
            items:
              $ref: '#/components/schemas/HealthStatus'
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned pods
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPod'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPod'
              example: null
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services:
    get:
      tags:
        - services
      summary: Get services
      description: Returns a list of services with basic information about them
      operationId: getServices
      parameters:
        - name: edge
          in: query
          description: >-
            If set to true, returns only edge services, false returns non-edge
            services, or all when not set
          schema:
            type: boolean
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: namespace
          in: query
          description: The namespace filter
          schema:
            type: string
        - name: podName
          in: query
          description: Return the service containing given pod
          schema:
            oneOf:
              - type: string
              - type: string
        - name: withMetrics
          in: query
          description: If set to true limits the result to services with active metrics
          schema:
            type: boolean
            default: false
        - name: health
          in: query
          description: The health status filter
          schema:
            $ref: '#/components/schemas/HealthStatus'
        - name: type
          in: query
          description: The type service filter
          schema:
            type: string
        - name: withLogTemplates
          in: query
          description: >-
            If set to true limits the result to services with active log
            templates
          schema:
            oneOf:
              - type: boolean
                default: false
              - type: boolean
                default: false
        - name: deleted
          in: query
          description: >-
            If set to true, returns only deleted services, false returns
            non-deleted, or all when not set
          schema:
            oneOf:
              - type: boolean
              - type: boolean
        - name: node
          in: query
          description: The node filter
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned services
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/SimpleService'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/SimpleService'
              example: null
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    post:
      tags:
        - services
      summary: Create or update a service
      operationId: storeService
      parameters:
        - name: User-Agent
          in: header
          description: User-Agent header
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      requestBody:
        description: A JSON representation of a service
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Service'
        required: true
      responses:
        '200':
          description: Successfully stored the service
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/facets:
    get:
      tags:
        - services
      summary: Get services with facets
      description: Returns a list of services basic information with facets metadata
      operationId: getServicesWithFacets
      parameters:
        - name: edge
          in: query
          description: >-
            If set to true, returns only edge services, false returns non-edge
            services, or all when not set
          schema:
            type: boolean
        - name: groupBy
          in: query
          description: If set returns services grouped by the field from the parameter
          schema:
            type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: namespace
          in: query
          description: The namespace filter
          schema:
            type: string
        - name: withMetrics
          in: query
          description: If set to true limits the result to services with active metrics
          schema:
            type: boolean
            default: false
        - name: health
          in: query
          description: The health status filter
          schema:
            $ref: '#/components/schemas/HealthStatus'
        - name: type
          in: query
          description: The type service filter
          schema:
            type: string
        - name: withLogTemplates
          in: query
          description: >-
            If set to true limits the result to services with active log
            templates
          schema:
            oneOf:
              - type: boolean
                default: false
              - type: boolean
                default: false
        - name: deleted
          in: query
          description: >-
            If set to true, returns only deleted services, false returns
            non-deleted, or all when not set
          schema:
            oneOf:
              - type: boolean
              - type: boolean
        - name: node
          in: query
          description: The node filter
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned services
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FacetedServicesResponse'
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/namespaces:
    get:
      tags:
        - services
      summary: Get all namespaces
      operationId: getNamespaces
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned namespaces
          content:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      type: string
                  - type: array
                    items:
                      type: string
              example: null
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{name}/ns/{namespace}:
    get:
      tags:
        - services
      summary: Get service details
      description: Returns a service with corresponding metrics and log templates
      operationId: getService
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned service details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FatService'
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '404':
          description: Service not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    delete:
      tags:
        - services
      summary: Remove a service
      description: Removes a service
      operationId: deleteService
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '204':
          description: Successfully deleted service
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{name}/ns/{namespace}/containers:
    get:
      tags:
        - services
      summary: Get a list of service containers with basic information
      operationId: getContainers
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned containers
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/SimpleContainer'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/SimpleContainer'
              example: null
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{name}/ns/{namespace}/endpoints:
    get:
      tags:
        - services
      summary: Get service endpoints
      operationId: getEndpoints
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned endpoints
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '404':
          description: Service not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    post:
      tags:
        - services
      summary: Store service endpoints
      operationId: storeEndpoints
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: User-Agent
          in: header
          description: User-Agent header
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      requestBody:
        description: A JSON array of the endpoints to be stored
        content:
          application/json:
            schema:
              oneOf:
                - minItems: 0
                  type: array
                  items:
                    type: string
                - minItems: 0
                  type: array
                  items:
                    type: string
            example: null
        required: true
      responses:
        '200':
          description: Successfully stored the endpoints
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{name}/ns/{namespace}/log-templates:
    get:
      tags:
        - services
      summary: Get service log templates
      operationId: getLogTemplates_1
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: container
          in: query
          description: Container name
          schema:
            type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned log templates
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/LogTemplate'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/LogTemplate'
              example: null
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    post:
      tags:
        - services
      summary: Store log templates
      operationId: storeLogTemplates
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: User-Agent
          in: header
          description: User-Agent header
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      requestBody:
        description: A JSON array of the log templates to be stored
        content:
          application/json:
            schema:
              oneOf:
                - type: array
                  items:
                    $ref: '#/components/schemas/LogTemplateDTO'
                - type: array
                  items:
                    $ref: '#/components/schemas/LogTemplateDTO'
            example: null
        required: true
      responses:
        '200':
          description: Successfully stored the log templates
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{name}/ns/{namespace}/media:
    get:
      tags:
        - services
      summary: Get service media
      description: Returns list of media for a service
      operationId: getMedia
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: namespace
          in: path
          description: Service namespace
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned media
          content:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/ServiceMedia'
                  - type: array
                    items:
                      $ref: '#/components/schemas/ServiceMedia'
              example: null
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    post:
      tags:
        - services
      summary: Create new media for a service
      operationId: addMedia
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: namespace
          in: path
          description: Service namespace
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceMedia'
        required: true
      responses:
        '200':
          description: Successfully created media
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{name}/ns/{namespace}/media/{id}:
    delete:
      tags:
        - services
      summary: Remove media
      description: Removes media with the specified UUID
      operationId: deleteServiceMedia
      parameters:
        - name: id
          in: path
          description: Media UUID
          required: true
          schema:
            type: string
            format: uuid
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: namespace
          in: path
          description: Service namespace
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '204':
          description: Successfully deleted a media
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{name}/ns/{namespace}/metrics:
    get:
      tags:
        - services
      summary: Get service metrics
      operationId: getMetrics_1
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned metrics
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/Metric'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/Metric'
              example: null
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{name}/ns/{namespace}/pods:
    get:
      tags:
        - services
      summary: Get service pods
      description: Returns list of pods for a service with basic information
      operationId: getPods_2
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
        - name: deleted
          in: query
          description: >-
            If set to true, returns only deleted pods, false returns
            non-deleted, or all when not set
          schema:
            oneOf:
              - type: boolean
              - type: boolean
      responses:
        '200':
          description: Successfully returned pods
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPod'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPod'
              example: null
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    post:
      tags:
        - services
      summary: Create or update a pod and its containers
      operationId: updatePodAndContainers
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: User-Agent
          in: header
          description: User-Agent header
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Service name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FatK8sPod'
        required: true
      responses:
        '200':
          description: Successfully created or updated a pod
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{name}/ns/{namespace}/status:
    post:
      tags:
        - services
      operationId: updateStatus
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
        - name: namespace
          in: path
          required: true
          schema:
            type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  additionalProperties: true
                - type: object
                  additionalProperties: true
            example: null
        required: true
      responses:
        '200':
          description: updateStatus 200 response
  /topology/services/{serviceName}/ns/{namespace}/containers/{name}:
    get:
      tags:
        - services
      summary: Get container details
      operationId: getContainer
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: serviceName
          in: path
          description: Service name
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: name
          in: path
          description: Container name
          required: true
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned the container
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/K8sContainer'
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '404':
          description: Container not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{serviceName}/ns/{namespace}/metrics/{metricName}:
    get:
      tags:
        - services
      summary: Get service metric details
      operationId: getServiceMetricDetails
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: serviceName
          in: path
          description: Service name
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: metricName
          in: path
          description: Metric name
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned metric details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricDetails'
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/services/{serviceName}/ns/{namespace}/pods/{name}:
    get:
      tags:
        - services
      summary: Get pod details
      operationId: getPod
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: serviceName
          in: path
          description: Service name
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: name
          in: path
          description: Pod name
          required: true
          schema:
            type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned the pod
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/K8sPod'
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '404':
          description: Pod not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    delete:
      tags:
        - services
      summary: Remove a pod
      description: Removes a pod leaving other resources intact
      operationId: deletePod
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: serviceName
          in: path
          description: Service name
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: name
          in: path
          description: Pod name
          required: true
          schema:
            type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '204':
          description: Successfully deleted a pod
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/update:
    post:
      tags:
        - topology
      summary: Trigger background topology update operation
      description: >-
        Triggers an operation which updates the database with topology data.

        The method returns immediately, while the operation is executed
        asynchronously
      operationId: triggerUpdate
      parameters:
        - name: firstRun
          in: query
          description: >-
            Parameter determining an initial, first run topology update for the
            scope
          schema:
            oneOf:
              - type: boolean
                default: false
              - type: boolean
                default: false
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '202':
          description: Successfully triggered the update operation
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/volumes:
    get:
      tags:
        - volumes
      summary: Get persistent volumes
      operationId: getVolumes
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned persistent volumes
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPersistentVolume'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPersistentVolume'
              example: null
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    post:
      tags:
        - volumes
      summary: Create or update a persistent volume
      operationId: updatePersistentVolume
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      requestBody:
        description: JSON representation of the persistent volume to be created/updated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/K8sPersistentVolume'
        required: true
      responses:
        '200':
          description: Successfully created or updated a persistent volume
        '400':
          description: Incorrect payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/volumes/claims:
    get:
      tags:
        - volumes
      summary: Get persistent volume claims
      operationId: getVolumeClaims
      parameters:
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully returned persistent volume claims
          content:
            application/json:
              schema:
                oneOf:
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPersistentVolumeClaim'
                  - minItems: 0
                    type: array
                    items:
                      $ref: '#/components/schemas/K8sPersistentVolumeClaim'
              example: null
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
    post:
      tags:
        - volumes
      summary: Create or update a persistent volume claim
      operationId: updatePersistentVolumeClaim
      parameters:
        - name: User-Agent
          in: header
          description: User-Agent header
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      requestBody:
        description: >-
          JSON representation of the persistent volume claim to be
          created/updated
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/K8sPersistentVolumeClaim'
        required: true
      responses:
        '200':
          description: Successfully created or updated a persistent volume claim
        '400':
          description: Incorrect payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/volumes/claims/{name}/ns/{namespace}:
    delete:
      tags:
        - volumes
      summary: Remove a persistent volume
      description: Removes a persistent volume
      operationId: deletePersistentVolumeClaim
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: name
          in: path
          description: Persistent volume claim name
          required: true
          schema:
            type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '200':
          description: Successfully deleted persistent volume
        '204':
          description: deletePersistentVolumeClaim 204 response
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
  /topology/volumes/{name}:
    delete:
      tags:
        - volumes
      summary: Remove a persistent volume
      description: Removes a persistent volume
      operationId: deletePersistentVolume
      parameters:
        - name: name
          in: path
          description: Persistent volume name
          required: true
          schema:
            oneOf:
              - type: string
              - type: string
        - name: Api-Version
          in: header
          description: API version
          schema:
            type: string
        - name: X-Scope-OrgID
          in: header
          description: Scope header
          schema:
            oneOf:
              - type: string
              - type: string
      responses:
        '204':
          description: Successfully deleted persistent volume
        '400':
          description: One of the query parameters is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '401':
          description: Authorization information is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonError'
components:
  schemas:
    AbstractResource_JsonError_:
      type: object
      properties:
        _links:
          type: object
          additionalProperties: true
        _embedded:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/Resource'
    Address:
      required:
        - city
        - country
        - namespace
        - street
        - zipCode
      type: object
      properties:
        namespace:
          type: string
        country:
          type: string
        city:
          type: string
        zipCode:
          type: string
        street:
          type: string
      description: A DTO class representing a mapping between namespace and address
    AggregatedHealthChecks:
      required:
        - checks
        - description
        - passedCount
        - status
        - totalCount
      type: object
      properties:
        description:
          type: string
        checks:
          type: array
          items:
            $ref: '#/components/schemas/HealthCheck'
        status:
          $ref: '#/components/schemas/HealthStatus'
        passedCount:
          type: integer
          format: int32
        totalCount:
          type: integer
          format: int32
      description: Model class representing aggregated health checks for a resource.
    Charset:
      type: object
      properties:
        registered:
          type: boolean
    Facet:
      required:
        - id
        - name
        - values
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        values:
          type: array
          items:
            $ref: '#/components/schemas/FacetValue'
      description: A DTO class representing a facet.
    FacetValue:
      required:
        - count
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        count:
          type: integer
          format: int32
      description: A DTO class representing a facet value entry.
    FacetedServicesResponse:
      required:
        - data
        - facets
      type: object
      properties:
        data:
          type: array
          description: The grouped service's data.
          items:
            $ref: '#/components/schemas/FacetedServicesResponse.GroupedServicesEntry'
        facets:
          type: array
          description: The facets.
          items:
            $ref: '#/components/schemas/Facet'
      description: A DTO class representing a faceted services response object.
    FacetedServicesResponse.GroupedServicesEntry:
      required:
        - key
        - status
        - values
      type: object
      properties:
        key:
          type: string
          description: The grouping key.
        values:
          type: array
          description: The grouped services.
          items:
            $ref: '#/components/schemas/SimpleService'
        status:
          $ref: '#/components/schemas/HealthStatus'
      description: A DTO class representing a grouped services entry.
    FatK8sPod:
      type: object
      description: >-
        Model class which represents instance of Kubernetes pod as it is sent by
        topology-registry.
      allOf:
        - $ref: '#/components/schemas/K8sPod'
        - required:
            - containers
            - edge
          properties:
            containers:
              type: array
              items:
                $ref: '#/components/schemas/K8sContainer'
            edge:
              type: boolean
    FatService:
      type: object
      description: >-
        A DTO class representing a @linkplain
        com.cobrick.aiops.topology.model.Service together with its collections
        of @linkplain com.cobrick.aiops.topology.model.Metric} and @linkplain
        com.cobrick.aiops.topology.model.LogTemplate}
      allOf:
        - $ref: '#/components/schemas/Service'
        - required:
            - logTemplates
            - metrics
          properties:
            metrics:
              type: array
              items:
                $ref: '#/components/schemas/Metric'
            logTemplates:
              type: array
              items:
                $ref: '#/components/schemas/LogTemplate'
            resources:
              $ref: '#/components/schemas/FatService.ServiceResources'
    FatService.ServiceNode:
      required:
        - name
      type: object
      properties:
        name:
          type: string
        capacity:
          allOf:
            - type: object
              additionalProperties:
                type: string
            - description: Node storage capacity in bytes split by storage type
        allocatable:
          allOf:
            - type: object
              additionalProperties:
                type: string
            - description: Node allocatable storage in bytes split by storage type
    FatService.ServiceResources:
      required:
        - nodes
        - pod
      type: object
      properties:
        pod:
          $ref: '#/components/schemas/K8sResources'
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/FatService.ServiceNode'
    HealthCheck:
      required:
        - details
        - result
      type: object
      properties:
        result:
          $ref: '#/components/schemas/HealthCheckResult'
        details:
          type: string
      description: >-
        Model class representing health check description with information about
        result.
    HealthCheckResult:
      type: string
      description: Model class representing health check result.
      enum:
        - PASSED
        - FAILED
        - UNKNOWN
    HealthCountsResponse:
      required:
        - nodes
        - pods
        - services
      type: object
      properties:
        services:
          properties:
            HEALTHY:
              type: integer
              format: int32
            UNHEALTHY:
              type: integer
              format: int32
            UNKNOWN:
              type: integer
              format: int32
            COMPLETED:
              type: integer
              format: int32
          description: services health counts
        pods:
          properties:
            HEALTHY:
              type: integer
              format: int32
            UNHEALTHY:
              type: integer
              format: int32
            UNKNOWN:
              type: integer
              format: int32
            COMPLETED:
              type: integer
              format: int32
          description: pods health counts
        nodes:
          properties:
            HEALTHY:
              type: integer
              format: int32
            UNHEALTHY:
              type: integer
              format: int32
            UNKNOWN:
              type: integer
              format: int32
            COMPLETED:
              type: integer
              format: int32
      description: A DTO class representing health statuses counts grouped by resource
    HealthStatus:
      type: string
      description: Enumeration of possible health statuses.
      readOnly: true
      enum:
        - HEALTHY
        - UNHEALTHY
        - UNKNOWN
        - COMPLETED
    JsonError:
      type: object
      allOf:
        - $ref: '#/components/schemas/AbstractResource_JsonError_'
        - required:
            - message
          properties:
            _links:
              type: object
              additionalProperties: true
            _embedded:
              type: object
              additionalProperties:
                type: array
                items:
                  $ref: '#/components/schemas/Resource'
            message:
              type: string
            logref:
              type: string
              nullable: true
            path:
              type: string
              nullable: true
    K8sCondition:
      required:
        - reason
        - status
        - type
      type: object
      properties:
        type:
          type: string
        status:
          $ref: '#/components/schemas/K8sCondition.ConditionStatus'
        reason:
          type: string
      description: Model class represents kubernetes condition
    K8sCondition.ConditionStatus:
      type: string
      enum:
        - 'True'
        - 'False'
        - Unknown
    K8sConfiguration:
      required:
        - annotations
        - conditions
        - labels
      type: object
      properties:
        labels:
          type: object
          additionalProperties:
            type: string
        annotations:
          type: object
          additionalProperties:
            type: string
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/K8sCondition'
    K8sContainer:
      required:
        - configuration
        - name
        - namespace
        - ownerService
        - resources
        - type
      type: object
      properties:
        namespace:
          type: string
        name:
          type: string
        resources:
          $ref: '#/components/schemas/K8sResources'
        configuration:
          $ref: '#/components/schemas/K8sContainerConfiguration'
        ownerService:
          type: string
        type:
          $ref: '#/components/schemas/K8sContainer.ContainerType'
        lastSeen:
          type: string
          format: date-time
      description: >-
        Model class which represents instance of Kubernetes container. Relates
        to k8s_containers database table.
    K8sContainer.ContainerType:
      type: string
      enum:
        - REGULAR
        - INIT
        - EPHEMERAL
    K8sContainerConfiguration:
      required:
        - args
        - conditions
        - environment
      type: object
      properties:
        args:
          type: array
          items:
            type: string
        environment:
          type: array
          items:
            type: object
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/K8sCondition'
    K8sContainerState:
      required:
        - name
        - ready
        - restartCount
        - started
        - startedAt
        - terminated
      type: object
      properties:
        name:
          type: string
        ready:
          type: boolean
        started:
          type: boolean
        startedAt:
          type: integer
          format: int64
        restartCount:
          type: integer
          format: int32
        terminated:
          $ref: '#/components/schemas/K8sContainerState.Terminated'
    K8sContainerState.Terminated:
      required:
        - exitCode
        - reason
      type: object
      properties:
        reason:
          type: string
        exitCode:
          type: integer
          format: int32
    K8sNode:
      required:
        - configuration
        - name
        - resources
        - status
        - statusChangeTime
      type: object
      properties:
        name:
          type: string
        resources:
          $ref: '#/components/schemas/K8sNodeResources'
        configuration:
          $ref: '#/components/schemas/K8sNodeConfiguration'
        statistics:
          type: string
          format: json
        status:
          $ref: '#/components/schemas/HealthStatus'
        statusChecks:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/AggregatedHealthChecks'
        statusChangeTime:
          type: string
          format: date-time
        lastSeen:
          type: string
          format: date-time
        deleted:
          type: boolean
          readOnly: true
    K8sNodeConfiguration:
      type: object
      allOf:
        - $ref: '#/components/schemas/K8sConfiguration'
        - required:
            - nodeInfo
          properties:
            nodeInfo:
              type: object
              additionalProperties:
                type: string
    K8sNodeResources:
      type: object
      properties:
        capacity:
          allOf:
            - type: object
              additionalProperties:
                type: string
            - description: Node storage capacity in bytes split by storage type
        allocatable:
          allOf:
            - type: object
              additionalProperties:
                type: string
            - description: Node allocatable storage in bytes split by storage type
    K8sPersistentVolume:
      required:
        - accessModes
        - capacity
        - configuration
        - k8sStatus
        - message
        - mode
        - name
        - reason
        - reclaimPolicy
        - status
        - statusChangeTime
        - storageClass
      type: object
      properties:
        name:
          type: string
        capacity:
          type: string
        storageClass:
          type: string
        accessModes:
          type: array
          items:
            $ref: '#/components/schemas/K8sPersistentVolume.AccessMode'
        reclaimPolicy:
          $ref: '#/components/schemas/K8sPersistentVolume.ReclaimPolicy'
        k8sStatus:
          $ref: '#/components/schemas/K8sPersistentVolume.Status'
        mode:
          $ref: '#/components/schemas/K8sPersistentVolume.VolumeMode'
        configuration:
          $ref: '#/components/schemas/K8sConfiguration'
        reason:
          type: string
        message:
          type: string
        status:
          $ref: '#/components/schemas/HealthStatus'
        statusChecks:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/AggregatedHealthChecks'
        statusChangeTime:
          type: string
          format: date-time
        deleted:
          type: boolean
          readOnly: true
      description: A model class representing a Kubernetes PersistentVolume resource.
    K8sPersistentVolume.AccessMode:
      type: string
      enum:
        - ReadWriteOnce
        - ReadOnlyMany
        - ReadWriteMany
        - ReadWriteOncePod
    K8sPersistentVolume.ReclaimPolicy:
      type: string
      enum:
        - RETAIN
        - RECYCLE
        - DELETE
    K8sPersistentVolume.Status:
      type: string
      enum:
        - AVAILABLE
        - BOUND
        - RELEASED
        - FAILED
    K8sPersistentVolume.VolumeMode:
      type: string
      enum:
        - FILESYSTEM
        - BLOCK
    K8sPersistentVolumeClaim:
      required:
        - accessModes
        - capacity
        - conditions
        - configuration
        - k8sStatus
        - mode
        - name
        - namespace
        - ownerServices
        - pvName
        - status
        - statusChangeTime
        - storageClass
      type: object
      properties:
        namespace:
          type: string
        name:
          type: string
        capacity:
          type: string
        storageClass:
          type: string
        accessModes:
          type: array
          items:
            $ref: '#/components/schemas/K8sPersistentVolume.AccessMode'
        k8sStatus:
          $ref: '#/components/schemas/K8sPersistentVolume.Status'
        mode:
          $ref: '#/components/schemas/K8sPersistentVolume.VolumeMode'
        pvName:
          type: string
        conditions:
          type: array
          items:
            type: string
        configuration:
          $ref: '#/components/schemas/K8sConfiguration'
        ownerServices:
          type: array
          items:
            type: string
        status:
          $ref: '#/components/schemas/HealthStatus'
        statusChecks:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/AggregatedHealthChecks'
        statusChangeTime:
          type: string
          format: date-time
        deleted:
          type: boolean
          readOnly: true
      description: A model class representing a Kubernetes PersistentVolumeClaim resource.
    K8sPod:
      required:
        - configuration
        - containerStates
        - createdAt
        - ipAddresses
        - name
        - namespace
        - ownerNode
        - ownerService
        - phase
        - restartedLast
        - status
        - statusChangeTime
      type: object
      properties:
        name:
          type: string
        namespace:
          type: string
        configuration:
          $ref: '#/components/schemas/K8sConfiguration'
        ownerService:
          type: string
        ownerNode:
          type: string
        phase:
          $ref: '#/components/schemas/K8sPod.Phase'
        containerStates:
          type: array
          items:
            $ref: '#/components/schemas/K8sContainerState'
        ipAddresses:
          type: array
          items:
            type: string
        status:
          $ref: '#/components/schemas/HealthStatus'
        statusChecks:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/AggregatedHealthChecks'
        statusChangeTime:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        restartedLast:
          type: string
          format: date-time
        lastSeen:
          type: string
          format: date-time
        deleted:
          type: boolean
        resources:
          $ref: '#/components/schemas/K8sResources'
        restarts:
          type: integer
          format: int64
          readOnly: true
      description: >-
        Model class which represents instance of Kubernetes pod. Relates to
        k8s_pods database table.
    K8sPod.Phase:
      type: string
      enum:
        - PENDING
        - RUNNING
        - SUCCEEDED
        - FAILED
        - UNKNOWN
    K8sResources:
      type: object
      properties:
        limits:
          allOf:
            - type: object
              additionalProperties:
                type: string
            - description: >-
                Resource limits in CPU cores for compute and bytes for memory
                and storage
        requests:
          allOf:
            - type: object
              additionalProperties:
                type: string
            - description: >-
                Resource requests in CPU cores for compute and bytes for memory
                and storage
    LogTemplate:
      required:
        - container
        - id
        - name
        - namespace
        - ownerNode
        - tokens
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        namespace:
          type: string
        ownerService:
          type: string
        ownerNode:
          type: string
        tokens:
          type: array
          items:
            type: string
        container:
          type: string
        lastSeen:
          type: string
          format: date-time
    LogTemplateDTO:
      required:
        - container
        - hitCounter
        - identifier
        - name
        - namespace
        - service
        - tokens
      type: object
      properties:
        tokens:
          type: array
          items:
            type: string
        identifier:
          type: integer
          format: int64
        name:
          type: string
        hitCounter:
          type: integer
          format: int64
        container:
          type: string
        service:
          type: string
        namespace:
          type: string
        lastSeen:
          type: string
          format: date-time
          readOnly: true
      description: >-
        Class which represents LogTemplate. It is used for synchronization with
        topology service.
    MediaType:
      required:
        - name
      type: object
      properties:
        name:
          type: string
        type:
          type: string
        subtype:
          type: string
        extension:
          type: string
        parameters:
          $ref: '#/components/schemas/OptionalValues_String_'
        quality:
          type: string
        qualityAsNumber:
          type: number
        version:
          type: string
        charset:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Charset'
        textBased:
          type: boolean
    Metric:
      required:
        - category
        - name
        - type
      type: object
      properties:
        name:
          type: string
        type:
          $ref: '#/components/schemas/MetricType'
        category:
          type: string
        main:
          type: boolean
        lastSeen:
          type: string
          format: date-time
      description: Class which represents the Metric database table.
    MetricDetails:
      type: object
      description: >-
        Class representing a @linkplain com.cobrick.aiops.topology.model.Metric
        with some additional details.
      allOf:
        - $ref: '#/components/schemas/Metric'
        - required:
            - serviceNameLabel
          properties:
            serviceNameLabel:
              type: string
    MetricType:
      type: string
      description: Enum which represents the type of the metric available in Prometheus.
      enum:
        - GAUGE
        - COUNTER
        - HISTOGRAM
        - SUMMARY
        - UNKNOWN
    OptionalMultiValues_Link_:
      $ref: '#/components/schemas/OptionalValues_List_Link__'
    OptionalMultiValues_Resource_:
      $ref: '#/components/schemas/OptionalValues_List_Resource__'
    OptionalValues_List_Link__:
      type: object
      properties:
        empty:
          type: boolean
    OptionalValues_List_Resource__:
      type: object
      properties:
        empty:
          type: boolean
    OptionalValues_String_:
      type: object
      properties:
        empty:
          type: boolean
    RemovedItemsCounts:
      type: object
      properties:
        removedItems:
          type: object
          additionalProperties:
            type: integer
            format: int32
    Resource:
      type: object
      properties:
        _links:
          $ref: '#/components/schemas/OptionalMultiValues_Link_'
        _embedded:
          $ref: '#/components/schemas/OptionalMultiValues_Resource_'
    Service:
      required:
        - configuration
        - edge
        - endpoints
        - media
        - name
        - namespace
        - status
        - statusChangeTime
        - technology
        - type
      type: object
      properties:
        name:
          type: string
        namespace:
          type: string
        type:
          type: string
        address:
          allOf:
            - $ref: '#/components/schemas/Address'
            - readOnly: true
        technology:
          $ref: '#/components/schemas/ServiceTechnology'
        edge:
          type: boolean
        endpoints:
          type: array
          items:
            type: string
        configuration:
          $ref: '#/components/schemas/ServiceConfiguration'
        statistics:
          type: string
          format: json
        status:
          $ref: '#/components/schemas/HealthStatus'
        statusChecks:
          type: array
          readOnly: true
          items:
            $ref: '#/components/schemas/AggregatedHealthChecks'
        statusChangeTime:
          type: string
          format: date-time
        rawObject:
          type: string
          format: json
        patch:
          type: string
          writeOnly: true
        lastSeen:
          type: string
          format: date-time
          readOnly: true
        media:
          type: array
          items:
            type: string
            format: uuid
        deleted:
          type: boolean
          readOnly: true
      description: >-
        Class which represents a Service. Service is the application which run
        inside Kubernetes cluster.
    ServiceConfiguration:
      required:
        - availableReplicas
        - conditions
        - readyReplicas
        - replicas
      type: object
      properties:
        replicas:
          type: integer
          format: int32
        availableReplicas:
          type: integer
          format: int32
        readyReplicas:
          type: integer
          format: int32
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/K8sCondition'
    ServiceConnection:
      required:
        - dstNamespace
        - dstServiceName
      type: object
      properties:
        dstServiceName:
          type: string
        statistics:
          type: string
          format: json
        dstNamespace:
          type: string
      description: Class which represents connection of two Services
    ServiceMedia:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          format: uuid
    ServiceTechnology:
      type: string
      enum:
        - JAVA
        - CSHARP
        - NODEJS
        - PHP
        - OTHER
    SimpleContainer:
      type: object
      properties:
        namespace:
          type: string
        name:
          type: string
        ownerService:
          type: string
        type:
          $ref: '#/components/schemas/K8sContainer.ContainerType'
      description: >-
        A DTO class representing a @linkplain
        com.cobrick.aiops.topology.model.K8sContainer in a simplified form.
    SimpleService:
      required:
        - edge
        - name
        - namespace
        - status
        - statusChangeTime
        - technology
        - type
      type: object
      properties:
        namespace:
          type: string
        name:
          type: string
        type:
          type: string
        technology:
          $ref: '#/components/schemas/ServiceTechnology'
        edge:
          type: boolean
        status:
          $ref: '#/components/schemas/HealthStatus'
        statusChangeTime:
          type: string
          format: date-time
        deleted:
          type: boolean
      description: >-
        A DTO class representing a @linkplain
        com.cobrick.aiops.topology.model.Service in a simplified form.
    Topology:
      type: object
      description: >-
        A DTO class representing a topology, i.e. a @linkplain
        com.cobrick.aiops.topology.dto.SimpleService with its connections.
      allOf:
        - $ref: '#/components/schemas/SimpleService'
        - properties:
            connections:
              type: array
              items:
                $ref: '#/components/schemas/ServiceConnection'
