# SPDX-FileCopyrightText: 2025 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0

openapi: 3.0.3
info:
  title: Application Catalog Utilities API
  description: Application catalog service providing utility endpoints, not part of the autogenerated API
  version: 0.0.1alpha2
servers:
  - url: '{apiRoot}'
    variables:
      apiRoot:
        default: https://<multitenancy-gateway-host>
security:
  - BearerAuth: []
paths:
  /v3/projects/{projectName}/catalog/charts:
    get:
      description: Gets a list of registry chart names of chart versions.
      operationId: CatalogService_GetRegistryCharts
      parameters:
        - description: Names the HELM registry to be queried
          in: query
          name: registry
          schema:
            type: string
        - description: Optional name of the chart whose version list is desired.
          in: query
          name: chart
          schema:
            type: string
        - description: unique projectName for the resource
          in: path
          name: projectName
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  type: string
                maxItems: 100
                type: array
          description: OK
      summary: GetRegistryCharts
      tags:
        - CatalogService
  /v3/projects/{projectName}/catalog/deployment_packages/{deploymentPackageName}/versions/{version}/download:
    get:
      description: Gets a specific deployment package and downloads it as a tarball.
      operationId: CatalogService_DownloadDeploymentPackage
      parameters:
        - description: Name of the DeploymentPackage.
          in: path
          name: deploymentPackageName
          required: true
          schema:
            type: string
        - description: Version of the DeploymentPackage.
          in: path
          name: version
          required: true
          schema:
            type: string
        - description: unique projectName for the resource
          in: path
          name: projectName
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/octet-stream:
              schema:
                format: binary
                type: string
          description: OK
      summary: DownloadDeploymentPackage
      tags:
        - CatalogService
  /v3/projects/{projectName}/catalog/upload:
    post:
      description: Allows uploading of a YAML files containing various application catalog entities.
      operationId: CatalogService_BulkCatalogUpload
      parameters:
        - description: unique projectName for the resource
          in: path
          name: projectName
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                files:
                  items:
                    format: binary
                    type: string
                  maxItems: 100
                  type: array
              type: object
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  properties:
                    errorMessages:
                      items:
                        type: string
                      maxItems: 100
                      type: array
                    sessionID:
                      type: string
                    uploadNumber:
                      type: integer
                  type: object
                maxItems: 100
                type: array
          description: OK
      summary: BulkCatalogUpload
      tags:
        - CatalogService
components:
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http