openapi: 3.0.3
info:
  version: "2.19"
  title: Runai API
  license:
    name: Run:ai
    url: https://www.run.ai/eula
servers:
  - url: https://app.run.ai
security:
  - bearerAuth: []
tags:
  - name: Organizations
  - name: Authentication and Authorization
  - name: Audit
  - name: Datavolumes
  - name: Workloads
  - name: Workload assets
  - name: Policies
  - name: Clusters
    x-parent: Organizations
    description: Use these endpoints to create, manage and delete Run:ai Kubernetes clusters.
  - name: Departments
    x-parent: Organizations
    description: |
      Departments, in the hierarchy of resource allocation, are above Projects. A Department can contain multiple Projects, and has its own quotas. 
      A Department's quota supersedes the total of the Project quotas in the Department, so tt is recommended 
      that a Department's quota be the total, or more than of all the Project quotas in the Department. 
      For further information see, [Working with Departments](https://docs.run.ai/v2.19/admin/admin-ui-setup/department-setup/?h=departments#departments).
  - name: Reports
    x-parent: Organizations
  - name: NodePools
    x-parent: Organizations
    description: |
      Node pools assist in managing heterogeneous resources effectively. 
      A node pool is a set of nodes grouped into a bucket of resources using a predefined (for example, GPU-Type) or 
      administrator-defined label (for example, key & value). 
      For more information, see [Node Pools](https://docs.run.ai/v2.19/Researcher/scheduling/using-node-pools/#introduction).
  - name: Nodes
    x-parent: Organizations
    description: |
      Nodes are worker machines in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. 
      Each Node is managed by the Run:ai control plane. For more information, see [Nodes](https://docs.run.ai/v2.19/admin/runai-setup/config/node-roles/?h=nodes).
  - name: Projects
    x-parent: Organizations
    description: |
      Projects implement resource allocation policies and create segregation between 
      different initiatives. It can represent a team, an individual, or an initiative that 
      shares resources or has a specific resources budget (quota). 
      See [Projects](https://docs.run.ai/v2.19/admin/admin-ui-setup/project-setup/) 
      for more information.
  - name: Tenant
    x-parent: Organizations
    description: Manage tenant settings.
  - name: Logo
    x-parent: Organizations
    description: Use to manage tenant logo files.
  - name: Researcher Command Line Interface
    x-parent: Organizations
  - name: Administrator Command Line Interface
    x-parent: Organizations
    description: Information specific to the Administrator Command Line Interface.
  - name: Access rules
    x-parent: Authentication and Authorization
    description: |
      Access rules provide user authorization to system resources and entities.
      It is managed using Role-based access control (RBAC) which is a policy-neutral 
      access control mechanism defined around roles and privileges. 
      The components of RBAC make it simple to manage access to system resources and entities.
      For more information, see [Access control](https://docs.run.ai/v2.19/admin/runai-setup/access-control/rbac/#role-based-access-control).
  - name: Permissions
    x-parent: Authentication and Authorization
  - name: Applications
    x-parent: Authentication and Authorization
    description: Create and manage applications in the tenant.
  - name: Roles
    x-parent: Authentication and Authorization
    description: |
      A role is a group of permissions that can be granted. 
      Permissions are a set of actions that can be applied to entities.
      For more information, see [Roles](https://docs.run.ai/v2.19/admin/runai-setup/access-control/rbac/?h=roles#roles).
  - name: Tokens
    x-parent: Authentication and Authorization
    description: |
      Use tokens to facilitate authentication to the Run:ai API. 
      The API server must be configured to use the Run:ai identity 
      service to validate authentication tokens.
  - name: Users
    x-parent: Authentication and Authorization
  - name: Audit-API
    x-displayName: Audit
    x-parent: Audit
    description: The audit log provides audit trail information for user activity, changes to business objects and other important information. For more information, see [Audit log](https://docs.run.ai/v2.19/admin/runai-setup/maintenance/audit-log/?h=audit#introduction).
  - name: AuditLogs
    x-parent: Audit
    description: The audit log provides audit trail information for user activity, changes to business objects and other important information. For more information, see [Audit log](https://docs.run.ai/v2.19/admin/runai-setup/maintenance/audit-log/?h=audit#introduction).
  - name: Datavolumes-API
    x-displayName: Datavolumes
    x-parent: Datavolumes
  - name: Deployments
    x-parent: Workloads
    description: deployment related operations
  - name: Events
    x-parent: Workloads
    description: Workload events that occurred while the workload was running. Use to diagnose issue around workload scheduling.
  - name: Jobs
    x-parent: Workloads
    description: job related operations
  - name: Pods
    x-parent: Workloads
    description: Retrieve data about workload pods from your Run:ai platform.
  - name: Workloads-API
    x-displayName: Workloads
    x-parent: Workloads
    description: |
      Workloads are trainings, workspaces, and deployments that are fully controlled by Run:ai. Workloads can be native, third party integrations, and typical Kubernetes workload types.
      For more information, see [Workloads overview](https://docs.run.ai/v2.19/admin/workloads/?h=workloads).
  - name: Workspaces
    x-parent: Workloads
    description: |
      A Workspace is a simplified tool for researchers to conduct experiments, build AI models, access standard MLOps tools, and collaborate with their peers.
      Workspaces abstract complex concepts related to running containerized workloads in a Kubernetes environment and are built from predefined setups that include
      networking, storage, secrets and other resources. All the setup and configurations for research, including container 
      images, data sets, resource requests, as well as all tools are included. for the research, in a single place. 
      It answers the research needs while ensuring infrastructure owners keep control and allocation efficiency.
      A workspace is associated with a specific Run:ai project and you can have multiple workspaces under a specific project. 
      For more information, see [Workspaces](https://docs.run.ai/v2.19/Researcher/user-interface/workspaces/overview/).
  - name: Trainings
    x-parent: Workloads
    description: |
      Trainings are dedicated workloads that are specifically used for training models. 
      They are by design preemptible workloads because they are used in unattended sessions where the  
      scientists and researchers do not need to be present. These workloads are allowed to utilize 
      resources over the project's quota.      
  - name: Inferences
    x-parent: Workloads
    description: Use to retrieve metrics for inference workloads and pods.
  - name: Distributed
    x-parent: Workloads
    description: |
      Distributed Training, is the ability to split the training of a model among multiple processors. 
      It is often a necessity when multi-GPU training no longer applies; 
      typically when you require more GPUs than exist on a single node. 
      Each such split is a pod (see definition above). Run:ai spawns an additional launcher process that manages and 
      coordinates the other worker pods. For more information, see [Distributed training](https://docs.run.ai/v2.19/Researcher/scheduling/the-runai-scheduler/?h=distributed+training#distributed-training).
  - name: Workloads batch
    x-parent: Workloads
  - name: Compute
    x-parent: Workload assets
    description: |
      A compute resource is a building block that represents compute resources such as GPUs, CPU cores, and CPU memory.
      The compute resources may consist of multiple physical resources, for example, 0.5 GPU, 8 cores and 200 Megabytes of CPU memory. 
      A compute resource is available to a scope and and all of the organizational units within that scope. 
            
      For more information, see [Compute resource](https://docs.run.ai/v2.19/Researcher/user-interface/workspaces/blocks/compute/?h=compute#compute-resource-introduction).
  - name: Credentials
    x-parent: Workload assets
    description: Credentials are used to unlock protected resources such as applications, containers, and other assets. For more information, see [Credentials](https://docs.run.ai/v2.19/admin/admin-ui-setup/credentials-setup/?h=creden#credentials).
  - name: Datasources
    x-parent: Workload assets
    description: Data source assets.
  - name: Environment
    x-parent: Workload assets
    description: |
      An environment resource designates the container image, the image pull policy, working directory, security parameters, and others. 
      It exposes all the necessary tools (open source, 3rd party, or custom tools) along 
      with their connection interfaces including external node port and the container ports.
      You can also specify a standard, distributed, or inference workload architecture for the environment.
      An environment is a mandatory building block for the creation of a workload.
      For more information, see [Environments](https://docs.run.ai/v2.19/Researcher/user-interface/workspaces/blocks/environments/?h=environ#environment-introduction).
  - name: Storage Classes
    x-parent: Workload assets
    description: storage class related operations
  - name: Git
    x-parent: Workload assets
    description: Use Git as a data source location for data sets that are relevant to the workload being submitted.
  - name: HostPath
    x-parent: Workload assets
    description: Use a HostPath as a data source location for data sets that are relevant to the workload being submitted.
  - name: NFS
    x-parent: Workload assets
    description: Use NFS as a data source location for data sets that are relevant to the workload being submitted.
  - name: PVC
    x-parent: Workload assets
    description: Use a PVC as a data source location for data sets that are relevant to the workload being submitted.
  - name: Registry
    x-parent: Workload assets
    description: Use an images registry to enable the listting of repositories and tags that can be used as a data source location for data sets that are relevant to the workload being submitted.
  - name: S3
    x-parent: Workload assets
    description: Use an S3 simple storage service as a data source location for data sets that are relevant to the workload being submitted.
  - name: ConfigMap
    x-parent: Workload assets
    description: Use a ConfigMap as a data source location for data sets that are relevant to the workload being submitted.
  - name: Secret
    x-parent: Workload assets
  - name: Template
    x-parent: Workload assets
    description: Templates are a pre-set configuration used to quickly configure and submit workloads using existing assets.
  - name: Policy
    x-parent: Policies
    description: |
      Policies allow administrators to impose restrictions and set default values for researcher workloads. 
      Restrictions and default values can be placed on CPUs, GPUs, and other resources or entities. 
      For more information, see [Policies](https://docs.run.ai/v2.19/admin/workloads/policies/#introduction).
  - name: Workspace
    description: Specification for workspaces.
  - name: Training
    description: Specification for trainings.
  - name: Inference
    description: Specification for inferences.
  - name: Workload
    description: Specification for workloads.
  - name: Synchronization
    description: Internal interface for synchronizing assets between the clusters and the control plane.

paths:
  /api/v1/clusters/{clusterUuid}/nodes:
    get:
      summary: Get a list of nodes.
      description: Retrieve a list of nodes from the Kubernetes cluster.
      operationId: get_nodes
      tags:
        - Nodes
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/QueryNodeName'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Nodes'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/clusters:
    get:
      summary: Get a list of clusters.
      description: Retrieve a list of clusters with details.
      operationId: get_clusters
      tags:
        - Clusters
      parameters:
        - $ref: '#/components/parameters/QueryVerbosity'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DisplayedCluster'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create a cluster.
      description: Use to create a Kubernetes cluster.
      operationId: create_cluster
      tags:
        - Clusters
      requestBody:
        description: The cluster to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClusterCreationRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisplayedCluster'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/clusters/{clusterUuid}:
    get:
      summary: Get cluster by id.
      description: Retrieve cluster details by Universally Unique Identifier (UUID).
      operationId: get_cluster_by_uuid
      tags:
        - Clusters
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/QueryVerbosity'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisplayedCluster'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a cluster by id.
      description: |
        Use to delete a cluster by Universally Unique Identifier (UUID). 
        Will return 202 for success if this api was called on a cluster that its version is >=2.20, 
        and force query param is false or not provided.
        Will return 204 for success if force query param is true, or if cluster is in a version < 2.20
      operationId: delete_cluster
      tags:
        - Clusters
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/QueryForceDelete'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '204':
          $ref: '#/components/responses/204NoContent'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update a cluster by id.
      description: Use to update the details of a Kubernetes cluster by Universally Unique Identifier (UUID).
      operationId: updateCluster
      tags:
        - Clusters
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
      requestBody:
        description: The cluster details to update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClusterUpdateRequest'
      responses:
        '204':
          $ref: '#/components/responses/204NoContent'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/clusters/{clusterUuid}/metrics:
    get:
      summary: Get the cluster metrics data.
      description: Retrieve the metrics data for a Kubernetes cluster by Universally Unique Identifier (UUID).
      operationId: get_cluster_metrics
      tags:
        - Clusters
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/StartRequired'
        - $ref: '#/components/parameters/EndRequired'
        - $ref: '#/components/parameters/NumberOfSamples'
        - $ref: '#/components/parameters/MetricsType'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
            text/csv: {}
        '207':
          description: Partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/clusters/{clusterUuid}/nodepools/{nodepoolName}/metrics:
    get:
      summary: Get the node pool metrics data. [Experimental]
      description: Retrieve the node pool metrics data by Universally Unique Identifier (UUID).
      operationId: get_nodepool_metrics
      tags:
        - NodePools
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/NodepoolPath'
        - $ref: '#/components/parameters/StartRequired'
        - $ref: '#/components/parameters/EndRequired'
        - $ref: '#/components/parameters/NumberOfSamples'
        - $ref: '#/components/parameters/MetricsType'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
            text/csv: {}
        '207':
          description: Partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/node-pools:
    post:
      summary: Create nodepool
      operationId: create_nodepool
      description: Create nodepool
      tags:
        - NodePools
      requestBody:
        description: Nodepool to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NodepoolCreateFields'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Nodepool'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get nodepools
      operationId: get_nodepools
      description: Get nodepools
      tags:
        - NodePools
      parameters:
        - $ref: '#/components/parameters/NodepoolsFilterBy'
        - $ref: '#/components/parameters/NodepoolsSortBy'
        - $ref: '#/components/parameters/SortOrder'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  nodepools:
                    type: array
                    items:
                      $ref: '#/components/schemas/Nodepool'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/node-pools/{nodepoolId}:
    delete:
      summary: Delete nodepool
      operationId: delete_nodepool
      description: Delete nodepool
      tags:
        - NodePools
      parameters:
        - $ref: '#/components/parameters/NodepoolId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '204':
          $ref: '#/components/responses/204NoContent'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update nodepool
      operationId: update_nodepool
      description: Update nodepool
      tags:
        - NodePools
      parameters:
        - $ref: '#/components/parameters/NodepoolId'
      requestBody:
        description: Nodepool to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NodepoolUpdateFields'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Nodepool'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    patch:
      summary: Patch nodepool fields
      operationId: patch_nodepool
      description: Update only specific fields of a nodepool
      tags:
        - NodePools
      parameters:
        - $ref: '#/components/parameters/NodepoolId'
      requestBody:
        description: Fields to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NodepoolUpdateFields'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Nodepool'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get nodepool
      operationId: get_nodepool
      description: Get nodepool
      tags:
        - NodePools
      parameters:
        - $ref: '#/components/parameters/NodepoolId'
      responses:
        '200':
          description: Requested nodepool
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Nodepool'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/clusters/{clusterUuid}/cluster-install-info:
    get:
      summary: Retrieve the installation instructions of a cluster by ID.
      description: |
        Use to retrieve installation instruction for a cluster by Universally Unique Identifier (UUID). 
        Supports clusters version 2.15 or above.
      operationId: get_cluster_install_info_by_uuid
      tags:
        - Clusters
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/ClusterVersion'
        - $ref: '#/components/parameters/ClusterRemoteURL'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClusterInstallationInfoResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/nodes/telemetry:
    get:
      summary: Get node telemetry data.
      description: Retrieve node telemetry data for use in analysis applications.
      operationId: get_node_telemetry
      tags:
        - Nodes
      parameters:
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/FilterByNodepoolName'
        - $ref: '#/components/parameters/TelemetryGroupBy'
        - $ref: '#/components/parameters/TelemetryType'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelemetryResponse'
            text/csv: {}
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/nodes/{nodeId}/metrics:
    get:
      summary: Get the node metrics data. [Experimental]
      description: Retrieve the node metrics data by Universally Unique Identifier (UUID).
      operationId: get_node_metrics
      tags:
        - Nodes
      parameters:
        - $ref: '#/components/parameters/NodeId'
        - $ref: '#/components/parameters/NodeMetricTypes'
        - $ref: '#/components/parameters/StartRequired'
        - $ref: '#/components/parameters/EndRequired'
        - $ref: '#/components/parameters/NumberOfSamples'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
            text/csv: {}
        '207':
          description: Partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/reports:
    post:
      summary: Create a new report request.
      operationId: create_report
      tags:
        - Reports
      requestBody:
        description: Report to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReportRequestFields'
      responses:
        '202':
          description: Accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Report'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/reports/{reportId}:
    get:
      summary: Get report
      operationId: get_report_by_id
      parameters:
        - $ref: '#/components/parameters/ReportId'
      tags:
        - Reports
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Report'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete report
      operationId: delete_report_by_id
      parameters:
        - $ref: '#/components/parameters/ReportId'
      tags:
        - Reports
      responses:
        '204':
          $ref: '#/components/responses/204NoContent'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/reports/{reportId}/file:
    get:
      summary: Download report
      operationId: download_report_by_id
      parameters:
        - $ref: '#/components/parameters/ReportId'
      tags:
        - Reports
      responses:
        '200':
          description: Executed successfully.
          content:
            text/csv: {}
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/departments:
    post:
      summary: Create department
      operationId: create_department
      description: Create Department
      tags:
        - Departments
      requestBody:
        description: Department to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepartmentCreationRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Department'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get departments
      operationId: get_departments
      description: list departments
      tags:
        - Departments
      parameters:
        - $ref: '#/components/parameters/DepartmentsFilterBy'
        - $ref: '#/components/parameters/DepartmentsSortBy'
        - $ref: '#/components/parameters/DepartmentsVerbosity'
        - $ref: '#/components/parameters/SortOrder'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                required:
                  - departments
                properties:
                  departments:
                    type: array
                    items:
                      $ref: '#/components/schemas/DepartmentForList'
                  next:
                    type: integer
                    example: 1
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/departments/{departmentId}:
    put:
      summary: Update department
      operationId: update_department
      description: Update department by Id
      tags:
        - Departments
      parameters:
        - $ref: '#/components/parameters/DepartmentId'
      requestBody:
        description: Department to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepartmentUpdateRequest'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Department'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get department
      operationId: get_department
      description: Get department by Id
      tags:
        - Departments
      parameters:
        - $ref: '#/components/parameters/DepartmentId'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Department'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete department
      operationId: delete_department
      description: Delete department by Id
      tags:
        - Departments
      parameters:
        - $ref: '#/components/parameters/DepartmentId'
      responses:
        '204':
          description: Deleted
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/departments/{departmentId}/resources:
    put:
      summary: Update department resources
      operationId: update_department_resources
      description: Update department resources by Id
      tags:
        - Departments
      parameters:
        - $ref: '#/components/parameters/DepartmentId'
      requestBody:
        description: Department resources to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourcesUpdateRequest'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Resources'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    patch:
      summary: Patch department resources
      operationId: patch_department_resources
      description: Partial updates to specific items in the list. Should be used for update one or more attributes of an item without modifying the entire resource.
      tags:
        - Departments
      parameters:
        - $ref: '#/components/parameters/DepartmentId'
      requestBody:
        description: Department resources to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourcesUpdateRequest'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Resources'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/departments/count:
    get:
      summary: Count departments
      operationId: count_departments
      description: count departments
      tags:
        - Departments
      parameters:
        - $ref: '#/components/parameters/DepartmentsFilterBy'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                properties:
                  count:
                    type: integer
                    format: int64
                    example: 1
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/projects:
    post:
      summary: Create project
      operationId: create_project
      description: Create a project
      tags:
        - Projects
      requestBody:
        description: Project to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectCreationRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get projects
      operationId: get_projects
      description: List projects
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectsFilterBy'
        - $ref: '#/components/parameters/ProjectsSortBy'
        - $ref: '#/components/parameters/SortOrder'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                required:
                  - projects
                properties:
                  projects:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/Project'
                        - required:
                            - id
                            - name
                            - status
                            - phase
                            - createdAt
                            - updatedAt
                  next:
                    type: integer
                    example: 1
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/projects/{projectId}:
    put:
      summary: Update project
      operationId: update_project
      description: Get projects telemetry data by the given query parameters
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectId'
      requestBody:
        description: Project to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectUpdateRequest'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get project
      operationId: get_project
      description: Get a project by id
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectId'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete project
      operationId: delete_project
      description: Delete a project
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectId'
      responses:
        '204':
          description: Deleted
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/projects/{projectId}/resources:
    put:
      summary: Update project resources
      operationId: update_project_resources
      description: Update projects resources
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectId'
      requestBody:
        description: Project resources to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourcesUpdateRequest'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Resources'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    patch:
      summary: Patch project resources
      operationId: patch_project_resources
      description: Partial updates to specific items in the list. Should be used for update one or more attributes of an item without modifying the entire resource.
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectId'
      requestBody:
        description: Project resources to patch.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourcesUpdateRequest'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Resources'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/org-unit/projects/count:
    get:
      summary: Count projects
      operationId: count_projects
      description: count projects
      tags:
        - Projects
      parameters:
        - $ref: '#/components/parameters/ProjectsFilterBy'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                properties:
                  count:
                    type: integer
                    format: int64
                    example: 1
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/clusters/{uuid}/pods:
    parameters:
      - $ref: '#/components/parameters/uuid'
    get:
      deprecated: true
      summary: get all pods from a specific cluster. Deprecated - please use api/v1/workloads/pods instead
      operationId: getPods
      tags:
        - Pods
      responses:
        '200':
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pods'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/k8s/clusters/{uuid}/deployments:
    parameters:
      - $ref: '#/components/parameters/uuid'
    get:
      tags:
        - Deployments
      summary: List deployments
      deprecated: true
      operationId: getDeployments
      responses:
        '200':
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployments'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/k8s/clusters/{uuid}/deployments/count:
    parameters:
      - $ref: '#/components/parameters/uuid'
  /v1/k8s/clusters/{uuid}/deployments/deleted:
    parameters:
      - $ref: '#/components/parameters/uuid'
  /v1/k8s/clusters/{uuid}/deployments/deleted/count:
    parameters:
      - $ref: '#/components/parameters/uuid'
  /v1/k8s/clusters/{uuid}/deployments/{deploymentId}:
    parameters:
      - $ref: '#/components/parameters/uuid'
      - $ref: '#/components/parameters/deploymentId'
    get:
      tags:
        - Deployments
      summary: Get a deployment by id
      deprecated: true
      operationId: getDeployment
      responses:
        '200':
          description: A deployment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /v1/k8s/clusters/{uuid}/deployments/{deploymentId}/pods:
    parameters:
      - $ref: '#/components/parameters/uuid'
      - $ref: '#/components/parameters/deploymentId'
  /v1/k8s/clusters/{uuid}/jobs:
    parameters:
      - $ref: '#/components/parameters/uuid'
    get:
      deprecated: true
      summary: List all Jobs in the cluster. Deprecated - please use api/v1/workloads instead
      parameters:
        - name: nodeId
          in: query
          required: false
          schema:
            type: string
          description: Unique identifier of the node.
        - name: filter
          in: query
          required: false
          schema:
            type: string
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
          description: Order of the results.
        - name: sortDirection
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
        - name: from
          in: query
          required: false
          schema:
            type: number
          description: Start the response from a given number of result. Used along with 'limit' to retrieve the results paginated.
        - name: limit
          in: query
          required: false
          schema:
            type: number
          description: Limit the response to a given number of results.
        - name: includeDeleted
          in: query
          required: false
          schema:
            type: boolean
            default: true
          description: True to include deleted jobs in the result.
      operationId: listJobs
      tags:
        - Jobs
      responses:
        '200':
          description: An array of Jobs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisplayedJobs'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /v1/k8s/clusters/{uuid}/jobs/count:
    parameters:
      - $ref: '#/components/parameters/uuid'
      - name: nodeId
        in: query
        required: false
        schema:
          type: string
        description: Unique identifier of the node.
      - name: filter
        in: query
        required: false
        schema:
          type: string
    get:
      deprecated: true
      summary: Return the number all Jobs in the cluster. Deprecated - please use api/v1/workloads/count instead
      operationId: getClusterJobsCount
      tags:
        - Jobs
      responses:
        '200':
          description: The job count
          content:
            application/json:
              schema:
                type: number
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /v1/k8s/clusters/{uuid}/jobs/{jobId}/pods:
    parameters:
      - $ref: '#/components/parameters/jobId'
      - $ref: '#/components/parameters/uuid'
      - name: id
        in: query
        description: id
        required: false
        schema:
          type: string
      - name: podId
        in: query
        description: Unique identifier of the pod.
        required: false
        schema:
          type: string
      - name: podGroupId
        in: query
        description: Identifier of the pod group.
        required: false
        schema:
          type: string
      - name: nodeID
        in: query
        required: false
        schema:
          type: string
        description: Unique identifier of the node.
      - name: name
        in: query
        required: false
        schema:
          type: string
        description: The name of the job.
      - name: status
        in: query
        required: false
        schema:
          type: string
        description: The status of the job.
    get:
      deprecated: true
      summary: Get all pods that are associated for a specific job. Deprecated - please use api/v1/workloads/{workloadId}/pods instead
      operationId: getPodsByJobId
      tags:
        - Jobs
      responses:
        '200':
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pods'
        '401':
          $ref: '#/components/responses/Unauthorized'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/k8s/clusters/{uuid}:
    parameters:
      - name: uuid
        in: path
        required: true
        description: Unique identifier of the cluster.
        schema:
          type: string
          format: uuid
  /v1/k8s/clusters/{cluster_uuid}/installfile:
    get:
      tags:
        - Clusters
      summary: Get cluster installation file by id.
      description: |
        Retrieve the installation values file of a cluster by Retrieve the installation values file of a given cluster by ID. 
        Supports clusters 2.13 and lower.
      operationId: getInstallFile
      parameters:
        - name: cluster_uuid
          in: path
          required: true
          description: Unique identifier of the cluster.
          schema:
            type: string
            format: uuid
        - in: query
          name: cloud
          description: Cloud type identifier.
          schema:
            type: string
            enum:
              - gke
              - aws
              - aks
              - op
              - airgapped
              - openshift
        - in: query
          name: clusterip
          description: Comma-separated list of IP addresses that provide access to the cluster.
          schema:
            type: string
        - in: query
          name: format
          description: Format of the output file.
          schema:
            type: string
            enum:
              - json
              - yaml
            default: yaml
      responses:
        '200':
          $ref: '#/components/responses/OK'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /v1/k8s/clusters/{clusterId}/node-pools:
    get:
      tags:
        - NodePools
      summary: Get the cluster's Node Pools.
      description: Retrieve all the node pools with details from the cluster by Universally Unique Identifier (UUID). Deprecated, please use /api/v1/node-pools instead.
      deprecated: true
      operationId: getNodePools
      parameters:
        - name: clusterId
          in: path
          description: Unique identifier of the cluster
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Node pools returned successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NodePool1'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - NodePools
      summary: Create a Node Pool.
      description: Use to create a node pool in a cluster by Universally Unique Identifier (UUID). Deprecated, please use /api/v1/node-pools instead.
      deprecated: true
      operationId: createNodePool
      parameters:
        - name: clusterId
          in: path
          description: Unique identifier of the cluster
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NodePoolCreateRequest'
      responses:
        '201':
          description: Created
        '400':
          $ref: '#/components/responses/BadRequest'
        '409':
          $ref: '#/components/responses/Conflict'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/k8s/clusters/{clusterId}/node-pools/{id}/labels:
    put:
      tags:
        - NodePools
      summary: Update labels of a Node Pool.
      description: Use to update the labels of a node pool. Deprecated, please use PATCH /api/v1/node-pools/{id} instead.
      deprecated: true
      operationId: updateNodePoolLabels
      parameters:
        - name: clusterId
          in: path
          description: Unique identifier of the cluster
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
        - in: path
          name: id
          schema:
            type: integer
          required: true
          description: The unique id identifying the Node Pool.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NodePoolLabelsRequest'
        required: true
      responses:
        '202':
          description: Node Pool update accepted.
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /v1/k8s/clusters/{clusterId}/node-pools/{id}:
    delete:
      tags:
        - NodePools
      summary: Delete a Node Pool by id.§
      description: Use to delete a node pool by Universally Unique Identifier (UUID). Deprecated, please use /api/v1/node-pools/{id} instead.
      deprecated: true
      operationId: deleteNodePool
      parameters:
        - name: clusterId
          in: path
          description: Unique identifier of the cluster
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
        - in: path
          name: id
          schema:
            type: integer
          required: true
          description: The unique id identifying the Node Pool.
      responses:
        '202':
          description: Node Pool deletion accepted
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
    put:
      tags:
        - NodePools
      summary: Update a Node Pool.
      description: Use to update the details of a node pool by Universally Unique Identifier (UUID). Deprecated, please use PATCH /api/v1/node-pools/{id} instead.
      deprecated: true
      operationId: updateNodePool
      parameters:
        - name: clusterId
          in: path
          description: Unique identifier of the cluster
          required: true
          style: simple
          explode: false
          schema:
            type: string
            format: uuid
        - in: path
          name: id
          schema:
            type: integer
          required: true
          description: The unique id identifying the Node Pool.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNodePoolRequest'
        required: true
      responses:
        '202':
          description: Node Pool update accepted.
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /v1/k8s/users:
    get:
      operationId: getUsers
      deprecated: true
      tags:
        - Users
      summary: Get users list.
      description: Return the list of users of the tenant.
      parameters:
        - $ref: '#/components/parameters/Roles'
        - $ref: '#/components/parameters/CreatedByMe'
        - $ref: '#/components/parameters/UserType'
      responses:
        '200':
          description: The complete set of permissions.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User1'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      operationId: createUser
      deprecated: true
      tags:
        - Users
      summary: Create a new user.
      description: Create a new user and assign it with a password. It is possible to force the user to change the password upon next login by setting needToChangePassword to true. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users instead.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreationRequest'
      responses:
        '200':
          description: The complete set of permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserCreationResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/users/{userId}:
    get:
      operationId: getUserById
      deprecated: true
      tags:
        - Users
      summary: Get user details.
      description: Get the details of a given user. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.
      parameters:
        - in: path
          required: true
          name: userId
          schema:
            $ref: '#/components/schemas/UserId'
      responses:
        '200':
          description: User details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User1'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      operationId: updateUserById
      deprecated: true
      tags:
        - Users
      summary: Update user details.
      description: Update the details of a given user. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.
      parameters:
        - in: path
          name: userId
          required: true
          schema:
            $ref: '#/components/schemas/UserId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User1'
      responses:
        '200':
          description: User updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User1'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      operationId: deleteUserById
      deprecated: true
      tags:
        - Users
      summary: Delete a user.
      description: Delete the given user from the tenant. This endpoint requires ADMIN role. Deprecated endpoint. Use the new endpoint api/v1/users/{userId} instead.
      parameters:
        - in: path
          name: userId
          required: true
          schema:
            $ref: '#/components/schemas/UserId'
        - $ref: '#/components/parameters/UserType'
      responses:
        '200':
          description: User deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/users/roles:
    get:
      operationId: getRoles
      deprecated: true
      tags:
        - Users
      summary: Get all possible permissions.
      description: Get the complete set of permissions that a tenant can grant to users and applications. Deprecated endpoint. please refer to Roles & Access rules API.
      responses:
        '200':
          description: The complete set of permissions.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Role'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/users/{userId}/roles:
    get:
      operationId: getUserRoles
      deprecated: true
      tags:
        - Users
      summary: Get user permissions.
      description: Return the set of permissions granted to a given user. Deprecated endpoint. please reffer to Roles & Access rules API.
      parameters:
        - in: path
          required: true
          name: userId
          schema:
            $ref: '#/components/schemas/UserId'
      responses:
        '200':
          description: A set of permissions that the user is granted.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Role'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/apps:
    get:
      operationId: getApplications
      deprecated: true
      tags:
        - Applications
      summary: Get Apps list.
      description: Return the list of apps of the tenant. Deprecated in favor of the new endpoint api/v1/apps.
      parameters:
        - $ref: '#/components/parameters/Roles'
        - $ref: '#/components/parameters/CreatedByMe'
      responses:
        '200':
          description: The complete set of permissions.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/App'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      operationId: createApplication
      deprecated: true
      tags:
        - Applications
      summary: Create a new app.
      description: Create a new app and assign it with a client secret. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/App'
      responses:
        '200':
          description: The complete set of permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/apps/{clientId}:
    get:
      operationId: getApplicationById
      deprecated: true
      tags:
        - Applications
      summary: Get app details.
      description: Get the details of a given app. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}.
      parameters:
        - in: path
          required: true
          name: clientId
          schema:
            $ref: '#/components/schemas/ClientId'
      responses:
        '200':
          description: App details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      operationId: updateApplicationById
      deprecated: true
      tags:
        - Applications
      summary: Update app details.
      description: Update the details of a given app. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}.
      parameters:
        - in: path
          required: true
          name: clientId
          schema:
            $ref: '#/components/schemas/ClientId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/App'
      responses:
        '200':
          description: User updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      operationId: deleteApplicationById
      deprecated: true
      tags:
        - Applications
      summary: Delete a App.
      description: Delete the given app from the tenant. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}.
      parameters:
        - in: path
          required: true
          name: clientId
          schema:
            $ref: '#/components/schemas/ClientId'
      responses:
        '200':
          description: User deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/apps/{clientId}/secret:
    post:
      operationId: resetAppSecret
      deprecated: true
      tags:
        - Applications
      summary: Re-generate secret of application.
      description: Generate a new secret for a given application. This endpoint requires ADMIN role. Deprecated in favor of the new endpoint api/v1/apps/{clientId}/secret.
      parameters:
        - in: path
          required: true
          name: clientId
          schema:
            $ref: '#/components/schemas/ClientId'
      responses:
        '200':
          description: The secret generated succefully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/audit:
    get:
      operationId: getAuditLogs
      tags:
        - Audit-API
      summary: Get audit logs.
      deprecated: true
      description: Retrieve audit logs using the query parameters.
      parameters:
        - in: query
          name: start
          schema:
            type: string
            format: date-time
          required: false
          description: Starting date for audit logs retrieval. format yyyy-MM-dd for date yyyy-MM-ddTHH:mm:ss for date-time.
          example: '2022-06-07T09:01:02'
        - in: query
          name: end
          schema:
            type: string
            format: date-time
          required: false
          description: Ending date for audit logs retrieval. format yyyy-MM-dd for date yyyy-MM-ddTHH:mm:ss for date-time.
          example: '2022-06-07T09:01:02'
        - in: query
          name: cluster_uuid
          schema:
            type: string
          required: false
          description: The cluster uuid of the logged operation (for cluster related operations)
          example: 123e4567-e89b-12d3-a456-426614174000
        - in: query
          name: action
          schema:
            type: string
          required: false
          description: The action of the logged operation.
          example: Create
        - in: query
          name: source_type
          schema:
            type: string
          required: false
          description: The type of the source of the action.
          example: User
        - in: query
          name: source_id
          schema:
            type: string
          required: false
          description: The id of the source of the action.
          example: 96a4382e-afa5-4604-9eb1-c3071aa021fc
        - in: query
          name: source_name
          schema:
            type: string
          required: false
          description: The name of the source of the action.
          example: test@run.ai
        - in: query
          name: entity_type
          schema:
            type: string
          required: false
          description: The type of the action related entity.
          example: Department
        - in: query
          name: entity_id
          schema:
            type: string
          required: false
          description: The id of the action related entity.
          example: 51
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
        - in: query
          name: success
          schema:
            type: string
          required: false
          description: enter true for success audits and false for failures (leave blank for all)
          example: true
        - in: query
          name: download
          schema:
            type: string
          required: false
          description: enter true to download the logs into logs.json file
          example: true
      responses:
        '200':
          description: Filtered audit logs returned successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AuditLogRecord'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/setting:
    get:
      operationId: getTenantSettings
      tags:
        - Tenant
      summary: Get all tenant settings.
      description: Retrieve all tenant settings.
      responses:
        '200':
          description: The complete set of tenant settings.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Setting'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      operationId: updateTenantSetting
      tags:
        - Tenant
      summary: Update a tenant setting.
      description: Use to update tenant settings.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantSettingCreationRequest'
      responses:
        '200':
          description: The updated tenant setting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantSettingCreationResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/setting/{settingKey}:
    get:
      operationId: getTenantSettingsByKey
      tags:
        - Tenant
      summary: Get a tenant setting by key.
      description: Retrieve a specific tenant setting by key.
      parameters:
        - in: path
          name: settingKey
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The requested setting.
          content:
            application/json:
              schema:
                description: A boolean value that indicates if the requested setting is enabled.
                type: boolean
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/groups:
    get:
      operationId: getGroups
      deprecated: true
      tags:
        - Users
      summary: Get groups list.
      description: Return the list of groups of the tenant. Deprecated endpoint. please reffer to Roles & Access rules API.
      parameters:
        - $ref: '#/components/parameters/Roles'
        - $ref: '#/components/parameters/CreatedByMe'
      responses:
        '200':
          description: The complete set of permissions.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Group'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      operationId: createGroup
      deprecated: true
      tags:
        - Users
      summary: Create a new group.
      description: Create a new group and assign it with roles. Deprecated endpoint. please reffer to Roles & Access rules API.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupCreationRequest'
      responses:
        '200':
          description: The complete set of permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupCreationResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/groups/{groupName}:
    get:
      operationId: geGroupByName
      deprecated: true
      tags:
        - Users
      summary: Get group details.
      description: Get the details of a given group. This endpoint requires ADMIN, EDITOR or VIEWER role. Deprecated endpoint. please reffer to Roles & Access rules API.
      parameters:
        - $ref: '#/components/parameters/GroupName'
      responses:
        '200':
          description: Group details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      operationId: updateGroupByName
      deprecated: true
      tags:
        - Users
      summary: Update group details.
      description: Update the details of a given group. This endpoint requires ADMIN role. Deprecated endpoint. please reffer to Roles & Access rules API.
      parameters:
        - $ref: '#/components/parameters/GroupName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupWithName'
      responses:
        '200':
          description: Group updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Group'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      operationId: deleteGroupByName
      deprecated: true
      tags:
        - Users
      summary: Delete a group.
      description: Delete the given group from the tenant. This endpoint requires ADMIN role. Deprecated endpoint. please reffer to Roles & Access rules API.
      parameters:
        - $ref: '#/components/parameters/GroupName'
      responses:
        '200':
          description: Group deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/clusters/{clusterUuid}/metrics:
    get:
      tags:
        - Clusters
      summary: Get cluster metrics.
      operationId: getClusterMetrics
      deprecated: true
      description: Get current cluster metrics. If time range query parameters supplied, then historical data will be returned as well. Deprecated - please use api/v1/clusters/{clusterUuid}/metrics
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/Start'
        - $ref: '#/components/parameters/End'
        - $ref: '#/components/parameters/NumberOfSamples'
        - $ref: '#/components/parameters/NodepoolName'
      responses:
        '200':
          description: A Clusters metrics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cluster'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/clusters/{clusterUuid}/departments/metrics:
    get:
      tags:
        - Departments
      deprecated: true
      summary: Get metrics for all departments.
      operationId: getDepartmentsMetrics
      description: |
        Get metrics for all departments in the cluster. Use a time range to return historical data (optional). 
        If you use a `start` date, an `end` date is required.
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/Start'
        - $ref: '#/components/parameters/End'
        - $ref: '#/components/parameters/NumberOfSamples'
        - $ref: '#/components/parameters/NodepoolName'
      responses:
        '200':
          description: Successfully retrieved metrics for all departments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/departments'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/clusters/{clusterUuid}/departments/{departmentId}/metrics:
    get:
      tags:
        - Departments
      deprecated: true
      summary: Get metrics for a specific department.
      operationId: getDepartmentMetrics
      description: |
        Get metrics for a specific department in the cluster. 
        Use a time range to return historical data (optional). If you use a `start` date, an `end` date is required.
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/DepartmentId'
        - $ref: '#/components/parameters/Start'
        - $ref: '#/components/parameters/End'
        - $ref: '#/components/parameters/NumberOfSamples'
        - $ref: '#/components/parameters/NodepoolName'
      responses:
        '200':
          description: Successfully retrieved metrics for the department.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/department'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/clusters/{clusterUuid}/projects/metrics:
    get:
      tags:
        - Projects
      deprecated: true
      summary: Get metrics data for all projects.
      operationId: getProjectsMetrics
      description: Retrieves data from the metrics database. \n Use in reporting and analysis tools. \n Use a time range to return historical data (optional). If you use a `start` date, an `end` date is required.
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/Start'
        - $ref: '#/components/parameters/End'
        - $ref: '#/components/parameters/NumberOfSamples'
        - $ref: '#/components/parameters/NodepoolName'
      responses:
        '200':
          description: Successfully retrieved metrics for all projects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/projects'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/clusters/{clusterUuid}/projects/{projectId}/metrics:
    get:
      tags:
        - Projects
      deprecated: true
      summary: Get metrics data for a specific project.
      operationId: getProjectMetrics
      description: Retrieves data from the metrics database. \n Use in reporting and analysis tools. \n Use a time range to return historical data (optional). If you use a `start` date, an `end` date is required.
      parameters:
        - $ref: '#/components/parameters/ClusterUuid'
        - $ref: '#/components/parameters/ProjectId1'
        - $ref: '#/components/parameters/Start'
        - $ref: '#/components/parameters/End'
        - $ref: '#/components/parameters/NumberOfSamples'
        - $ref: '#/components/parameters/NodepoolName'
      responses:
        '200':
          description: Successfully retrieved metrics for the project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/project'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/admin-cli/{os}:
    parameters:
      - $ref: '#/components/parameters/os'
    get:
      summary: Get Administrator Command Line Interface release.
      description: Retrieve the Administrator Command Line Interface version.
      operationId: getAdminCLIRelease
      tags:
        - Administrator Command Line Interface
      responses:
        '200':
          $ref: '#/components/responses/CLIReleaseResponse'
        '400':
          $ref: '#/components/responses/BadRequest1'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /v1/k8s/admin-cli/{os}/checksum:
    parameters:
      - $ref: '#/components/parameters/os'
    get:
      summary: Get Administrator Command Line Interface release details.
      description: Retrieve the details of the Administrator Command Line Interface release.
      operationId: getAdminCLIReleaseChecksum
      tags:
        - Administrator Command Line Interface
      responses:
        '200':
          $ref: '#/components/responses/ChecksumResponse'
        '400':
          $ref: '#/components/responses/BadRequest1'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /v1/k8s/admin-cli/{version}/{os}:
    parameters:
      - $ref: '#/components/parameters/os'
      - $ref: '#/components/parameters/version'
    get:
      summary: Get Administrator Command Line Interface release by version.
      description: Retrieve the Administrator Command Line Interface release by version.
      operationId: getAdminCLIReleaseByVersion
      tags:
        - Administrator Command Line Interface
      responses:
        '200':
          $ref: '#/components/responses/CLIReleaseResponse'
        '400':
          $ref: '#/components/responses/BadRequest1'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /v1/k8s/admin-cli/{version}/{os}/checksum:
    parameters:
      - $ref: '#/components/parameters/os'
      - $ref: '#/components/parameters/version'
    get:
      summary: Get Administrator Command Line Interface release checksums.
      description: Retrieve the checksums of the Administrator Command Line Interface release.
      operationId: getAdminCLIReleaseByVersionChecksum
      tags:
        - Administrator Command Line Interface
      responses:
        '200':
          $ref: '#/components/responses/ChecksumResponse'
        '400':
          $ref: '#/components/responses/BadRequest1'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/serviceUnavailable'
  /api/v1/asset/compute:
    get:
      summary: List compute assets.
      description: Use to retrieve a list of compute assets.
      operationId: list_compute_assets
      tags:
        - Compute
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComputeListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create compute asset.
      description: Use to create a compute asset.
      operationId: create_compute_asset
      tags:
        - Compute
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComputeCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComputeAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/compute/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      summary: Retrieve a compute asset.
      description: Use to retrieve the details of a compute asset by id.
      operationId: get_compute_asset_by_id
      tags:
        - Compute
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComputeAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update a compute asset.
      description: Use to update the details of a compute asset by id.
      operationId: update_compute_asset_by_id
      tags:
        - Compute
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComputeUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComputeAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        default:
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a compute asset.
      description: Use to delete a compute asset, by id.
      operationId: delete_compute_asset_by_id
      tags:
        - Compute
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/credentials:
    get:
      summary: List credentials.
      description: Use to retrieve a list of all existing credentials.
      operationId: list_credentials_assets
      tags:
        - Credentials
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CredentialsListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/credentials/access-key:
    get:
      tags:
        - Credentials
      summary: List access keys.
      description: Use to retrieve a list of S3-compatible access key credentials.
      operationId: list_access_keys
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessKeyListResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      tags:
        - Credentials
      summary: Create an access key.
      description: Use to create an S3-compatible access key credential.
      operationId: create_access_key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccessKeyCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessKey'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/credentials/access-key/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      tags:
        - Credentials
      summary: Get an access key.
      description: Use to retrieve the details of an S3-compatible access key credential by id.
      operationId: get_access_key_by_id
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessKey'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      tags:
        - Credentials
      summary: Update an access key.
      description: Use to update the details of an S3-compatible access key credential by id.
      operationId: update_access_key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccessKeyUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessKey'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      tags:
        - Credentials
      summary: Delete an access key.
      description: Use to delete an S3-compatible access key credential by id.
      operationId: delete_access_key
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '412':
          $ref: '#/components/responses/412PreconditionFailed'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/credentials/password:
    get:
      tags:
        - Credentials
      summary: List password credentials.
      description: Use to retrieve a list of password credentials.
      operationId: list_passwords
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PasswordListResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      tags:
        - Credentials
      summary: Create a userid / password credential.
      description: Use to create a userid / password credential.
      operationId: create_password
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PasswordCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Password'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/credentials/password/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      tags:
        - Credentials
      summary: Get a userid / password credential.
      description: Use to retrieve the details of a userid / password credential asset by id.
      operationId: get_password_by_id
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Password'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      tags:
        - Credentials
      summary: Update a password credential.
      description: Use to Update the details of a password credential by id.
      operationId: update_password
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PasswordUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Password'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      tags:
        - Credentials
      summary: Delete a password asset.
      description: Udse to delete a password credential by id.
      operationId: delete_password
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '412':
          $ref: '#/components/responses/412PreconditionFailed'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/credentials/docker-registry:
    get:
      tags:
        - Credentials
      summary: List docker registry credentials.
      description: Use to retrieve a list of docker registry credentials.
      operationId: list_docker_registries
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DockerRegistryListResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      tags:
        - Credentials
      summary: Create a docker registry credential.
      description: Use to create a docker registry credential containing userid, password and url.
      operationId: create_docker_registry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DockerRegistryCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DockerRegistry'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/credentials/docker-registry/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      tags:
        - Credentials
      summary: Get a docker registry credential.
      description: Use to retrieve the details of a docker registry credential by id.
      operationId: get_docker_registry_by_id
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DockerRegistry'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      tags:
        - Credentials
      summary: Update a docker registry credential.
      description: Use to updates the details of a docker registry credentials by id.
      operationId: update_docker_registry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DockerRegistryUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DockerRegistry'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      tags:
        - Credentials
      summary: Delete a docker registry credential.
      description: Use to deletes a docker registry credential by id.
      operationId: delete_docker_registry
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '412':
          $ref: '#/components/responses/412PreconditionFailed'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/credentials/generic-secret:
    get:
      tags:
        - Credentials
      summary: List generic-secrets.
      description: Retrieve a list of generic-secret assets.
      operationId: list_generic_secret
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericSecretListResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      tags:
        - Credentials
      summary: Create a generic-secret.
      description: Use to create a generic-secret asset.
      operationId: create_generic_secret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenericSecretCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericSecret'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/credentials/generic-secret/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      tags:
        - Credentials
      summary: Get a generic-secret.
      description: Returns the details of a generic-secret asset, by id.
      operationId: get_generic_secret_by_id
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericSecret'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      tags:
        - Credentials
      summary: Update a generic-secret.
      description: Updates the details of a generic-secret asset, by id.
      operationId: update_generic_secret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenericSecretUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericSecret'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      tags:
        - Credentials
      summary: Delete a generic-secret.
      description: Use to delete a generic-secret asset, by id.
      operationId: delete_generic_secret
      responses:
        '204':
          $ref: '#/components/responses/204NoContent'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '412':
          $ref: '#/components/responses/412PreconditionFailed'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/registries:
    get:
      tags:
        - Registry
      summary: Get registries.
      description: Retrieve a list of registries assets.
      operationId: list_registries
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistryListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      tags:
        - Registry
      summary: Create a registry asset.
      description: Use to create a registry asset containing a registry base url and credentials.
      operationId: create_registry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegistryCreationRequest'
      responses:
        '201':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/registries/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      tags:
        - Registry
      summary: Get a registry.
      description: Retrieve a registry asset by id.
      operationId: get_registry_by_id
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      tags:
        - Registry
      summary: Delete a registry asset.
      description: Use to delete a registry asset containing registry base url and credentials by id.
      operationId: delete_registry
      responses:
        '204':
          description: Registry has been deleted.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      tags:
        - Registry
      summary: Update a registry asset.
      description: Use to update a registry asset containing registry base url and credentials by id.
      operationId: update_registry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegistryUpdateRequest'
      responses:
        '200':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/registries/{AssetId}/repositories:
    get:
      tags:
        - Registry
      summary: Get the repositories in the registry.
      parameters:
        - $ref: '#/components/parameters/AssetId'
        - $ref: '#/components/parameters/SearchName'
      description: Retrieve a list of repositories from a registry asset.
      operationId: get_repositories
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repositories'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/registries/{AssetId}/repositories/tags:
    get:
      tags:
        - Registry
      summary: Get the repositories tags in the registry.
      parameters:
        - $ref: '#/components/parameters/AssetId'
        - name: repository
          in: query
          required: true
          description: The repository name that its tags are requested.
          schema:
            type: string
          allowReserved: true
        - $ref: '#/components/parameters/SearchName'
      description: Retrieve a list of repository tags from a repository asset.
      operationId: get_repository_tags
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryTags'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/environment:
    get:
      summary: List environment assets.
      description: Use to retrieve a list of environment assets.
      operationId: list_environment_assets
      tags:
        - Environment
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/DistributedFrameworkQuery'
        - $ref: '#/components/parameters/IsDistributedQuery'
        - $ref: '#/components/parameters/IsTrainingQuery'
        - $ref: '#/components/parameters/IsWorkspaceQuery'
        - $ref: '#/components/parameters/IsInferenceQuery'
        - $ref: '#/components/parameters/ComplyToReplicaType'
        - $ref: '#/components/parameters/IncludeStatus'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create an environment asset.
      description: Use to create an environment asset.
      operationId: create_environment_asset
      tags:
        - Environment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/environment/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      summary: Get an environment asset.
      description: Use to retrieve the details of environment asset by id.
      operationId: get_environment_asset_by_id
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/ComplyToReplicaType'
        - $ref: '#/components/parameters/IncludeStatus'
      tags:
        - Environment
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update an environment asset.
      description: Use to update the details of environment asset by id.
      operationId: update_environment_asset_by_id
      tags:
        - Environment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvironmentUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        default:
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete an environment asset.
      description: Use to delete an environment asset by id.
      operationId: delete_environment_asset_by_id
      tags:
        - Environment
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource:
    get:
      summary: List datasource assets.
      description: Returns a combined list of data-sources.
      operationId: list_datasource_assets
      tags:
        - Datasources
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/AssetIdsFilter'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasourceListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/git:
    get:
      summary: List Git assets.
      description: Retrieve a list of Git datasource assets.
      operationId: list_git_assets
      tags:
        - Git
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/AssetIdsFilter'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create a Git asset.
      description: Use to create a a Git datasource asset.
      operationId: create_git_asset
      tags:
        - Git
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/git/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      summary: Get a Git asset.
      description: Use to retrieve the details of a Git datasource asset by id.
      operationId: get_git_asset_by_id
      tags:
        - Git
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update a Git asset.
      description: Use to update the details of Git datasource asset by id.
      operationId: update_git_asset_by_id
      tags:
        - Git
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        default:
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a Git asset.
      description: Use to delete a Git datasource asset by id.
      operationId: delete_git_asset_by_id
      tags:
        - Git
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/host-path:
    get:
      tags:
        - HostPath
      summary: List host path assets.
      description: Retrieve a list of hostPath datasource assets.
      operationId: list_host_path_assets
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/AssetIdsFilter'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostPathListResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      tags:
        - HostPath
      summary: Create a host path asset.
      description: Use to create a hostPath datasource asset.
      operationId: create_host_path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostPathCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostPathAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/host-path/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      tags:
        - HostPath
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      summary: Get a hostPath asset.
      description: Use to retrieve the details of a hostPath datasource by id.
      operationId: get_host_path_by_id
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostPathAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      tags:
        - HostPath
      summary: Update a hostPath asset.
      description: Use to update the details of a hostPath datasource by id.
      operationId: update_host_path_by_id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostPathUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostPathAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      tags:
        - HostPath
      summary: Delete a hostPath asset.
      description: Use to delete a hostPath datasource asset by id.
      operationId: delete_host_path_by_id
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '412':
          $ref: '#/components/responses/412PreconditionFailed'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/nfs:
    get:
      summary: List NFS assets.
      description: Retrieve a list of NFS datasource assets.
      operationId: list_nfs_assets
      tags:
        - NFS
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/AssetIdsFilter'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NFSListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create an NFS asset.
      description: Use to create an NFS datasource asset.
      operationId: create_nfs_asset
      tags:
        - NFS
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NFSCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S3Asset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/nfs/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      summary: Get an NFS asset.
      description: Use to retrieve the details of NFS datasource asset by id.
      operationId: get_nfs_asset_by_id
      tags:
        - NFS
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NFSAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update an NFS asset.
      description: Use to update the details of NFS datasource asset by id.
      operationId: update_nfs_asset_by_id
      tags:
        - NFS
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NFSUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NFSAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        default:
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete an NFS asset.
      description: Use to delete an NFS datasource asset by id.
      operationId: delete_nfs_asset_by_id
      tags:
        - NFS
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/pvc:
    get:
      summary: List PVC assets.
      description: Retrieves a list of PVC datasource assets.
      operationId: list_pvc_assets
      tags:
        - PVC
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/AssetIdsFilter'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PVCListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create a PVC asset.
      description: Use to create a PVC datasource asset.
      operationId: create_pvc_asset
      tags:
        - PVC
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PVCCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PVCAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/pvc/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      summary: Get a PVC asset.
      description: Retrieve the details of a PVC datasource asset by id.
      operationId: get_pvc_asset_by_id
      tags:
        - PVC
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PVCAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update a PVC asset.
      description: Use to update the details of a PVC datasource asset by id.
      operationId: update_pvc_asset_by_id
      tags:
        - PVC
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PVCUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PVCAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        default:
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a PVC asset.
      description: Use to delete a PVC datasource asset by id.
      operationId: delete_pvc_asset_by_id
      tags:
        - PVC
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/s3:
    get:
      summary: List S3 assets.
      description: Retrieve a list of S3 compatible datasource assets.
      operationId: list_s3_assets
      tags:
        - S3
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/AssetIdsFilter'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S3ListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create an S3 asset.
      description: Use to create an S3 compatible datasource asset.
      operationId: create_s3_asset
      tags:
        - S3
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/S3CreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S3Asset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/s3/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      summary: Get an S3 asset.
      description: Retrieve the details of S3 compatible datasource asset by id.
      operationId: get_s3_asset_by_id
      tags:
        - S3
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S3Asset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update an S3 asset.
      description: Use to update the details of an S3 compatible datasource asset by id.
      operationId: update_s3_asset_by_id
      tags:
        - S3
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/S3UpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S3Asset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        default:
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete an S3 asset.
      description: Use to delete an S3 compatible datasource asset by id.
      operationId: delete_s3_asset_by_id
      parameters:
        - $ref: '#/components/parameters/AssetId'
      tags:
        - S3
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/workload-template:
    get:
      summary: List templates.
      description: Retrieve a list of templates.
      operationId: list_templates
      deprecated: true
      tags:
        - Template
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/DistributedFrameworkQuery'
        - $ref: '#/components/parameters/IsDistributedQuery'
        - $ref: '#/components/parameters/IsTrainingQuery'
        - $ref: '#/components/parameters/IsWorkspaceQuery'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkloadTemplateListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create a template.
      description: Use to create a template.
      operationId: create_template
      deprecated: true
      tags:
        - Template
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkloadTemplateCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkloadTemplate'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/workload-template/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      summary: Get a template.
      description: Retrieve the details of a template by id.
      operationId: get_template_by_id
      deprecated: true
      tags:
        - Template
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkloadTemplate'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update a template.
      description: Use to update the details of a template by id.
      operationId: update_template
      deprecated: true
      tags:
        - Template
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkloadTemplateUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkloadTemplate'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a template.
      description: Use to delete a template by id.
      operationId: delete_template_by_id
      deprecated: true
      tags:
        - Template
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/clusters/{clusterUuid}/workspaces:
    parameters:
      - $ref: '#/components/parameters/ClusterUuid'
  /v1/k8s/clusters/{clusterUuid}/trainings:
    parameters:
      - $ref: '#/components/parameters/ClusterUuid'
  /api/v1/asset/datasource/config-map:
    get:
      summary: List ConfigMap datasource assets.
      description: Retrieve a list of ConfigMap datasource assets.
      operationId: list_config_map_assets
      tags:
        - ConfigMap
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/AssetIdsFilter'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigMapListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create a ConfigMap datasource asset.
      description: Use to create a ConfigMap datasource asset.
      operationId: create_config_map_asset
      tags:
        - ConfigMap
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigMapCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigMapAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/config-map/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      summary: Get a ConfigMap asset.
      description: Retrieve the details of ConfigMap datasource asset by id.
      operationId: get_config_map_asset_by_id
      tags:
        - ConfigMap
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigMapAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update a ConfigMap asset.
      description: Use to update the details of a ConfigMap datasource asset by id.
      operationId: update_config_map_asset_by_id
      tags:
        - ConfigMap
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigMapUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigMapAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        default:
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a ConfigMap asset.
      description: Use to delete a ConfigMap datasource asset by id.
      operationId: delete_config_map_asset_by_id
      tags:
        - ConfigMap
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/secrets:
    get:
      summary: List Secret datasource assets.
      description: Retrieve a list of Secret datasource assets.
      operationId: list_secret_assets
      tags:
        - Secret
      parameters:
        - $ref: '#/components/parameters/AssetNameFilter'
        - $ref: '#/components/parameters/AssetScopeFilter'
        - $ref: '#/components/parameters/AssetProjectFilter'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/AssetIdsFilter'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretAssetListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create a Secret datasource asset.
      description: Use to create a Secret datasource asset.
      operationId: create_secret_asset
      tags:
        - Secret
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretAssetCreationRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretAsset'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/asset/datasource/secrets/{AssetId}:
    parameters:
      - $ref: '#/components/parameters/AssetId'
    get:
      summary: Get a Secret asset.
      description: Retrieve the details of Secret datasource asset by id.
      operationId: get_secret_asset_by_id
      tags:
        - Secret
      parameters:
        - $ref: '#/components/parameters/IncludeUsageInfo'
        - $ref: '#/components/parameters/ComplyToProject'
        - $ref: '#/components/parameters/ComplyToWorkloadType'
        - $ref: '#/components/parameters/IncludeStatus'
        - $ref: '#/components/parameters/ComplyToReplicaType'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update a Secret asset.
      description: Use to update the details of a Secret datasource asset by id.
      operationId: update_Secret_asset_by_id
      tags:
        - Secret
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretAssetUpdateRequest'
      responses:
        '202':
          description: Request accepted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretAsset'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        default:
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a Secret asset.
      description: Use to delete a Secret datasource asset by id.
      operationId: delete_secret_asset_by_id
      tags:
        - Secret
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy:
    get:
      summary: List policies
      description: Retrieve a list of all the applied policies.
      operationId: list_policies
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/WorkloadType'
        - name: scope
          in: query
          required: false
          description: filter by this scope.
          schema:
            type: string
            enum:
              - tenant
              - cluster
              - department
              - project
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByProject'
        - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyListResponse'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/trainings:
    patch:
      summary: Update a training policy.
      description: Use to apply changes to training policy for a given organizational unit.
      operationId: update_training_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainingPolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a training policy.
      description: Use to apply a training policy for a given organizational unit.
      operationId: overwrite_training_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainingPolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a training policy.
      description: Retrieve the details of an training policy for a given organizational unit.
      operationId: get_training_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/PolicyScope'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByProject'
        - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a training policy.
      description: Use to delete a training policy for a given organizational unit.
      operationId: delete_training_policy
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/PolicyScope'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByProject'
        - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/workspaces:
    patch:
      summary: Update a workspace policy.
      description: Use to apply changes to workspace policy for a given organizational unit.
      operationId: update_workspace_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspacePolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a workspace policy.
      description: Ue to apply a workspace policy for a given organizational unit.
      operationId: overwrite_workspace_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspacePolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a workspace policy.
      description: Retrieve the details of a workspace policy for a given organizational unit.
      operationId: get_workspace_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/PolicyScope'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByProject'
        - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspacePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a workspace policy.
      description: Use to delete a workspace policy for a given organizational unit.
      operationId: delete_workspace_policy
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/PolicyScope'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByProject'
        - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/distributed:
    patch:
      summary: Update a distributed policy.
      description: Use to apply changes to distributed policy for a given organizational unit.
      operationId: update_distributed_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedPolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite a distributed policy.
      description: Use to apply a distributed policy for a given organizational unit.
      operationId: overwrite_distributed_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedPolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get a distributed policy.
      description: Retrieve the details of a distributed policy for a given organizational unit.
      operationId: get_distributed_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/PolicyScope'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByProject'
        - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedPolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a distributed policy.
      description: Use to delete a distributed policy for a given organizational unit.
      operationId: delete_distributed_policy
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/PolicyScope'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByProject'
        - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v2/policy/inferences:
    patch:
      summary: Update an inference policy.
      description: Use to apply changes to inference policy for a given organizational unit. [Experimental]
      operationId: update_inference_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferencePolicyChangeRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Overwrite an inference policy.
      description: Use to apply an inference policy for a given organizational unit. [Experimental]
      operationId: overwrite_inference_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/ValidateOnly'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferencePolicyOverwriteRequestV2'
      responses:
        '200':
          description: Policy applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get an inference policy.
      description: Retrieve the details of an inference policy for a given organizational unit. [Experimental]
      operationId: get_inference_policy_v2
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/PolicyScope'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByProject'
        - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePolicyV2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete an inference policy.
      description: Use to delete an inference policy for a given organizational unit. [Experimental]
      operationId: delete_inference_policy
      tags:
        - Policy
      parameters:
        - $ref: '#/components/parameters/PolicyScope'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/FilterByProject'
        - $ref: '#/components/parameters/FilterByCluster'
      responses:
        '204':
          description: The policy was deleted successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/clusters/{uuid}/storage-classes:
    parameters:
      - $ref: '#/components/parameters/uuid'
    get:
      summary: Get all storageClasses from a cluster.
      description: this API is used by cluster versions < 2.20
      deprecated: true
      operationId: V1GetStorageClasses
      tags:
        - Storage Classes
      responses:
        '200':
          $ref: '#/components/responses/V1StorageClassNames'
        '401':
          $ref: '#/components/responses/V1Unauthorized'
        '404':
          $ref: '#/components/responses/V1NotFound'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1Error'
  /v1/k8s/clusters/{uuid}/storage-classes/{storage_class_name}:
    parameters:
      - $ref: '#/components/parameters/uuid'
      - $ref: '#/components/parameters/V1Storage_class_name'
  /v1/k8s/clusters/{uuid}/storage-classes/sync:
    parameters:
      - $ref: '#/components/parameters/uuid'
  /api/v1/storage-classes:
    get:
      summary: get a Storage Class/Classes for a given cluster
      operationId: getStorageClasses
      tags:
        - Storage Classes
      parameters:
        - $ref: '#/components/parameters/ClusterIdRequired'
        - $ref: '#/components/parameters/nameFilter'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StorageClasses1'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/clusters/{clusterId}/projects:
    post:
      tags:
        - Projects
      deprecated: true
      operationId: createProject
      summary: Create a new project.
      description: Creates a new project in a specific cluster. Deprecated - use `/api/v1/org-unit/projects` instead.
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The Universally Unique Identifier (UUID) of the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: query
          name: excludePermissions
          schema:
            type: boolean
          required: false
          description: |
            Backward compatibility of the `permissions` field. If `true`, the
            `permissions` field in the request body is ignored. If `false`,
            relevant access rules for the `permissions` field are created in the project scope.
          example: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectCreateRequest'
      responses:
        '200':
          description: Project created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project2'
        '400':
          description: Bad Project request.
        '409':
          description: Project creation failed.
    get:
      tags:
        - Projects
      deprecated: true
      summary: List all projects and their details.
      operationId: getProjects
      description: Retrieves a list of all projects and details from a specific cluster. Use in reporting and analysis tools. Deprecated - use `/api/v1/org-unit/projects` instead.
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The Universally Unique Identifier (UUID) of the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: query
          name: excludePermissions
          schema:
            type: boolean
          required: false
          description: Backward compatibility of the 'permissions' field. If 'true', the 'permissions' field in the returned projects is not set. If 'false', the 'permissions' field is set in the returned projects.
          example: true
        - in: query
          name: memoryUnitMb
          schema:
            type: boolean
          required: false
          description: Memory returned in MB. When set to `false` (default) memory will be returned in MiB.
          example: true
      responses:
        '200':
          description: Successfully retrieved a list of all the projects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Project2'
  /v1/k8s/clusters/{clusterId}/projects/{id}:
    put:
      tags:
        - Projects
      deprecated: true
      summary: Update a project.
      operationId: updateProject
      description: Updates a project's details in a specific cluster. For example, node pool resources, and others. Deprecated - use `/api/v1/org-unit/projects/{projectId}` instead.
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: The unique project-id.
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The Universally Unique Identifier (UUID) of the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: query
          name: excludePermissions
          schema:
            type: boolean
          required: false
          description: |
            Backward compatibility of the `permissions` field. If `true`, the
            `permissions` field in the returned projects is not set. If `false`,
            the `permissions` field is set in the returned projects.
          example: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectUpdateRequest1'
      responses:
        '200':
          description: An updated project details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project2'
        '400':
          description: Bad project request.
        '404':
          description: Project not found.
        '409':
          description: Could not update the project.
    delete:
      tags:
        - Projects
      deprecated: true
      summary: Delete a project.
      operationId: deleteProject
      description: Deletes a project from a specific cluster. Deprecated - use `/api/v1/org-unit/projects/{projectId}` instead.
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The Universally Unique Identifier (UUID) of the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: path
          name: id
          schema:
            type: integer
          required: true
          description: The unique id of the project.
          example: 2
      responses:
        '200':
          description: Project deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project2'
        '404':
          description: Project not found.
    get:
      tags:
        - Projects
      deprecated: true
      summary: List details of a specific project.
      operationId: getProject
      description: Retrieves the details of a specific project from a specific cluster. Use for project analysis. **Requires `view` permissions to the queried project**. Deprecated - use `/api/v1/org-unit/projects/{projectId}` instead.
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The Universally Unique Identifier (UUID) of the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: path
          name: id
          schema:
            type: string
          required: true
          description: The unique project-id identifying the project.
        - in: query
          name: excludePermissions
          schema:
            type: boolean
          required: false
          description: Backward compatibility of the 'permissions' field. If 'true', the 'permissions' field in the returned projects is not set. If 'false', the 'permissions' field is set in the returned projects.
          example: true
      responses:
        '200':
          description: Successfully retrieved project details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project2'
        '404':
          description: Project not found.
  /v1/k8s/clusters/{clusterId}/departments/{department-id}:
    get:
      tags:
        - Departments
      deprecated: true
      summary: Get a specific department.
      operationId: getDepartment
      description: Retrieves the details of a specific department. Requires  the`view` permission for the department.
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The Universally Unique Identifier (UUID) of the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: path
          name: department-id
          schema:
            type: integer
          required: true
          description: The unique id of the department.
          example: 2
        - in: query
          name: excludePermissions
          schema:
            type: boolean
          required: false
          description: backwards compatibility of the 'departmentAdmins' field. if 'true', will not set the 'departmentAdmins' field in the returned department. if 'false', will set the 'departmentAdmins' field in the returned department.
          example: true
      responses:
        '200':
          description: Successfully retrieved department details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Department2'
    put:
      tags:
        - Departments
      deprecated: true
      summary: Update a department.
      operationId: updateDepartment
      description: Updates a department's details in the cluster. \n For example, node pools and other details.
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The unique uuid identifying the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: path
          name: department-id
          schema:
            type: integer
          required: true
          description: The unique id identifying the department.
          example: 2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepartmentUpdateRequest1'
      responses:
        '200':
          description: Department updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Department2'
    delete:
      tags:
        - Departments
      deprecated: true
      summary: Delete a department.
      operationId: deleteDepartment
      description: Deletes a department from a specific cluster.
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The unique uuid identifying the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: path
          name: department-id
          schema:
            type: integer
          required: true
          description: The unique id identifying the department.
          example: 2
      responses:
        '200':
          description: Department deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Department2'
  /v1/k8s/clusters/{clusterId}/departments:
    get:
      tags:
        - Departments
      deprecated: true
      summary: List all departments.
      description: List all the departments managed by the tenant on a specific cluster.
      operationId: getDepartments
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The Universally Unique Identifier (UUID) of the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: query
          name: excludePermissions
          schema:
            type: boolean
          required: false
          description: Backward compatibility of the `departmentAdmins` field. If `true`, the `departmentAdmins` field in the returned departments is not set. If `false`, the `departmentAdmins` is set in the returned departments.
          example: true
        - in: query
          name: memoryUnitMb
          schema:
            type: boolean
          required: false
          description: Memory returned in MB. When set to `false` (default) memory will be returned in MiB.
          example: true
      responses:
        '200':
          description: Successfully retrieved a list of Departments.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Department2'
    post:
      tags:
        - Departments
      deprecated: true
      summary: Create a new department.
      description: Creates a new department in the cluster.
      operationId: createDepartment
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The unique uuid identifying the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepartmentCreateRequest'
      responses:
        '200':
          description: Department created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Department2'
  /v1/k8s/clusters/{clusterId}/departments/{department-id}/access-control:
    put:
      tags:
        - Departments
      summary: Set the department admins.
      description: Deprecated. Instead, use the accessrules API to add the department-admin permissions to a specific subject.
      operationId: updateDepartmentAdmins
      deprecated: true
      parameters:
        - in: path
          name: clusterId
          schema:
            type: string
          required: true
          description: The unique uuid identifying the cluster.
          example: 9f55255e-11ed-47c7-acef-fc4054768dbc
        - in: path
          name: department-id
          schema:
            type: integer
          required: true
          description: The unique id identifying the department.
          example: 2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DepartmentAccessControl'
      responses:
        '201':
          description: Department admin set successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepartmentAccessControl'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthenticated
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
  /api/v1/authorization/roles:
    get:
      summary: Get a list of roles.
      description: Use to retrieve a list of roles.
      operationId: get_roles
      tags:
        - Roles
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Roles'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/authorization/roles/{roleIdPath}:
    get:
      summary: Get a role by id.
      description: Retrieve the details of a role by id.
      operationId: get_role
      tags:
        - Roles
      parameters:
        - $ref: '#/components/parameters/RoleIdPath'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role1'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/authorization/access-rules:
    post:
      summary: Create an access rule.
      description: Use to bind a predefined role to a subject (user, group or application) in a scope.
      operationId: create_access_rule
      tags:
        - Access rules
      requestBody:
        description: The access rule to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccessRuleCreationFields'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessRule'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: List the access rules.
      description: Retrieve a list of access rules.
      operationId: get_access_rules
      tags:
        - Access rules
      parameters:
        - $ref: '#/components/parameters/SubjectTypeOptional'
        - $ref: '#/components/parameters/SubjectIdOptional'
        - $ref: '#/components/parameters/SubjectIds'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/LastUpdated'
        - $ref: '#/components/parameters/IncludeDeleted'
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/ScopeTypeOptionalQueryDeprecated'
        - $ref: '#/components/parameters/ScopeIdOptional'
        - $ref: '#/components/parameters/RoleId'
        - $ref: '#/components/parameters/SortOrder'
        - $ref: '#/components/parameters/AccessRulesSort'
        - $ref: '#/components/parameters/AccessRulesFilter'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - totalRecords
                  - displayRecords
                  - accessRules
                properties:
                  totalRecords:
                    type: integer
                    example: 1
                  displayRecords:
                    type: integer
                    example: 1
                  accessRules:
                    $ref: '#/components/schemas/AccessRules'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/authorization/access-rules/{accessRuleId}:
    get:
      summary: Get an access rule.
      description: Use to retrieve the details of an access rule by id.
      operationId: get_access_rule
      tags:
        - Access rules
      parameters:
        - $ref: '#/components/parameters/AccessRuleId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessRuleById'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete an access rule.
      description: Use to delete the subject permissions assigned by access rule id.
      operationId: delete_access_rule
      tags:
        - Access rules
      parameters:
        - $ref: '#/components/parameters/AccessRuleId'
      responses:
        '204':
          $ref: '#/components/responses/204NoContent'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/authorization/access-rules/count:
    get:
      summary: Count access rules.
      description: Use to retrieve the number of access rules.
      operationId: count_access_rules
      tags:
        - Access rules
      parameters:
        - $ref: '#/components/parameters/IncludeDeleted'
        - $ref: '#/components/parameters/AccessRulesFilter'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                properties:
                  count:
                    type: integer
                    format: int64
                    example: 1
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/authorization/permissions:
    get:
      summary: Get a summary of user permissions.
      description: Retrieve a summary of user permissions.
      operationId: get_permissions
      tags:
        - Permissions
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Permissions'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/authorization/permitted-scopes:
    post:
      summary: Calculate permitted scopes.
      description: Use to calculate user permitted scopes for an action on a resource.
      operationId: get_permitted_scopes
      tags:
        - Permissions
      requestBody:
        description: The request parameters.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - resourceType
              properties:
                resourceType:
                  $ref: '#/components/schemas/ResourceType'
                action:
                  nullable: true
                  type: string
                  enum:
                    - create
                    - read
                    - update
                    - delete
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermittedScopesActions'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/users:
    get:
      summary: Get users.
      description: Retrieve a list of platform users.
      operationId: get_users
      tags:
        - Users
      parameters:
        - description: Filter results by user attribute.
          in: query
          name: filter
          required: false
          deprecated: true
          schema:
            type: string
          example: runai.is_local:true
        - $ref: '#/components/parameters/usersFilterBy'
        - $ref: '#/components/parameters/usersSortBy'
        - $ref: '#/components/parameters/SortOrder'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Users1'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create a local user.
      description: Use to create a local platform user.
      operationId: create_user
      tags:
        - Users
      requestBody:
        description: User object to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreationRequest1'
      responses:
        '201':
          description: Created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPostResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '409':
          $ref: '#/components/responses/409Conflict'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/users/count:
    get:
      summary: Count users
      operationId: count_users
      description: count users
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/usersFilterBy'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                properties:
                  count:
                    type: integer
                    format: int64
                    example: 1
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/users/{userId}/logout:
    post:
      summary: Logout a user.
      description: Use to force a user to logout.
      operationId: logout_user
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: Executed successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/users/{userId}/password:
    post:
      summary: Reset a user's password.
      description: Use to to reset a user's password.
      operationId: reset_user_password
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: Regenerated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  tempPassword:
                    type: string
                example:
                  tempPassword: asdasidjn9d
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/users/{userId}:
    get:
      summary: Get a user by id.
      description: Retrieve a user's details by id.
      operationId: get_user_by_id
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/userId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete a user by id.
      description: Use to delete a user by id.
      operationId: delete_user_by_id
      tags:
        - Users
      parameters:
        - $ref: '#/components/parameters/userId'
      responses:
        '204':
          description: Executed successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/me/password:
    post:
      summary: change user password
      operationId: change_user_password
      tags:
        - Users
      requestBody:
        description: Password to change
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserChangePasswordRequest'
      responses:
        '200':
          description: Password changed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  currentPassword:
                    type: string
                  newPassword:
                    type: string
                example:
                  tempPassword: Abcd!234
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/apps:
    get:
      summary: Get a list of applications.
      description: Retrieve a list of applications.
      operationId: get_applications
      tags:
        - Applications
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Applications'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create an application.
      description: Used to create an application.
      operationId: create_application
      tags:
        - Applications
      requestBody:
        description: Application object to create
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationCreationRequest'
      responses:
        '201':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationPostResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '409':
          $ref: '#/components/responses/409Conflict'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/apps/installer:
    get:
      summary: Get a list of installer applications.
      description: Retrieve a list of installer applications.
      operationId: get_installer_app
      tags:
        - Applications
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationPostResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/apps/{appId}:
    get:
      summary: Get application by id.
      description: Retrieve the details of an application by id.
      operationId: get_application_by_id
      tags:
        - Applications
      parameters:
        - $ref: '#/components/parameters/appId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Application'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    patch:
      summary: Update application details by id.
      description: Use to update the details of an application by id.
      operationId: update_application_by_id
      tags:
        - Applications
      parameters:
        - $ref: '#/components/parameters/appId'
      requestBody:
        description: Application object that needs to be updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationPatchRequest'
      responses:
        '200':
          description: Executed successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete an application by id.
      description: Use to delete an application by id.
      operationId: delete_application_by_id
      tags:
        - Applications
      parameters:
        - $ref: '#/components/parameters/appId'
      responses:
        '204':
          description: Executed successfully.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/apps/{appId}/secret:
    post:
      summary: Regenerate an application secret.
      description: Use to regenerate the application secret by id.
      operationId: regenerate_application_secret
      tags:
        - Applications
      parameters:
        - $ref: '#/components/parameters/appId'
      responses:
        '200':
          description: Regenerated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  secret:
                    type: string
                example:
                  secret: 189ej2ijd92fj092k049fk0
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/token:
    post:
      tags:
        - Tokens
      summary: Create an application token.
      description: Use to create application tokens. Select a token using the `grant_type` parameter.
      operationId: grant_token
      parameters:
        - in: header
          name: User-Agent
          schema:
            type: string
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenRequest'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/auth/token/exchange:
    get:
      deprecated: true
      tags:
        - Tokens
      summary: exchange code for token
      description: |
        Exchanges an authorization code for an access token.
        The authorization code is retrieved from the authorization server.
      operationId: exchange_code_for_token
      parameters:
        - $ref: '#/components/parameters/redirectUri'
        - $ref: '#/components/parameters/exchangeCode'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/auth/oauth/tokens/refresh:
    post:
      deprecated: true
      tags:
        - Tokens
      summary: refresh token
      description: |
        Refreshes an user tokens.
        The refresh token is retrieved from the authorization server.
      operationId: refresh_token
      parameters:
        - $ref: '#/components/parameters/refreshToken'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /v1/k8s/auth/oauth/apptoken:
    post:
      deprecated: true
      tags:
        - Tokens
      summary: get application token
      description: |
        Retrieve access token for an application.
        The application token is retrieved from the authorization server.
      operationId: app_token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppTokenRequest'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppTokenResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads:
    get:
      summary: List workloads.
      description: Retrieve a list of active workloads with details.
      operationId: get_workloads
      tags:
        - Workloads-API
      parameters:
        - $ref: '#/components/parameters/Deleted'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/SortOrder'
        - $ref: '#/components/parameters/WorkloadsSort'
        - $ref: '#/components/parameters/WorkloadsFilter'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - workloads
                properties:
                  next:
                    type: integer
                    example: 1
                  workloads:
                    $ref: '#/components/schemas/Workloads'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/{workloadId}:
    get:
      summary: Get a workload.
      operationId: get_workload
      description: Retrieve workload data using a `workloadId`.
      tags:
        - Workloads-API
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkloadDetailed'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/count:
    get:
      summary: Count workloads.
      description: Retrieve the number of workloads.
      operationId: count_workloads
      tags:
        - Workloads-API
      parameters:
        - $ref: '#/components/parameters/Deleted'
        - $ref: '#/components/parameters/WorkloadsFilter'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                properties:
                  count:
                    type: integer
                    format: int64
                    example: 1
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/telemetry:
    get:
      summary: Get the workloads telemetry. [Experimental]
      operationId: get_workloads_telemetry
      description: Retrieves workload data by telemetry type.
      tags:
        - Workloads-API
      parameters:
        - $ref: '#/components/parameters/FilterByCluster'
        - $ref: '#/components/parameters/FilterByNodepoolName'
        - $ref: '#/components/parameters/FilterByDepartment'
        - $ref: '#/components/parameters/TelemetryGroupBy1'
        - $ref: '#/components/parameters/TelemetryType2'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelemetryResponse'
            text/csv: {}
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/pods:
    get:
      summary: List pods.
      description: Retrieve a list of pods from a cluster.
      operationId: list_pods
      tags:
        - Pods
      parameters:
        - $ref: '#/components/parameters/Deleted'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/SortOrder'
        - $ref: '#/components/parameters/PodsSort'
        - $ref: '#/components/parameters/PodsFilter'
        - $ref: '#/components/parameters/PodsQueryVerbosity'
        - $ref: '#/components/parameters/Completed'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - pods
                properties:
                  next:
                    type: integer
                    example: 1
                  pods:
                    $ref: '#/components/schemas/Pods1'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/{workloadId}/pods/{podId}/metrics:
    get:
      summary: Get pod metrics data. [Experimental]
      description: Retrieve pod's metrics data for use in analysis applications.
      operationId: get_workload_pod_metrics
      tags:
        - Pods
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
        - $ref: '#/components/parameters/PodId'
        - $ref: '#/components/parameters/PodMetricTypes'
        - $ref: '#/components/parameters/StartRequired'
        - $ref: '#/components/parameters/EndRequired'
        - $ref: '#/components/parameters/NumberOfSamples'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
            text/csv: {}
        '207':
          description: Partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/{workloadId}/pods:
    get:
      summary: Get workload pods by id.
      description: Retrieve the details of workload pods by workload id.
      operationId: get_workload_pods
      tags:
        - Pods
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
        - $ref: '#/components/parameters/Deleted'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - pods
                properties:
                  next:
                    type: integer
                    example: 1
                  pods:
                    $ref: '#/components/schemas/Pods1'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/pods/count:
    get:
      summary: Get pods count.
      description: Retrieve the number of pods from a cluster.
      operationId: count_pods
      tags:
        - Pods
      parameters:
        - $ref: '#/components/parameters/Deleted'
        - $ref: '#/components/parameters/PodsFilter'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - count
                properties:
                  count:
                    type: integer
                    format: int64
                    example: 1
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/{workloadId}/events:
    get:
      summary: Get the workload events.
      description: Retrieve all the workload events using a workload id.
      operationId: get_workload_events
      tags:
        - Events
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - events
                properties:
                  next:
                    type: integer
                    example: 1
                  events:
                    $ref: '#/components/schemas/Events'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/{workloadId}/history:
    get:
      summary: Get the workload history.
      description: Retrieve workload history details, including events, using a workload id.
      operationId: get_workload_history
      tags:
        - Events
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - records
                properties:
                  next:
                    type: integer
                    example: 1
                  records:
                    $ref: '#/components/schemas/HistoryRecords'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/{workloadId}/metrics:
    get:
      summary: Get workload metrics data. [Experimental]
      operationId: get_workload_metrics
      description: Retrieves workloads data metrics from the metrics database. Use in reporting and analysis tools.
      tags:
        - Workloads-API
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
        - $ref: '#/components/parameters/WorkloadMetricTypes'
        - $ref: '#/components/parameters/StartRequired'
        - $ref: '#/components/parameters/EndRequired'
        - $ref: '#/components/parameters/NumberOfSamples'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
            text/csv: {}
        '207':
          description: Partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/workspaces:
    post:
      summary: Create a workspace.
      operationId: create_workspace1
      description: Create a new workspace in a specific project in the cluster.
      tags:
        - Workspaces
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceCreationRequest'
      responses:
        '202':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace1'
        '400':
          $ref: '#/components/responses/400BadSubmissionRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/workspaces/{workloadId}:
    delete:
      summary: Delete a workspace.
      description: Delete a workspace using the workspace id.
      operationId: delete_workspace
      tags:
        - Workspaces
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get workspace data.
      description: Retrieve workspace details using a workload id.
      operationId: get_workspace
      tags:
        - Workspaces
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace1'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/workspaces/{workloadId}/suspend:
    post:
      summary: Suspend a workspace.
      description: Suspend a workspace using the workspace id.
      operationId: suspend_workspace
      tags:
        - Workspaces
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/workspaces/{workloadId}/resume:
    post:
      summary: Resume a workspace.
      description: Resume the workspace operation using the workspace id.
      operationId: resume_workspace
      tags:
        - Workspaces
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/trainings:
    post:
      summary: Create a training.
      operationId: create_training1
      description: Create a training workload using container related fields.
      tags:
        - Trainings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainingCreationRequest'
      responses:
        '202':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Training1'
        '400':
          $ref: '#/components/responses/400BadSubmissionRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/trainings/{workloadId}:
    delete:
      summary: Delete a training.
      operationId: delete_training
      description: Delete a training using a workload id.
      tags:
        - Trainings
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get training data.
      operationId: get_training
      description: Retrieve training details using a workload id.
      tags:
        - Trainings
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Training1'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/trainings/{workloadId}/suspend:
    post:
      summary: Suspend a training.
      operationId: suspend_training
      description: Suspend a training from running using a workload id.
      tags:
        - Trainings
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/trainings/{workloadId}/resume:
    post:
      summary: Resume a training.
      operationId: resume_training
      description: Resume a training that was suspended using a workload id.
      tags:
        - Trainings
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/distributed:
    post:
      summary: Create a distributed training.
      description: Use to create a distributed training.
      operationId: create_distributed
      tags:
        - Distributed
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DistributedCreationRequest'
      responses:
        '202':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedWorkload'
        '400':
          $ref: '#/components/responses/400BadSubmissionRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/distributed/{workloadId}:
    delete:
      summary: Delete a distributed training by id.
      description: Use to delete a distributed training by workload id.
      operationId: delete_distributed
      tags:
        - Distributed
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get distributed training's data. [Experimental]
      description: Retrieve the details of a distributed training by workload id.
      operationId: get_distributed
      tags:
        - Distributed
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DistributedWorkload'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/inferences:
    post:
      summary: Create an inference.
      operationId: create_inference1
      description: Create an inference using container related fields.
      tags:
        - Inferences
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferenceCreationRequest'
      responses:
        '202':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inference1'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/inferences/{workloadId}:
    delete:
      summary: Delete an inference.
      operationId: delete_inference
      description: Delete an inference using a workload id.
      tags:
        - Inferences
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get inference data.
      operationId: get_inference
      description: Retrieve inference details using a workload id.
      tags:
        - Inferences
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inference1'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    patch:
      summary: Update inference spec. [Experimental]
      operationId: update_inference_spec
      description: Update the specification of an existing inference workload.
      tags:
        - Inferences
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferenceUpdateRequest'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inference1'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/inferences/{workloadId}/metrics:
    get:
      summary: Get inference metrics data.
      description: Retrieve inference metrics data by id. Supported from control-plane version 2.18 or later.
      operationId: get_inference_workload_metrics
      tags:
        - Inferences
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
        - $ref: '#/components/parameters/InferenceWorkloadMetricTypes'
        - $ref: '#/components/parameters/StartRequired'
        - $ref: '#/components/parameters/EndRequired'
        - $ref: '#/components/parameters/NumberOfSamples'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
            text/csv: {}
        '207':
          description: Partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/inferences/{workloadId}/pods/{podId}/metrics:
    get:
      summary: Get inference pod's metrics data.
      description: Retrieve inference metrics pod's data by workload and pod id. Supported from control-plane version 2.18 or later.
      operationId: get_inference_workload_pod_metrics
      tags:
        - Inferences
      parameters:
        - $ref: '#/components/parameters/WorkloadId'
        - $ref: '#/components/parameters/PodId'
        - $ref: '#/components/parameters/InferencePodMetricTypes'
        - $ref: '#/components/parameters/StartRequired'
        - $ref: '#/components/parameters/EndRequired'
        - $ref: '#/components/parameters/NumberOfSamples'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
            text/csv: {}
        '207':
          description: Partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/workloads/batch:
    post:
      summary: Workload batch operations.
      operationId: batch_workloads
      tags:
        - Workloads batch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkloadBatch'
      responses:
        '200':
          description: Request completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/logo:
    get:
      summary: Get tenant logo. (base64)
      description: Retrieve the base64 logo file.
      operationId: get_tenant_logo
      tags:
        - Logo
      responses:
        '200':
          description: Tenant logo png.
          content:
            application/json:
              schema:
                type: object
                required:
                  - logo
                properties:
                  logo:
                    type: string
        '204':
          $ref: '#/components/responses/204NoContent'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Upload logo for tenant. (base64)
      description: Use to upload a base64 logo file. Max size 128kb.
      operationId: upload_tenant_logo
      tags:
        - Logo
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - logo
              properties:
                logo:
                  type: string
      responses:
        '200':
          description: Logo uploaded.
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '413':
          $ref: '#/components/responses/413RequestEntityTooLarge'
        '415':
          $ref: '#/components/responses/415UnsupportedMediaType'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/datavolumes:
    get:
      summary: List datavolumes in permitted scopes
      description: Get requested datavolumes.
      operationId: get_datavolumes
      tags:
        - Datavolumes-API
      parameters:
        - $ref: '#/components/parameters/DatavolumesRequestType'
        - $ref: '#/components/parameters/DatavolumesUsableInProjectId'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/DatavolumesSortBy'
        - $ref: '#/components/parameters/SortOrder'
        - $ref: '#/components/parameters/DatavolumesFilter'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - datavolumes
                properties:
                  next:
                    type: integer
                    example: 1
                  datavolumes:
                    $ref: '#/components/schemas/DatavolumesNoSharedScopes'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Create a datavolume
      operationId: create_datavolume
      tags:
        - Datavolumes-API
      requestBody:
        description: The datavolume to create.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatavolumeCreationFields'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datavolume'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/datavolumes/{datavolumeId}:
    get:
      summary: Get datavolume
      operationId: get_datavolume
      tags:
        - Datavolumes-API
      parameters:
        - $ref: '#/components/parameters/DatavolumeId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datavolume'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    delete:
      summary: Delete datavolume
      operationId: delete_datavolume
      tags:
        - Datavolumes-API
      parameters:
        - $ref: '#/components/parameters/DatavolumeId'
      responses:
        '202':
          $ref: '#/components/responses/202Accepted'
        '204':
          $ref: '#/components/responses/204NoContent'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    patch:
      summary: Patch datavolume
      operationId: patch_datavolume
      tags:
        - Datavolumes-API
      parameters:
        - $ref: '#/components/parameters/DatavolumeId'
      requestBody:
        description: Datavolume to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatavolumePatchFields'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatavolumeNoSharedScopes'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/datavolumes/{datavolumeId}/sharedScopes:
    patch:
      summary: Patch the datavolume's shared scopes
      operationId: patch_datavolume_shared_scopes
      tags:
        - Datavolumes-API
      parameters:
        - $ref: '#/components/parameters/DatavolumeId'
      requestBody:
        description: Requested SharedScopes of the datavolume to patch.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SharedScopesPatchRequest'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharedScopes'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    get:
      summary: Get the datavolume's shared scopes
      operationId: get_datavolume_shared_scopes
      tags:
        - Datavolumes-API
      parameters:
        - $ref: '#/components/parameters/DatavolumeId'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharedScopes'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/cli/installer/unix:
    get:
      summary: Download Unix installer script [Experimental]
      description: |
        This endpoint returns a unix script that can be used to install the Run:ai CLI.
      operationId: get_installer_unix
      tags:
        - Researcher Command Line Interface
      responses:
        '200':
          description: File download successful
          content:
            text/plain:
              schema:
                type: string
              example: Contents of the file
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/cli/installer/unix/commands:
    get:
      summary: Get Unix installer script commands [Experimental]
      description: |
        This endpoint returns a unix script commands that can be used to install the Run:ai CLI.
      operationId: get_installer_unix_commands
      tags:
        - Researcher Command Line Interface
      responses:
        '200':
          description: A text commands to install the CLI on Unix
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Command'
              example: Contents of the commands to install the CLI on Unix
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/cli/installer/mac:
    get:
      summary: Download Mac installer script [Experimental]
      description: |
        This endpoint returns a Mac script that can be used to install the Run:ai CLI.
      operationId: get_installer_mac
      tags:
        - Researcher Command Line Interface
      responses:
        '200':
          description: File download successful
          content:
            text/plain:
              schema:
                type: string
              example: Contents of the file
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/cli/installer/mac/commands:
    get:
      summary: Get Mac installer script commands [Experimental]
      description: |
        This endpoint returns a Mac script commands that can be used to install the Run:ai CLI.
      operationId: get_installer_mac_commands
      tags:
        - Researcher Command Line Interface
      responses:
        '200':
          description: A text commands to install the CLI on Mac
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Command'
              example: Contents of the commands to install the CLI on Mac
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/cli/installer/linux:
    get:
      summary: Download Linux installer script [Experimental]
      description: |
        This endpoint returns a Linux script that can be used to install the Run:ai CLI.
      operationId: get_installer_linux
      tags:
        - Researcher Command Line Interface
      responses:
        '200':
          description: File download successful
          content:
            text/plain:
              schema:
                type: string
              example: Contents of the file
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/cli/installer/linux/commands:
    get:
      summary: Get Linux installer script commands [Experimental]
      description: |
        This endpoint returns a linux script commands that can be used to install the Run:ai CLI.
      operationId: get_installer_linux_commands
      tags:
        - Researcher Command Line Interface
      responses:
        '200':
          description: A text commands to install the CLI on Linux
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Command'
              example: Contents of the commands to install the CLI on Linux
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/cli/installer/windows/commands:
    get:
      summary: Get Windows MSI installer script commands [Experimental]
      description: |
        This endpoint returns a windows script commands that can be used to install the Run:ai CLI.
      operationId: get_installer_windows_commands
      tags:
        - Researcher Command Line Interface
      responses:
        '200':
          description: A text commands to install the CLI on Windows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Command'
              example: Contents of the commands to install the CLI on Windows
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/cli/dist/{operatingSystem}/{architecture}/runai:
    get:
      summary: Download RunAI Researcher command line binary [Experimental]
      description: |
        This endpoint returns a binary file that run the Run:ai CLI.
      operationId: get_binary
      tags:
        - Researcher Command Line Interface
      parameters:
        - $ref: '#/components/parameters/OperatingSystem'
        - $ref: '#/components/parameters/Architecture'
      responses:
        '200':
          description: File download successful
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
              example: Contents of the file
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/cli/docs/{documentName}:
    get:
      summary: Get CLI document by name [Experimental]
      description: |
        This endpoint returns a document of help for the Run:ai CLI.
      operationId: get_manual_document
      tags:
        - Researcher Command Line Interface
      parameters:
        - $ref: '#/components/parameters/DocumentName'
      responses:
        '200':
          description: Executed successfully.
          content:
            text/html:
              schema:
                type: string
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '404':
          $ref: '#/components/responses/404NotFound'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/audit/log:
    get:
      description: Get audit logs based on query params filter
      summary: Get audit logs
      operationId: getAuditLogs1
      tags:
        - AuditLogs
      parameters:
        - $ref: '#/components/parameters/StartRequired'
        - $ref: '#/components/parameters/EndRequired'
        - $ref: '#/components/parameters/Offset'
        - $ref: '#/components/parameters/NumberOfSamples'
        - $ref: '#/components/parameters/SortOrder'
        - $ref: '#/components/parameters/AuditLogSort'
        - $ref: '#/components/parameters/AuditLogFilter'
      responses:
        '200':
          description: Executed successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - logs
                properties:
                  total:
                    type: integer
                    example: 2000
                  next:
                    type: integer
                    example: 100
                  audit_logs:
                    $ref: '#/components/schemas/AuditLogs'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /api/v1/audit/log/file:
    get:
      description: Download audit logs as a file, based on query params filter
      summary: Download audit logs
      operationId: downloadAuditLogs
      tags:
        - AuditLogs
      parameters:
        - in: query
          name: file_type
          schema:
            type: string
            enum:
              - CSV
              - JSON
            default: CSV
          required: false
        - $ref: '#/components/parameters/StartRequired'
        - $ref: '#/components/parameters/EndRequired'
        - $ref: '#/components/parameters/NumberOfSamples'
        - $ref: '#/components/parameters/AuditLogFilter'
      responses:
        '200':
          description: File downloaded
          content:
            application/octet-stream: {}
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
components:
  schemas:
    ClusterIdOptional:
      description: The id of the cluster.
      type: string
      format: uuid
      minLength: 1
      example: 71f69d83-ba66-4822-adf5-55ce55efd210
      nullable: true
    DepartmentIdOptional:
      description: The id of the department.
      type: string
      minLength: 1
      example: 2
      nullable: true
    Error:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          minimum: 100
          maximum: 599
        message:
          type: string
        details:
          type: string
      example:
        code: 400
        message: Bad request - Resource should have a name
    NodeStatusConditionDetails:
      type: object
      required:
        - type
        - reason
      properties:
        type:
          type: string
          description: Type of node condition.
        reason:
          type: string
          description: (brief) reason for the condition's last transition.
          example: KubeletNotReady
        message:
          type: string
          description: Human readable message indicating details about last transition.
          example: container runtime status check may not have completed yet
      x-schema-name: NodeStatusConditionDetails
    NodeTaint:
      type: object
      required:
        - key
        - effect
      properties:
        key:
          type: string
          description: The taint key to be applied to a node.
          example: foo
        value:
          type: string
          description: The taint value corresponding to the taint key.
          example: bar
        effect:
          type: string
          description: The effect of the taint on pods that do not tolerate the taint.
          enum:
            - NoSchedule
            - PreferNoSchedule
            - NoExecute
      x-schema-name: NodeTaint
    GpuInfo:
      type: object
      nullable: true
      required:
        - gpuType
        - gpuCount
      properties:
        gpuType:
          type: string
          example: Tesla-V100
        gpuCount:
          type: integer
      x-schema-name: GpuInfo
    NodeInfo:
      type: object
      required:
        - status
        - nodePool
        - createdAt
      properties:
        status:
          type: string
          enum:
            - Ready
            - NotReady
            - Unknown
          description: The calculated status of the node.
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/NodeStatusConditionDetails'
        taints:
          type: array
          items:
            $ref: '#/components/schemas/NodeTaint'
        nodePool:
          type: string
          description: The node's NodePool.
          example: node-pool-1
        createdAt:
          type: string
          format: date-time
        gpuInfo:
          $ref: '#/components/schemas/GpuInfo'
      x-schema-name: NodeInfo
    NodeAdditionalFields:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: The name of the node
          example: worker-node-1
      x-schema-name: NodeAdditionalFields
    ClusterId:
      description: The id of the cluster.
      type: string
      format: uuid
      example: 71f69d83-ba66-4822-adf5-55ce55efd210
    NodeAdditionalReadFields:
      type: object
      required:
        - clusterUuid
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the node.
        clusterUuid:
          $ref: '#/components/schemas/ClusterId'
        updatedAt:
          type: string
          format: date-time
      x-schema-name: NodeAdditionalReadFields
    Node:
      allOf:
        - $ref: '#/components/schemas/NodeInfo'
        - $ref: '#/components/schemas/NodeAdditionalFields'
        - $ref: '#/components/schemas/NodeAdditionalReadFields'
      x-schema-name: Node
    Nodes:
      type: object
      required:
        - nodes
      properties:
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/Node'
      x-schema-name: Nodes
    NodeForSync:
      allOf:
        - $ref: '#/components/schemas/NodeAdditionalFields'
        - type: object
          required:
            - nodeInfo
          properties:
            nodeInfo:
              $ref: '#/components/schemas/NodeInfo'
      x-schema-name: NodeForSync
    TenantId:
      description: The id of the tenant.
      type: integer
      format: int32
      example: 1001
    ClusterReportedConfig:
      description: Holds cluster configuration values.
      type: object
      properties:
        workloadOwnershipProtection:
          type: boolean
          nullable: true
          description: indicates if the cluster workload ownership protection is enabled
          example: false
        subdomainEnabled:
          type: boolean
          nullable: true
          description: indicates if the cluster subdomain is enabled
          example: false
      nullable: true
    ClusterDependencyStatus:
      type: object
      required:
        - available
      properties:
        available:
          type: boolean
          description: whether the dependency is available
        reason:
          type: string
          description: the reason for the dependency status
        components:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ClusterDependencyStatus'
    ClusterDependenciesStatus:
      type: object
      required:
        - required
        - optional
      properties:
        required:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ClusterDependencyStatus'
        optional:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ClusterDependencyStatus'
    ClusterReportedStatus:
      type: object
      description: the cluster status reported by the cluster
      properties:
        conditions:
          items:
            description: Condition contains details for one aspect of the current state of this API Resource
            properties:
              lastTransitionTime:
                description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
                format: date-time
                type: string
              message:
                description: message is a human readable message indicating details about the transition. This may be an empty string.
                maxLength: 32768
                type: string
              observedGeneration:
                description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
                format: int64
                minimum: 0
                type: integer
              reason:
                description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
                maxLength: 1024
                minLength: 1
                pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
                type: string
              status:
                description: status of the condition, one of True, False, Unknown.
                enum:
                  - 'True'
                  - 'False'
                  - Unknown
                type: string
              type:
                description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
                maxLength: 316
                type: string
            required:
              - lastTransitionTime
              - message
              - reason
              - status
              - type
            type: object
          type: array
        operands:
          additionalProperties:
            description: Status specifies the status of an operand. And operand manages resources, some of which are not immediately available and need their status monitored, such as Deployments, Daemonsets, Ingressess etc. Some resources are immediately available and should not be monitored once accepted by the cluster, such as Services, ConfigMaps, Secrets etc. If all resources of an operand are ready, a Status with Ready set to 'true' and a nil 'Reasons' slice should be returned, otherwise, a Status with 'Reasons' slice containig the reason why the Operand is not ready (Deployment pods are not ready for example.)
            properties:
              lastTransitionTime:
                description: LastTransitionTime specifies the last time the operand readiness changed
                format: date-time
                type: string
              ready:
                description: Ready specifies if the operand is ready or not
                type: boolean
              reasons:
                description: Reasons specifies the reasons why the operand is not ready
                items:
                  type: string
                type: array
              unreadyThresholdCrossed:
                description: UnreadyThresholdCrossed specifies if the operand has been unready for longer than the threshold
                type: boolean
            required:
              - ready
            type: object
          description: OperandStatuses specifies the status of the managed operands
          type: object
        platform:
          nullable: true
          type: object
          properties:
            type:
              nullable: true
              type: string
              enum:
                - vanilla
                - openshift
                - rke
                - gke
                - aks
                - eks
              description: the cluster platform type
            kubeVersion:
              nullable: true
              type: string
              description: the cluster kubernetes version
        config:
          $ref: '#/components/schemas/ClusterReportedConfig'
        dependencies:
          $ref: '#/components/schemas/ClusterDependenciesStatus'
    ClusterDisplayedStatus:
      type: object
      description: The cluster's displayed status.
      nullable: true
      allOf:
        - $ref: '#/components/schemas/ClusterReportedStatus'
        - type: object
          properties:
            state:
              type: string
              description: The cluster's state.
              enum:
                - WaitingToConnect
                - Connected
                - Disconnected
                - MissingPrerequisites
                - ServiceIssues
                - Unknown
    DisplayedCluster:
      type: object
      required:
        - uuid
        - tenantId
        - name
        - createdAt
      properties:
        uuid:
          type: string
          format: uuid
        tenantId:
          $ref: '#/components/schemas/TenantId'
        name:
          type: string
        createdAt:
          type: string
          format: date-time
        domain:
          type: string
          nullable: true
        version:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/ClusterDisplayedStatus'
        updatedAt:
          type: string
          format: date-time
          nullable: true
        deletedAt:
          type: string
          nullable: true
          format: date-time
        lastLiveness:
          type: string
          nullable: true
          format: date-time
        deleteRequestedAt:
          description: the timestamp value of when the cluster deletion request was received
          type: string
          format: date-time
          nullable: true
      example:
        uuid: A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11
        name: example
        tenantId: 1001
        domain: my.company.com
        status: {}
        createdAt: '2020-01-01T00:00:00Z'
        updatedAt: '2020-01-02T00:00:00Z'
        lastLiveness: '2020-01-02T00:00:00Z'
        version: 2.15.0
    ClusterCreationRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
        domain:
          type: string
        version:
          type: string
    ClusterUpdateRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
    HttpResponse:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          minimum: 100
          maximum: 599
        message:
          type: string
    MetricsType:
      type: string
      description: specifies what data to request
      enum:
        - TOTAL_GPU_NODES
        - GPU_UTILIZATION
        - GPU_UTILIZATION_DISTRIBUTION
        - GPU_MEMORY_UTILIZATION
        - CPU_UTILIZATION
        - CPU_MEMORY_UTILIZATION
        - TOTAL_GPU
        - GPU_QUOTA
        - ALLOCATED_GPU
        - UNALLOCATED_GPU
        - AVG_WORKLOAD_WAIT_TIME
    MeasurementResponse:
      type: object
      required:
        - type
        - values
      properties:
        type:
          type: string
          description: specifies what data returned
          example: ALLOCATED_GPU
        labels:
          type: object
          nullable: true
          description: labels of the metric measurement
          example: '{''gpu'': ''3''}'
          additionalProperties:
            type: string
        values:
          type: array
          nullable: true
          items:
            type: object
            required:
              - value
              - timestamp
            properties:
              value:
                type: string
                example: '85'
              timestamp:
                type: string
                format: date-time
                nullable: true
                example: '2023-06-06 12:09:18.211'
    MetricsResponse:
      type: object
      required:
        - measurements
      properties:
        measurements:
          type: array
          items:
            $ref: '#/components/schemas/MeasurementResponse'
    NodepoolSortFilterFields:
      type: string
      enum:
        - name
        - phase
        - clusterId
        - createdAt
        - updatedAt
    PlacementStrategy:
      type: string
      enum:
        - spread
        - binpack
      example: spread
      nullable: true
    NodepoolCreateFields:
      type: object
      required:
        - name
        - labelKey
        - labelValue
        - clusterId
      properties:
        name:
          type: string
          example: v100
          minLength: 1
        labelKey:
          type: string
          description: Label key for associated nodes to the Node Pool (with value as in labelValue)
          example: node-type
          minLength: 1
        labelValue:
          type: string
          description: Label value for associated nodes to the Node Pool (with key as in labelKey)
          example: type-x
          minLength: 1
        clusterId:
          type: string
          format: uuid
          example: d73a738f-fab3-430a-8fa3-5241493d7128
        overProvisioningRatio:
          type: integer
          example: 1
          minimum: 1
          maximum: 5
          default: 1
          nullable: true
        placementStrategy:
          description: scheduling strategy per resource
          properties:
            cpu:
              $ref: '#/components/schemas/PlacementStrategy'
            gpu:
              $ref: '#/components/schemas/PlacementStrategy'
    NodepoolPhase:
      type: string
      enum:
        - Creating
        - Updating
        - Deleting
        - Empty
        - Unschedulable
        - Ready
        - Deleted
      description: Phase of Node Pool
    NodepoolUpdateFields:
      type: object
      properties:
        labelKey:
          type: string
          description: Label key for associated nodes to the Node Pool (with value as in labelValue)
          example: node-type
          minLength: 1
          nullable: true
        labelValue:
          type: string
          description: Label value for associated nodes to the Node Pool (with key as in labelKey)
          example: type-x
          minLength: 1
          nullable: true
        overProvisioningRatio:
          type: integer
          example: 1
          minimum: 1
          maximum: 5
          default: 1
          nullable: true
        placementStrategy:
          description: scheduling strategy per resource
          properties:
            cpu:
              $ref: '#/components/schemas/PlacementStrategy'
            gpu:
              $ref: '#/components/schemas/PlacementStrategy'
    NodepoolSyncFields:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          example: v100
        phase:
          $ref: '#/components/schemas/NodepoolPhase'
        phaseMessage:
          type: string
          description: Message for status of Node Pool
          example: all nodes are down
        status:
          allOf:
            - $ref: '#/components/schemas/NodepoolUpdateFields'
            - type: object
              properties:
                nodes:
                  type: array
                  items:
                    type: string
                    example: node1
    NodepoolCalculatedFields:
      type: object
      required:
        - id
        - tenantId
        - clusterName
        - createdBy
        - createdAt
        - updatedBy
        - updatedAt
        - isDefault
      properties:
        id:
          type: string
          description: The NodePool id
          readOnly: true
          example: 5
        tenantId:
          description: The id of the tenant.
          type: integer
          example: 1
          format: int32
        clusterName:
          type: string
          example: prod-cluster
        createdBy:
          type: string
          example: user@lab.com
        createdAt:
          type: string
          format: date-time
        updatedBy:
          type: string
          example: user@lab.com
        updatedAt:
          type: string
          format: date-time
        deletedBy:
          type: string
          example: user@lab.com
        deletedAt:
          type: string
          nullable: true
          format: date-time
        isDefault:
          type: boolean
          description: Is the Node Pool is the cluster default
          example: false
    Nodepool:
      allOf:
        - $ref: '#/components/schemas/NodepoolCreateFields'
        - $ref: '#/components/schemas/NodepoolSyncFields'
        - $ref: '#/components/schemas/NodepoolCalculatedFields'
    ClusterInstallationInfoResponse:
      type: object
      required:
        - installationStr
        - repositoryName
        - chartRepoURL
        - clientSecret
      properties:
        installationStr:
          type: string
        repositoryName:
          type: string
        chartRepoURL:
          type: string
        clientSecret:
          type: string
      example:
        installationStr: helm update --update repo/runai-cluster -n runai --set cluster.url=test_cluster
        repositoryName: runai
        chartRepoURL: https://runai.jfrog.io/artifactory/charts
        clientSecret: ABC333DDD
    NodeTelemetryType:
      type: string
      enum:
        - READY_GPU_NODES
        - READY_GPUS
        - TOTAL_GPU_NODES
        - TOTAL_GPUS
        - IDLE_ALLOCATED_GPUS
        - FREE_GPUS
        - ALLOCATED_GPUS
        - TOTAL_CPU_CORES
        - USED_CPU_CORES
        - ALLOCATED_CPU_CORES
        - TOTAL_GPU_MEMORY_BYTES
        - USED_GPU_MEMORY_BYTES
        - TOTAL_CPU_MEMORY_BYTES
        - USED_CPU_MEMORY_BYTES
        - ALLOCATED_CPU_MEMORY_BYTES
    TelemetryResponse:
      type: object
      required:
        - type
        - timestamp
        - values
      properties:
        type:
          type: string
          description: specifies what data returned
          example: ALLOCATION_RATIO
        timestamp:
          type: string
          format: date-time
          example: '2023-06-06 12:09:18.211'
        values:
          type: array
          items:
            type: object
            required:
              - value
            properties:
              value:
                type: string
                example: '85'
              groups:
                type: array
                description: columns the data is grouped by
                maxItems: 2
                items:
                  type: object
                  required:
                    - key
                    - value
                  properties:
                    key:
                      type: string
                      example: department
                    value:
                      type: string
                      example: '1'
                    name:
                      type: string
                      example: department-A
    NodeMetricType:
      type: string
      description: Specify which metric data to request.
      enum:
        - GPU_UTILIZATION_PER_GPU
        - GPU_UTILIZATION
        - GPU_MEMORY_UTILIZATION_PER_GPU
        - GPU_MEMORY_UTILIZATION
        - GPU_MEMORY_USAGE_BYTES_PER_GPU
        - GPU_MEMORY_USAGE_BYTES
        - CPU_USAGE_CORES
        - CPU_UTILIZATION
        - CPU_MEMORY_USAGE_BYTES
        - CPU_MEMORY_UTILIZATION
    Metadata:
      type: object
      required:
        - id
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          nullable: true
          format: date-time
        tenantId:
          $ref: '#/components/schemas/TenantId'
    ClusterUserConfig:
      type: object
      description: Cluster configuration
      allOf:
        - $ref: '#/components/schemas/Metadata'
        - type: object
          properties:
            clusterId:
              type: string
              format: uuid
    ComplianceIssues:
      properties:
        complianceIssues:
          type: array
          items:
            type: object
            required:
              - details
              - field
            properties:
              field:
                type: string
                example: compute.gpuDevicesRequest
              details:
                type: string
                example: value must be no less than 3
      nullable: true
      type: object
    SubmissionError:
      allOf:
        - $ref: '#/components/schemas/Error'
        - $ref: '#/components/schemas/ComplianceIssues'
    ScopeType:
      type: string
      enum:
        - system
        - tenant
        - cluster
        - department
        - project
    ReportGroupByOptions:
      type: string
      nullable: true
      enum:
        - Nodepool
        - Project
        - Department
        - Cluster
    ReportRequestFields:
      type: object
      required:
        - name
        - start
        - end
      properties:
        name:
          type: string
          example: 2023 GPU report
        start:
          type: string
          format: date-time
          description: timestamp from when to fetch data in UTC
          example: '2023-06-07 12:09:18.211'
        end:
          type: string
          format: date-time
          description: timestamp until when to fetch data in UTC
          example: '2023-06-07 12:09:18.211'
        groupBy:
          $ref: '#/components/schemas/ReportGroupByOptions'
        filterBy:
          type: array
          description: Filter results by a parameter. Use the format field-name == value.
          default: []
          items:
            type: string
            pattern: ^(projectName|departmentName|clusterId)(==).+$
          example:
            - projectName==some-name
    ReportStatus:
      type: string
      enum:
        - Pending
        - Processing
        - Ready
        - Failed
    ReportCalculatedFields:
      type: object
      required:
        - id
        - tenantId
        - createdAt
        - createdBy
        - status
        - statusUpdatedAt
      properties:
        id:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
          example: user@run.ai
        tenantId:
          type: integer
          format: int32
          description: ID of the tenant where the project is located.
          example: 2
        status:
          $ref: '#/components/schemas/ReportStatus'
        statusUpdatedAt:
          type: string
          format: date-time
        statusMessage:
          type: string
          example: Report in queue
    Report:
      allOf:
        - $ref: '#/components/schemas/ReportRequestFields'
        - $ref: '#/components/schemas/ReportCalculatedFields'
    DepartmentFilterSortFields:
      type: string
      enum:
        - name
        - clusterId
        - totalGpuQuota
        - gpuAllocated
        - createdAt
        - avgGpuAllocation24h
        - avgGpuUtilization24h
        - avgGpuAllocation7d
        - avgGpuUtilization7d
        - avgGpuAllocation30d
        - avgGpuUtilization30d
    Verbosity:
      type: string
      enum:
        - meta
        - brief
        - verbose
    NonNullResource:
      required:
        - deserved
      properties:
        deserved:
          type: number
          description: The project resource allocation that it is deserved to get in case the cluster has those resources
          example: 1000
        limit:
          type: number
          description: Maximum amount of resources the project can get
          nullable: true
          example: 0
        overQuotaWeight:
          type: number
          description: The priority the project gets for over quota resources
          nullable: true
          example: 2
    Resource:
      properties:
        deserved:
          type: number
          description: The project resource allocation that it is deserved to get in case the cluster has those resources
          nullable: true
          example: 1000
        limit:
          type: number
          description: Maximum amount of resources the project can get
          nullable: true
          example: 0
        overQuotaWeight:
          type: number
          description: The priority the project gets for over quota resources
          nullable: true
          example: 2
    units:
      type: string
      enum:
        - Mib
        - MB
        - GB
    Resources:
      required:
        - gpu
      properties:
        nodePool:
          required:
            - id
          properties:
            id:
              type: string
              description: node pool id
              example: 22
            name:
              type: string
              description: node pool name
              example: default
          description: the node pool which the resources refer to
          type: object
          nullable: true
        gpu:
          allOf:
            - $ref: '#/components/schemas/NonNullResource'
            - description: GPU number to the project in the node pool
        cpu:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Resource'
            - description: CPU in Millicores to the project in the node pool
        memory:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Resource'
            - type: object
              description: Memory to the project in the node pool
              required:
                - units
              properties:
                units:
                  $ref: '#/components/schemas/units'
    SchedulingRules:
      type: object
      nullable: true
      properties:
        interactiveJobTimeLimitSeconds:
          type: integer
          description: interactive job time limit in seconds
          nullable: true
          example: 100
          minimum: 1
        interactiveJobMaxIdleDurationSeconds:
          type: integer
          description: interactive job max idle duration in seconds
          nullable: true
          example: 100
          minimum: 1
        interactiveJobPreemptIdleDurationSeconds:
          type: integer
          description: interactive job preempt idle duration in seconds
          nullable: true
          example: 100
          minimum: 1
        trainingJobMaxIdleDurationSeconds:
          type: integer
          description: training job max idle duration in seconds
          nullable: true
          example: 100
          minimum: 1
        trainingJobTimeLimitSeconds:
          type: integer
          description: training job time limit in seconds
          nullable: true
          example: 100
          minimum: 1
    NodeTypesPerWorkload:
      properties:
        training:
          type: array
          description: ids of the node types for training workloads
          items:
            type: string
        workspace:
          type: array
          description: ids of the node types for workspace workloads
          items:
            type: string
        names:
          nullable: true
          type: object
          additionalProperties:
            type: string
          description: mapping of ids to names
    DataUpdatableDepartmentFields:
      type: object
      description: Updatable fields
      required:
        - resources
      properties:
        description:
          type: string
          description: department's description
        resources:
          type: array
          items:
            $ref: '#/components/schemas/Resources'
          description: Resources assigned to this Organization per Node Pool
        schedulingRules:
          $ref: '#/components/schemas/SchedulingRules'
        defaultNodePools:
          description: default order of node pools for workloads. will be enforced if no list is defined in workload policy
          type: array
          nullable: true
          items:
            type: string
        nodeTypes:
          description: default node types configuration for workloads. will be enforced if no node type is configured in workload policy
          nullable: true
          $ref: '#/components/schemas/NodeTypesPerWorkload'
    OvertimeRangeData:
      type: object
      description: Average data for the specified time range, or for the lifetime of the project/department if it exists for less than the time range.
      properties:
        averageGpuAllocation:
          type: number
          example: 10
          description: The average gpu devices allocation of the project/department.
        averageGpuUtilization:
          type: number
          example: 95
          description: The average gpu utilization percentage of the project/department.
        updatedAt:
          type: string
          format: date-time
          example: '2021-08-01T00:00:00Z'
    OvertimeData:
      type: object
      properties:
        range24hData:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/OvertimeRangeData'
        range7dData:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/OvertimeRangeData'
        range30dData:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/OvertimeRangeData'
    DataDepartmentFields:
      allOf:
        - $ref: '#/components/schemas/DataUpdatableDepartmentFields'
        - type: object
          required:
            - name
            - clusterId
          properties:
            name:
              type: string
              example: organization1
            clusterId:
              $ref: '#/components/schemas/ClusterId'
            overtimeData:
              $ref: '#/components/schemas/OvertimeData'
    DepartmentProjectChild:
      type: object
      description: Department or project child
      required:
        - id
        - name
      properties:
        id:
          type: string
          format: uuid
          example: 9f55253e-11ed-47c7-acef-fc4054768dbc
        name:
          type: string
          example: organization1
        children:
          type: array
          items:
            $ref: '#/components/schemas/DepartmentProjectChild'
    QuotaStatusResource:
      type: object
      properties:
        gpu:
          type: number
          description: The number of GPUs (allocated/requested/...).
          example: 0
        cpu:
          type: number
          description: CPU in Millicores (allocated/requested/...).
          example: 1000
        memory:
          type: number
          description: Memory in MB (allocated/requested/...).
          example: 1000
    QuotaStatus:
      type: object
      description: Sum of all quota statuses of all the node pools
      properties:
        allocated:
          $ref: '#/components/schemas/QuotaStatusResource'
        allocatedNonPreemptible:
          $ref: '#/components/schemas/QuotaStatusResource'
        requested:
          $ref: '#/components/schemas/QuotaStatusResource'
    TotalResources:
      type: object
      properties:
        gpuQuota:
          type: number
          description: Total gpu quota of the org unit
          nullable: true
        cpuQuota:
          type: number
          description: Total cpu quota of the org unit in Millicores
          nullable: true
        memoryQuota:
          type: number
          description: Total memory quota of the org unit in MB
          nullable: true
    DepartmentForList:
      allOf:
        - $ref: '#/components/schemas/DataDepartmentFields'
        - type: object
          required:
            - id
            - createdAt
            - updatedAt
            - totalResources
          properties:
            id:
              type: string
              example: 50
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            createdBy:
              type: string
            updatedBy:
              type: string
            children:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/DepartmentProjectChild'
            status:
              type: object
              nullable: true
              properties:
                quotaStatus:
                  $ref: '#/components/schemas/QuotaStatus'
            totalResources:
              $ref: '#/components/schemas/TotalResources'
              nullable: true
    DepartmentCreationRequest:
      allOf:
        - $ref: '#/components/schemas/DataDepartmentFields'
    DeservedResource:
      properties:
        deserved:
          type: number
          description: The project resource allocation that it is deserved to get in case the cluster has those resources
          nullable: true
          example: 1000
    AggregatedResources:
      type: object
      description: Sum of all resources assigned to the projects under this department per Node Pool
      required:
        - nodePool
      properties:
        nodePool:
          type: object
          description: the node pool which the resources refer to
          required:
            - id
            - name
          properties:
            id:
              type: string
              description: node pool id
              example: 22
            name:
              type: string
              description: node pool name
              example: default
        gpu:
          $ref: '#/components/schemas/DeservedResource'
        cpu:
          $ref: '#/components/schemas/DeservedResource'
        memory:
          allOf:
            - $ref: '#/components/schemas/DeservedResource'
            - type: object
              required:
                - units
              properties:
                units:
                  $ref: '#/components/schemas/units'
    QuotaStatusNodePool:
      allOf:
        - $ref: '#/components/schemas/QuotaStatus'
        - type: object
          required:
            - nodePoolName
            - nodePoolId
          properties:
            nodePoolName:
              type: string
              description: The node pool name which the current quota status refers to
            nodePoolId:
              type: string
              description: The node pool id which the current quota status refers to
    Department:
      allOf:
        - $ref: '#/components/schemas/DataDepartmentFields'
        - type: object
          required:
            - id
            - name
            - description
            - createdAt
            - updatedAt
            - totalResources
          properties:
            id:
              type: string
              example: 50
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            createdBy:
              type: string
            updatedBy:
              type: string
            children:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/DepartmentProjectChild'
            projectsAggregatedResources:
              type: array
              nullable: true
              items:
                $ref: '#/components/schemas/AggregatedResources'
            status:
              type: object
              properties:
                nodePoolQuotaStatuses:
                  type: array
                  items:
                    $ref: '#/components/schemas/QuotaStatusNodePool'
                quotaStatus:
                  $ref: '#/components/schemas/QuotaStatus'
            totalResources:
              $ref: '#/components/schemas/TotalResources'
    DepartmentUpdateRequest:
      allOf:
        - $ref: '#/components/schemas/DataUpdatableDepartmentFields'
    ResourcesUpdateRequest:
      type: array
      items:
        $ref: '#/components/schemas/Resources'
      description: Resources assigned to this Project per Node Pool
    ProjectFilterSortFields:
      type: string
      enum:
        - name
        - clusterId
        - departmentId
        - parentId
        - parentName
        - phase
        - totalGpuQuota
        - gpuAllocated
        - createdAt
        - avgGpuAllocation24h
        - avgGpuUtilization24h
        - avgGpuAllocation7d
        - avgGpuUtilization7d
        - avgGpuAllocation30d
        - avgGpuUtilization30d
    DataUpdatableFields:
      type: object
      description: Updatable fields
      required:
        - resources
      properties:
        description:
          type: string
          description: project's description
        schedulingRules:
          $ref: '#/components/schemas/SchedulingRules'
        defaultNodePools:
          description: default order of node pools for workloads. will be enforced if no list is defined in workload policy
          type: array
          nullable: true
          items:
            type: string
        nodeTypes:
          description: default node types configuration for workloads. will be enforced if no node type is configured in workload policy
          nullable: true
          $ref: '#/components/schemas/NodeTypesPerWorkload'
        resources:
          type: array
          items:
            $ref: '#/components/schemas/Resources'
          description: Resources assigned to this Organization per Node Pool
    DataFields:
      allOf:
        - $ref: '#/components/schemas/DataUpdatableFields'
        - type: object
          required:
            - name
            - clusterId
          properties:
            name:
              type: string
              example: organization1
            clusterId:
              $ref: '#/components/schemas/ClusterId'
    ProjectPhase:
      type: string
      enum:
        - Creating
        - Updating
        - Deleting
        - Initializing
        - Ready
        - NotReady
        - Unknown
    ProjectStatus:
      type: object
      properties:
        namespace:
          type: string
          description: the project's namespace
          nullable: true
          example: runai-proj1
        phase:
          $ref: '#/components/schemas/ProjectPhase'
          description: the project's phase
        phaseMessage:
          type: string
          description: the project's phase message
          nullable: true
          example: Project is ready
        nodePoolQuotaStatuses:
          type: array
          items:
            $ref: '#/components/schemas/QuotaStatusNodePool'
        quotaStatus:
          $ref: '#/components/schemas/QuotaStatus'
        additionalStatusData:
          nullable: true
          type: object
          additionalProperties: true
    DepartmentProjectParent:
      type: object
      nullable: true
      description: Department or project parent
      required:
        - id
        - name
      properties:
        id:
          type: string
          format: uuid
          example: 9f55253e-11ed-47c7-acef-fc4054768dbc
        name:
          type: string
          example: organization1
        parent:
          $ref: '#/components/schemas/DepartmentProjectParent'
    ProjectEffective:
      properties:
        schedulingRules:
          $ref: '#/components/schemas/SchedulingRules'
        defaultNodePools:
          description: default order of node pools for workloads. will be enforced if no list is defined in workload policy
          type: array
          nullable: true
          items:
            type: string
        nodeTypes:
          description: default node types configuration for workloads. will be enforced if no node type is configured in workload policy
          nullable: true
          $ref: '#/components/schemas/NodeTypesPerWorkload'
    Project:
      allOf:
        - $ref: '#/components/schemas/DataFields'
        - type: object
          required:
            - id
            - name
            - parentId
            - createdAt
            - updatedAt
            - totalResources
            - effective
            - status
            - description
          properties:
            id:
              type: string
              example: 33
            parentId:
              type: string
              description: department parent uuid
              example: 53a9228e-a722-420d-a102-9dc90da2efca
            requestedNamespace:
              type: string
              description: the project's namespace only if requested
              nullable: true
              example: runai-proj1
            status:
              $ref: '#/components/schemas/ProjectStatus'
            totalResources:
              $ref: '#/components/schemas/TotalResources'
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            createdBy:
              type: string
            updatedBy:
              type: string
            parent:
              $ref: '#/components/schemas/DepartmentProjectParent'
            effective:
              $ref: '#/components/schemas/ProjectEffective'
            overtimeData:
              $ref: '#/components/schemas/OvertimeData'
    ProjectCreationRequest:
      allOf:
        - $ref: '#/components/schemas/DataFields'
        - type: object
          properties:
            requestedNamespace:
              type: string
              description: project's requested namespace
              example: runai-proj1
            parentId:
              type: string
              description: department parent uuid
              example: 53a9228e-a722-420d-a102-9dc90da2efca
              nullable: true
    ProjectUpdateRequest:
      allOf:
        - $ref: '#/components/schemas/DataUpdatableFields'
    ResourceV1Response:
      required:
        - deserved
        - overQuotaWeight
        - maxAllowed
      properties:
        deserved:
          type: number
          description: The amount of resources guaranteed to be allocated in case the cluster has those resources.
          example: 0
          nullable: true
        maxAllowed:
          type: number
          description: Maximum amount of resources that can be allocated. If equal to deserved, no over-quota will be allowed. Use "-1" for unlimited over quota.
          example: 1000
          nullable: true
        overQuotaWeight:
          type: number
          description: The priority for over quota resources.
          example: 2
          nullable: true
    NodePoolAssignedResourcesV1Response:
      required:
        - nodePool
        - id
        - gpu
        - cpu
        - memory
      properties:
        id:
          description: The id of the assigned resources. Required in PUT when updating the assigned resources.
          type: number
        nodePool:
          required:
            - id
          properties:
            id:
              type: number
              description: Node pool id.
              example: 3
            name:
              type: string
              description: Node pool name.
              example: default
          description: The node pool which the assigned resources refer to.
        gpu:
          allOf:
            - $ref: '#/components/schemas/ResourceV1Response'
          description: Number of GPUs assigned in the node pool.
        cpu:
          allOf:
            - $ref: '#/components/schemas/ResourceV1Response'
          description: Number of CPU Millicores assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled.
        memory:
          allOf:
            - $ref: '#/components/schemas/ResourceV1Response'
          description: Amount of CPU Memory Mib assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled.
    AssignedResourcesV1Response:
      required:
        - gpu
        - cpu
        - memory
      properties:
        id:
          type: number
        gpu:
          allOf:
            - $ref: '#/components/schemas/ResourceV1Response'
          description: GPU number assigned
        cpu:
          allOf:
            - $ref: '#/components/schemas/ResourceV1Response'
          description: CPU Millicores assigned. Supported only if 'CPU Resources Quota' feature flag is enabled.
        memory:
          allOf:
            - $ref: '#/components/schemas/ResourceV1Response'
          description: CPU Memory Mib assigned. Supported only if 'CPU Resources Quota' feature flag is enabled.
    DepartmentV1CommonFieldsResponse:
      required:
        - deservedGpus
        - maxAllowedGpus
      properties:
        nodePoolsResources:
          type: array
          items:
            $ref: '#/components/schemas/NodePoolAssignedResourcesV1Response'
          description: Resources assigned to the Department per node pool.
        name:
          type: string
          description: The name of the department.
          example: default
        deservedGpus:
          type: number
          description: Deprecated. Instead, use `deserved` for the relevant resource type under `NodePoolResources`. Deserved GPUs for the department.
          example: 2
          deprecated: true
        allowOverQuota:
          type: boolean
          description: Deprecated. Instead, use `maxAllowed` for the relevant resource type under `NodePoolResources`. Is over quota allowed for the department.
          example: false
          deprecated: true
        maxAllowedGpus:
          type: number
          description: Deprecated. Instead, use `maxAllowed` for the relevant resource type under `NodePoolResources`. Max allowed GPUs for the department.
          example: 2
          deprecated: true
        resources:
          allOf:
            - $ref: '#/components/schemas/AssignedResourcesV1Response'
          description: Deprecated. Instead, use 'nodePoolsResources'. Total resources assigned to the Department. Can only be used in PUT/POST when there is a single Node Pool in the system. The resources returned in GET are the sum of all Node Pool Resources.
          deprecated: true
    ProjectV1NodeAffinityResponse:
      properties:
        train:
          required:
            - selectedTypes
          properties:
            affinityType:
              type: string
              enum:
                - no_limit
                - only_selected
              description: The type of affinity of the jobs on the nodes.
            selectedTypes:
              type: array
              items:
                properties:
                  id:
                    type: number
                  name:
                    type: string
          description: Node affinity configuration for training jobs.
        interactive:
          required:
            - selectedTypes
          properties:
            affinityType:
              type: string
              enum:
                - no_limit
                - only_selected
              description: The type of affinity of the jobs on the nodes.
            selectedTypes:
              type: array
              items:
                properties:
                  id:
                    type: number
                  name:
                    type: string
          description: Node affinity configuration for interactive jobs.
      description: Node affinity configuration for jobs in the project.
      type: object
      nullable: true
    ProjectV1ResponseCommonFields:
      required:
        - deservedGpus
        - maxAllowedGpus
        - gpuOverQuotaWeight
      properties:
        nodePoolsResources:
          type: array
          items:
            $ref: '#/components/schemas/NodePoolAssignedResourcesV1Response'
          description: Resources assigned to this Project per Node Pool.
        deservedGpus:
          type: number
          description: Deprecated. Use 'deserved' for the relevant resource type under `NodePoolResources`. The project's deserved GPU allocation in case the cluster has those resources.
          example: 3
          deprecated: true
        maxAllowedGpus:
          type: number
          description: Deprecated. Instead, use `maxAllowed` for the relevant resource type under `NodePoolResources`. An upper limit for the amount of GPUs the project can get (Even if over quota is allowed and resources are available).
          example: 5
          deprecated: true
        gpuOverQuotaWeight:
          type: number
          description: Deprecated. Instead, use `overQuotaWeight` for the relevant resource type under `NodePoolResources`. The priority the project gets for over quota resources.
          maximum: 3
          minimum: 0
          example: 1
          deprecated: true
        defaultNodePools:
          type: array
          description: Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.
          items:
            type: string
          example:
            - default
        interactiveJobTimeLimitSecs:
          type: number
          description: A limit (in seconds) for the duration of interactive jobs from this project.
          example: 3600
        interactiveJobMaxIdleDurationSecs:
          type: number
          description: Maximum duration (in seconds) that an interactive job can be idle before being terminated.
          example: 3000
        interactivePreemptibleJobMaxIdleDurationSecs:
          type: number
          description: Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated.
          example: 3000
        trainingJobTimeLimitSecs:
          type: number
          description: A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12
          example: 3600
        trainingJobMaxIdleDurationSecs:
          type: number
          description: Maximum duration (in seconds) that a training job can be idle before being terminated.
          example: 3000
        nodeAffinity:
          $ref: '#/components/schemas/ProjectV1NodeAffinityResponse'
        permissions:
          required:
            - users
            - groups
          properties:
            users:
              type: array
              items:
                type: string
              description: Names of users that have permissions to the project.
              nullable: true
            groups:
              type: array
              items:
                type: string
              description: Names of groups that have permissions to the project.
              nullable: true
            applications:
              type: array
              items:
                type: string
              description: Names of applications that have permissions to the project.
          description: Deprecated. Instead, use the `accessRules` API to add permissions to a specific subject in the project scope.
          deprecated: true
        resources:
          allOf:
            - $ref: '#/components/schemas/AssignedResourcesV1Response'
          deprecated: true
          description: Deprecated. Instead, use `nodePoolsResources`. Total resources assigned to the Project. Can only be used in PUT/POST when there is a single Node Pool in the system. The resources returned in `GET` are the sum of all Node Pool Resources.
    QuotaStatusResourceListV1:
      properties:
        gpu:
          type: number
          description: The number of GPUs (allocated/requested/...).
          example: 0
        cpu:
          type: number
          description: CPU in Millicores (allocated/requested/...).
          example: 1000
        memory:
          type: number
          description: Memory in Mib (allocated/requested/...).
          example: 1000
    QuotaStatusV1:
      type: array
      items:
        properties:
          nodePoolName:
            type: string
            description: The node pool name which the current quota status refers to.
          allocated:
            $ref: '#/components/schemas/QuotaStatusResourceListV1'
          allocatedNonPreemptible:
            $ref: '#/components/schemas/QuotaStatusResourceListV1'
          requested:
            $ref: '#/components/schemas/QuotaStatusResourceListV1'
      description: The current quota status for each node pool. Supported only for cluster versions 2.15+ or higher.
    ProjectV1:
      allOf:
        - required:
            - namespace
            - nodePoolsResources
            - resources
        - $ref: '#/components/schemas/ProjectV1ResponseCommonFields'
        - properties:
            name:
              type: string
              description: Project name.
              example: team-a
            nodePoolsResources:
              type: array
              items:
                $ref: '#/components/schemas/NodePoolAssignedResourcesV1Response'
              description: Resources assigned to this Project per Node Pool.
            namespace:
              type: string
              description: The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher.
              example: ns-proj1
            id:
              type: integer
              format: int32
              description: Project id.
              readOnly: true
              example: 5
            departmentId:
              type: integer
              format: int32
              description: ID of the department that owns the project.
              example: 2
            tenantId:
              type: integer
              format: int32
              description: ID of the tenant where the project is located.
              example: 2
            clusterUuid:
              type: string
              format: uuid
              description: ID of the cluster where the project is located.
              example: 71f69d83-ba66-4822-adf5-55ce55efd210
            departmentName:
              type: string
              description: Name of the department where the project is located.
              example: department-a
            interactiveNodeAffinity:
              type: string
              example: none
            trainNodeAffinity:
              type: string
              example: none
            createdAt:
              type: string
              description: Creation date of the project.
              format: date-time
              example: '2021-12-14T16:04:15.099Z'
            status:
              type: object
              required:
                - quotaStatuses
              properties:
                namespace:
                  type: string
                  description: The namespace of the project
                  example: runai-team-a
                message:
                  type: string
                  description: Detailed phase message
                  example: NamespaceHandlerFailed
                phase:
                  type: string
                  description: project's phase
                  example: Ready
                conditions:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: string
                quotaStatuses:
                  $ref: '#/components/schemas/QuotaStatusV1'
            phase:
              type: string
              description: project's phase
              example: Ready
            quotaStatuses:
              type: string
              nullable: true
    DepartmentForGetV1:
      allOf:
        - $ref: '#/components/schemas/DepartmentV1CommonFieldsResponse'
        - required:
            - projects
          properties:
            tenantId:
              type: integer
              description: The tenant id this cluster belongs to.
              example: 42
            clusterUuid:
              type: string
              example: d4e09285-59e2-4df8-91e1-9119f9afb1dd
              description: The cluster UUID this department belongs to.
            createdAt:
              type: string
              description: The creation date of the department.
              format: date-time
              example: '2021-12-14T16:04:15.099Z'
            id:
              type: integer
              format: int32
              description: The unique id identifying the department.
              example: 2
            projects:
              type: array
              items:
                $ref: '#/components/schemas/ProjectV1'
              description: Projects under this department.
              example:
                - id: 16
                  name: team-a
                  deserved_gpus: 3
            projectsDeservedGpus:
              type: string
              description: Deprecated. Instead, use 'nodePoolsResources' field. Total deserved GPUs of the projects under this department - as string.
              example: '3.00'
              deprecated: true
            departmentAdmins:
              type: array
              items:
                type: string
              description: Id's of users with department admin role that are assigned to managed the department
            quotaStatuses:
              type: array
              nullable: true
              items:
                type: object
            projectAggregatedNodePoolsResources:
              type: array
              nullable: true
              items:
                type: object
    NonNullResourceV1:
      required:
        - deserved
      properties:
        deserved:
          type: number
          description: The amount of resources guaranteed to be allocated in case the cluster has those resources.
          example: 0
        maxAllowed:
          type: number
          description: Maximum amount of resources that can be allocated. If equal to deserved, no over-quota will be allowed. Use "-1" for unlimited over quota.
          example: 1000
          nullable: true
        overQuotaWeight:
          type: number
          description: The priority for over quota resources.
          example: 2
          nullable: true
    ResourceV1:
      properties:
        deserved:
          type: number
          description: The amount of resources guaranteed to be allocated in case the cluster has those resources.
          example: 0
          nullable: true
        maxAllowed:
          type: number
          description: Maximum amount of resources that can be allocated. If equal to deserved, no over-quota will be allowed. Use "-1" for unlimited over quota.
          example: 1000
          nullable: true
        overQuotaWeight:
          type: number
          description: The priority for over quota resources.
          example: 2
          nullable: true
    NodePoolAssignedResourcesV1:
      required:
        - nodePool
        - id
      properties:
        id:
          description: The id of the assigned resources. Required in PUT when updating the assigned resources.
          type: number
        nodePool:
          required:
            - id
          properties:
            id:
              type: number
              description: Node pool id.
              example: 3
            name:
              type: string
              description: Node pool name.
              example: default
          description: The node pool which the assigned resources refer to.
        gpu:
          allOf:
            - $ref: '#/components/schemas/NonNullResourceV1'
          description: Number of GPUs assigned in the node pool.
        cpu:
          allOf:
            - $ref: '#/components/schemas/ResourceV1'
          description: Number of CPU Millicores assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled.
        memory:
          allOf:
            - $ref: '#/components/schemas/ResourceV1'
          description: Amount of CPU Memory Mib assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled.
    AssignedResourcesV1:
      properties:
        id:
          type: number
        gpu:
          allOf:
            - $ref: '#/components/schemas/ResourceV1'
          description: GPU number assigned
        cpu:
          allOf:
            - $ref: '#/components/schemas/ResourceV1'
          description: CPU Millicores assigned. Supported only if 'CPU Resources Quota' feature flag is enabled.
        memory:
          allOf:
            - $ref: '#/components/schemas/ResourceV1'
          description: CPU Memory Mib assigned. Supported only if 'CPU Resources Quota' feature flag is enabled.
    DepartmentV1CommonFields:
      properties:
        nodePoolsResources:
          type: array
          items:
            $ref: '#/components/schemas/NodePoolAssignedResourcesV1'
          description: Resources assigned to the Department per node pool.
        name:
          type: string
          description: The name of the department.
          example: default
        deservedGpus:
          type: number
          description: Deprecated. Instead, use `deserved` for the relevant resource type under `NodePoolResources`. Deserved GPUs for the department.
          example: 2
          deprecated: true
        allowOverQuota:
          type: boolean
          description: Deprecated. Instead, use `maxAllowed` for the relevant resource type under `NodePoolResources`. Is over quota allowed for the department.
          example: false
          deprecated: true
        maxAllowedGpus:
          type: number
          description: Deprecated. Instead, use `maxAllowed` for the relevant resource type under `NodePoolResources`. Max allowed GPUs for the department.
          example: 2
          deprecated: true
        resources:
          allOf:
            - $ref: '#/components/schemas/AssignedResourcesV1'
          description: Deprecated. Instead, use 'nodePoolsResources'. Total resources assigned to the Department. Can only be used in PUT/POST when there is a single Node Pool in the system. The resources returned in GET are the sum of all Node Pool Resources.
          deprecated: true
      additionalProperties: true
    DepartmentV1CreationRequest:
      allOf:
        - required:
            - name
        - $ref: '#/components/schemas/DepartmentV1CommonFields'
    MetricsResourceDataV1:
      type: object
      description: quota equals to the given resources and allocated equal to the real count of used resources
      required:
        - quota
        - allocated
      properties:
        quota:
          type: number
          example: 3
        allocated:
          type: number
          example: 2.5
        utilization:
          type: number
          example: 0.765
    MetricsResourcesDataV1:
      type: object
      required:
        - numberOfPendingWorkloads
        - gpu
        - cpu
        - memory
      properties:
        numberOfPendingWorkloads:
          type: integer
          example: 1
        gpu:
          description: GPU resources in fractions. 0.7 = 70% of a gpu
          $ref: '#/components/schemas/MetricsResourceDataV1'
        cpu:
          description: CPU resources in millicpus. 1000 = 1 cpu
          $ref: '#/components/schemas/MetricsResourceDataV1'
        memory:
          description: Memory resources in megabytes. 1 = 10^6  (1000*1000)
          $ref: '#/components/schemas/MetricsResourceDataV1'
    ResourcesDataOvertimeV1:
      allOf:
        - $ref: '#/components/schemas/MetricsResourcesDataV1'
        - type: object
          required:
            - timestamp
          properties:
            timestamp:
              type: string
              format: date-time
              example: '2023-06-06T12:09:18.211Z'
    ProjectV1NodeAffinity:
      properties:
        train:
          type: object
          properties:
            affinityType:
              type: string
              enum:
                - no_limit
                - only_selected
              description: The type of affinity of the jobs on the nodes.
            selectedTypes:
              type: array
              items:
                properties:
                  id:
                    type: number
                  name:
                    type: string
          description: Node affinity configuration for training jobs.
          nullable: true
        interactive:
          type: object
          properties:
            affinityType:
              type: string
              enum:
                - no_limit
                - only_selected
              description: The type of affinity of the jobs on the nodes.
            selectedTypes:
              type: array
              items:
                properties:
                  id:
                    type: number
                  name:
                    type: string
          description: Node affinity configuration for interactive jobs.
          nullable: true
      description: Node affinity configuration for jobs in the project.
      type: object
      nullable: true
    ProjectV1CommonFields:
      properties:
        nodePoolsResources:
          type: array
          items:
            $ref: '#/components/schemas/NodePoolAssignedResourcesV1'
          description: Resources assigned to this Project per Node Pool.
        deservedGpus:
          type: number
          description: Deprecated. Use 'deserved' for the relevant resource type under `NodePoolResources`. The project's deserved GPU allocation in case the cluster has those resources.
          example: 3
          deprecated: true
        maxAllowedGpus:
          type: number
          description: Deprecated. Instead, use `maxAllowed` for the relevant resource type under `NodePoolResources`. An upper limit for the amount of GPUs the project can get (Even if over quota is allowed and resources are available).
          example: 5
          deprecated: true
        gpuOverQuotaWeight:
          type: number
          description: Deprecated. Instead, use `overQuotaWeight` for the relevant resource type under `NodePoolResources`. The priority the project gets for over quota resources.
          maximum: 3
          minimum: 0
          example: 1
          deprecated: true
        defaultNodePools:
          type: array
          description: Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.
          items:
            type: string
          example:
            - default
        interactiveJobTimeLimitSecs:
          type: number
          description: A limit (in seconds) for the duration of interactive jobs from this project.
          example: 3600
        interactiveJobMaxIdleDurationSecs:
          type: number
          description: Maximum duration (in seconds) that an interactive job can be idle before being terminated.
          example: 3000
        interactivePreemptibleJobMaxIdleDurationSecs:
          type: number
          description: Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated.
          example: 3000
        trainingJobTimeLimitSecs:
          type: number
          description: A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12
          example: 3600
        trainingJobMaxIdleDurationSecs:
          type: number
          description: Maximum duration (in seconds) that a training job can be idle before being terminated.
          example: 3000
        nodeAffinity:
          $ref: '#/components/schemas/ProjectV1NodeAffinity'
        permissions:
          properties:
            users:
              type: array
              items:
                type: string
              description: Names of users that have permissions to the project.
            groups:
              type: array
              items:
                type: string
              description: Names of groups that have permissions to the project.
            applications:
              type: array
              items:
                type: string
              description: Names of applications that have permissions to the project.
          description: Deprecated. Instead, use the `accessRules` API to add permissions to a specific subject in the project scope.
          deprecated: true
        resources:
          allOf:
            - $ref: '#/components/schemas/AssignedResourcesV1'
          deprecated: true
          description: Deprecated. Instead, use `nodePoolsResources`. Total resources assigned to the Project. Can only be used in PUT/POST when there is a single Node Pool in the system. The resources returned in `GET` are the sum of all Node Pool Resources.
      additionalProperties: true
    Range:
      type: object
      nullable: true
      required:
        - start
        - end
      properties:
        start:
          type: string
          format: date-time
          description: timestamp from when to fetch data in UTC
          example: '2023-06-07 12:09:18.211'
        end:
          type: string
          format: date-time
          description: timestamp until when to fetch data in UTC
          example: '2023-06-07 12:09:18.211'
    DepartmentV1UpdateRequest:
      $ref: '#/components/schemas/DepartmentV1CommonFields'
    ProjectV1UpdateRequest:
      $ref: '#/components/schemas/ProjectV1CommonFields'
    Pod:
      required:
        - podId
        - podName
        - jobId
        - clusterUuid
        - imageName
        - phase
        - created
        - completed
        - lastUpdated
      properties:
        podId:
          type: string
          description: Identifier of the pod running the job.
        jobId:
          type: string
          format: uuid
          description: Unique identifier of the job.
        podGroupId:
          type: string
          description: This had been used as jobId. Remained here for backward compatibility
        clusterUuid:
          type: string
          format: uuid
          description: Unique identifier of the cluster.
        podName:
          type: string
          description: The name of the pod running the job.
        imageName:
          type: string
          description: The name of the image executed by the pod.
        nodeId:
          type: string
          description: Unique identifier of the node.
        phase:
          type: string
        status:
          type: string
        created:
          type: integer
          format: int64
          description: Creation time of the pod.
        completed:
          type: integer
          format: int64
          description: Completion time of the pod.
        started:
          type: integer
          format: int64
          description: The time when the pod started executing.
        lastUpdated:
          type: integer
          format: int64
          description: Last time the pod details were updated.
        dynamicData:
          type: object
        existsInCluster:
          type: boolean
        resourceRequest:
          type: object
          additionalProperties:
            type: number
        resourceAllocation:
          type: object
          additionalProperties:
            type: number
        nodePool:
          type: string
          description: The node pool of the pod.
        namespace:
          type: string
          description: The namespace of the pod.
    Pods:
      type: array
      items:
        $ref: '#/components/schemas/Pod'
    Deployment:
      required:
        - clusterUuid
        - created
        - id
        - name
        - namespace
        - owners
        - replicas
        - schedulerName
        - template
        - connections
      properties:
        clusterUuid:
          type: string
          format: uuid
        id:
          type: string
          format: uuid
        name:
          type: string
        namespace:
          type: string
        project:
          type: string
        owners:
          writeOnly: true
          type: array
          items:
            $ref: '#/components/schemas/Owner'
        createdAt:
          type: string
          format: date-time
        replicas:
          type: integer
          format: int32
        template:
          $ref: '#/components/schemas/PodTemplate'
        schedulerName:
          type: string
        username:
          type: string
        connections:
          type: array
          items:
            type: string
        serviceId:
          type: string
          format: uuid
        revisionId:
          type: string
          format: uuid
        inferenceworkloadName:
          type: string
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/DeploymentCondition'
        nodePool:
          type: string
      example:
        clusterUuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        template:
          containers:
            - image: image
              name: name
        createdAt: '2022-02-01T16:21:16Z'
        replicas: 6
        name: name
        namespace: namespace
        owners:
          - kind: kind
            name: name
            id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          - kind: kind
            name: name
            id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        schedulerName: runai-scheduler
        conditions:
          - type: Available
            status: true
            reason: MinimumReplicasAvailable
          - type: Progressing
            status: true
            reason: NewReplicaSetAvailable
    DeploymentCondition:
      x-schema-name: DeploymentCondition
      required:
        - status
        - type
      properties:
        type:
          type: string
          enum:
            - Available
            - Progressing
            - ReplicaFailure
        status:
          type: string
          enum:
            - 'true'
            - 'false'
            - Unknown
        reason:
          type: string
        message:
          type: string
      example:
        type: Available
        status: true
        reason: MinimumReplicasAvailable
    Deployments:
      type: array
      items:
        $ref: '#/components/schemas/Deployment'
      x-schema-name: Deployments
    PodTemplate:
      required:
        - containers
        - resourceRequest
      properties:
        containers:
          type: array
          items:
            $ref: '#/components/schemas/Container'
        resourceRequest:
          type: object
          additionalProperties:
            type: number
    Container:
      required:
        - image
        - name
      properties:
        image:
          type: string
        name:
          type: string
      example:
        image: image
        name: name
    Owner:
      required:
        - id
        - kind
        - name
      type: object
      properties:
        kind:
          type: string
        name:
          type: string
        id:
          type: string
          format: uuid
      example:
        kind: kind
        name: name
        id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
    DisplayedJob:
      type: object
      properties:
        JobId:
          type: string
          format: uuid
          description: Unique identifier of the job.
        podGroupId:
          type: string
          format: uuid
          description: Unique identifier of the pod group.
        jobName:
          type: string
          description: The name of the job.
          example: job-0
        jobType:
          type: string
        clusterId:
          type: string
          description: Unique identifier of the cluster.
        status:
          type: string
        imageName:
          type: string
          description: The name of the image executed by the pod.
          example: tensorflow
        user:
          type: string
          description: The owner of the job.
        project:
          type: string
          description: The project that the pod group belongs to.
        nodeId:
          type: string
          description: Unique identifier of the node.
        creationTime:
          type: string
          description: Creation time of the job.
        completionTime:
          type: string
          description: Completion time of the job.
        totalRuntime:
          type: string
        totalWaitTime:
          type: string
        pending:
          type: number
        running:
          type: number
        parallelism:
          type: number
        completions:
          type: number
        failed:
          type: number
        succeeded:
          type: number
        currentAllocatedGPUs:
          type: number
        currentAllocatedGPUsMemory:
          type: number
        currentRequestedGPUs:
          type: number
        totalRequestedGPUs:
          type: number
        requestedGPUsPerPodGroup:
          type: number
        requestedGPUsMemoryPerPodGroup:
          type: number
        parentWorkloadName:
          type: string
        totalRequestedMemory:
          type: number
        totalRequestedCPU:
          type: number
        totalLimitCPU:
          type: number
        totalLimitMemory:
          type: number
        workloadKind:
          type: number
          description: Specifies the kind of k8s resource that owns the pod group.
          example: runaijob
        latestPod:
          $ref: '#/components/schemas/Pod'
        cliCommand:
          type: string
        requestedMigDevices:
          type: string
          deprecated: true
        dynamicData:
          type: object
        existsInCluster:
          type: boolean
        isJupyter:
          type: boolean
          default: false
          description: If true, it indicates that the pod group runs jupyter notebook.
        jobUrl:
          type: string
        nodePool:
          type: string
          description: The node pool of the job.
    DisplayedJobs:
      type: array
      items:
        $ref: '#/components/schemas/DisplayedJob'
    PlacementStrategy1:
      properties:
        cpu:
          type: string
          enum:
            - spread
            - binpack
          description: scheduling strategy for cpu
          example: spread
        gpu:
          type: string
          enum:
            - spread
            - binpack
          description: scheduling strategy for gpu
          example: binpack
    NodePoolCreateRequest:
      properties:
        name:
          type: string
          description: Node Pool Name
          example: node-pool-a
        overProvisioningRatio:
          type: integer
          example: 1
          default: 1
        labelKey:
          type: string
          description: Label key for associated nodes to the Node Pool (with value as in labelValue)
          example: node-type
        labelValue:
          type: string
          description: Label value for associated nodes to the Node Pool (with key as in labelKey)
          example: type-x
        placementStrategy:
          $ref: '#/components/schemas/PlacementStrategy1'
    NodePoolLabelsRequest:
      properties:
        labelKey:
          type: string
          description: key of node label for pool
          example: node-type
        labelValue:
          type: string
          description: value of node label for pool
          example: type-x
    UpdateNodePoolRequest:
      properties:
        labelKey:
          type: string
          description: key of node label for pool
          example: node-type
        labelValue:
          type: string
          description: value of node label for pool
          example: type-x
        overProvisioningRatio:
          type: integer
          example: 1
          default: 1
        placementStrategy:
          $ref: '#/components/schemas/PlacementStrategy1'
    NodePool1:
      allOf:
        - $ref: '#/components/schemas/NodePoolCreateRequest'
        - properties:
            id:
              type: number
              description: Node Pool unique id
              readOnly: true
              example: 5
            clusterId:
              type: string
              format: uuid
              description: Node Pool cluster id
              example: 71f69d83-ba66-4822-adf5-55ce55efd210
            createdAt:
              type: string
              description: Node Pool creation time
              format: date-time
              example: '2021-12-14T16:04:15.099Z'
            updatedAt:
              type: string
              description: Node Pool update time
              format: date-time
              example: '2021-12-14T16:04:15.099Z'
            deletedAt:
              type: string
              description: Node Pool delete time
              format: date-time
              example: '2021-12-14T16:04:15.099Z'
            status:
              type: string
              enum:
                - Creating
                - Updating
                - Deleting
                - Empty
                - Unschedulable
                - Ready
                - Deleted
              description: Node Pool status
              example: Creating
            statusMessage:
              type: string
              description: Node Pool status details
              example: all nodes are down
            nodes:
              type: string
              description: List of Nodes that are assigned to this nodepool - as json string
              example:
                - node-a
                - node-b
            createdBy:
              type: string
              description: Node Pool creator
              example: user@run.ai
            updatedBy:
              type: string
              description: Node Pool updater
              example: user@run.ai
            isDefault:
              type: boolean
              description: Is the Node Pool the default Node Pool for all nodes not assigned to any other Node Pool
              example: false
    Role:
      type: string
      enum:
        - admin
        - department_admin
        - researcher
        - editor
        - viewer
        - research_manager
        - ml_engineer
      example: viewer
    UserType:
      enum:
        - sso-user
        - regular-user
    AuthEntityType:
      type: string
      description: The type of authentication entity.
      enum:
        - regular-user
        - sso-user
        - app
        - group
        - internal-user
        - super-admin
      example: regular-user
    UserId:
      description: Unique identifier of the user
      type: string
      format: uuid
      example: 4008188b-ab50-4aa5-a3f2-b78091ccf92d
    AuthEntity:
      properties:
        entityType:
          $ref: '#/components/schemas/AuthEntityType'
        tenantId:
          $ref: '#/components/schemas/TenantId'
        userId:
          $ref: '#/components/schemas/UserId'
        permitAllClusters:
          type: boolean
          example: false
        permittedClusters:
          type: array
          description: A list of clusters that the user or application can access.
          items:
            $ref: '#/components/schemas/ClusterId'
        roles:
          type: array
          items:
            $ref: '#/components/schemas/Role'
        createdAt:
          type: string
          format: date-time
          description: The creation date of the application.
          example: '2021-12-14T16:04:15.099Z'
    User1:
      allOf:
        - $ref: '#/components/schemas/AuthEntity'
        - required:
            - email
        - properties:
            email:
              type: string
              description: Email address of the user.
              example: user@email.com
            lastLogin:
              type: string
              format: date-time
              description: The last time the user logged into the system.
              example: '2021-12-14T16:04:15.099Z'
    UserCreationRequest:
      required:
        - email
        - password
        - roles
      properties:
        email:
          type: string
          description: Email address of the user.
          example: user@email.com
        roles:
          type: array
          items:
            $ref: '#/components/schemas/Role'
        entityType:
          $ref: '#/components/schemas/AuthEntityType'
        tenantId:
          $ref: '#/components/schemas/TenantId'
        password:
          type: string
          description: The user's password.
          example: secret!123
        needToChangePassword:
          type: boolean
          description: True if the user is requested to change his password upon next login.
          example: true
        permitAllClusters:
          type: boolean
          example: false
        userId:
          $ref: '#/components/schemas/UserId'
        permittedClusters:
          type: array
          items:
            $ref: '#/components/schemas/ClusterId'
    UserCreationResponse:
      allOf:
        - $ref: '#/components/schemas/UserCreationRequest'
    App:
      allOf:
        - $ref: '#/components/schemas/AuthEntity'
        - required:
            - name
        - properties:
            clientId:
              type: string
              description: The client ID of the application.
              example: 6d2894ba-f998-4039-bba1-caba57caf681
            name:
              type: string
              description: The name of the application.
              example: MyApplication
            revoked:
              type: boolean
              description: Whether the application has been revoked.
              example: false
    ClientId:
      description: Unique identifier of the app
      type: string
      format: uuid
      example: 4008188b-ab50-4aa5-a3f2-b78091ccf92d
    AuditLogRecord:
      properties:
        id:
          type: integer
          description: The unique id of the audit log.
          example: 12
        clusterUuid:
          $ref: '#/components/schemas/ClusterId'
        tenantId:
          $ref: '#/components/schemas/TenantId'
        happenedAt:
          type: string
          format: date-time
          description: The date and time in which the event happened.
          example: '2022-06-08T11:28:24.131Z'
        action:
          type: string
          description: The action that was performed by the user.
          example: Create
        version:
          type: string
          description: The version of the audit log record.
          example: 1
        entityId:
          type: string
          description: The id of the action related entity.
          example: 51
        entityType:
          type: string
          description: The type of the action related entity.
          example: Department
        entityName:
          type: string
          description: The name of the action related entity.
          example: MyDepartment123
        sourceType:
          type: string
          description: The type of the source of the action.
          example: User
        sourceId:
          type: string
          description: The id of the source of the action.
          example: 96a4382e-afa5-4604-9eb1-c3071aa021fc
        sourceName:
          type: string
          description: The name of the source of the action.
          example: test@run.ai
        error:
          type: string
          description: In case of a failed action, the corresponding error
          example: '{"status":404,"description":"Cluster with uuid ''19519f4b-e3a5-45c7-9451-0def7b931546'' does not exist","errorType":"BackendError"}'
        context:
          type: object
          description: The context of the action.
          example:
            user_agent: Thunder Client (https://www.thunderclient.com)
        body:
          type: object
          description: The body of the action http request.
          example:
            name: test1
            deservedGpus: 1
            allowOverQuota: false
            maxAllowedGpus: 1
    Setting:
      properties:
        active:
          type: boolean
          example: true
        category:
          type: string
          example: Department
        description:
          type: string
          example: Enable the department feature
        source:
          type: string
          example: Tenant
        label:
          type: string
          example: Show departments
        stage:
          type: string
          example: Beta
        type:
          type: string
          example: Boolean
        key:
          type: string
          example: department.use
        value:
          type: string
          example: true
    TenantSettingCreationRequest:
      properties:
        key:
          type: string
          example: department.use
        value:
          example: true
    TenantSettingCreationResponse:
      properties:
        msg:
          type: string
          example: done
    Config:
      type: object
      properties:
        tenantName:
          type: string
          example: runai
        authClientName:
          type: string
          example: runai-admin-ui
        authUrl:
          type: string
          example: https://auth.run.ai
        authRealm:
          type: string
          example: runai
    Group:
      properties:
        entityType:
          type: string
          example: group
        tenantId:
          $ref: '#/components/schemas/TenantId'
        userId:
          type: string
          description: Group's name
          example: group1
        permitAllClusters:
          type: boolean
          example: false
        permittedClusters:
          type: array
          description: A list of clusters that the user or application can access.
          items:
            $ref: '#/components/schemas/ClusterId'
        roles:
          type: array
          items:
            $ref: '#/components/schemas/Role'
        createdBy:
          type: string
          description: uid of the user
          example: aaaaa-3333-4444-bbbbbb-111
    GroupCreationRequest:
      required:
        - email
        - password
        - roles
        - username
      properties:
        username:
          type: string
          description: Group's name
          example: group1
        email:
          type: string
          description: Empty email address
          example: ''
        roles:
          type: array
          items:
            $ref: '#/components/schemas/Role'
        entityType:
          type: string
          example: sso-user
        tenantId:
          $ref: '#/components/schemas/TenantId'
        permitAllClusters:
          type: boolean
          example: false
        userId:
          type: string
          description: Group's name
          example: group1
        permittedClusters:
          type: array
          items:
            $ref: '#/components/schemas/ClusterId'
        createdBy:
          type: string
          description: uid of the user
          example: aaaaa-3333-4444-bbbbbb-111
    GroupCreationResponse:
      allOf:
        - $ref: '#/components/schemas/GroupCreationRequest'
    GroupWithName:
      allOf:
        - $ref: '#/components/schemas/Group'
        - properties:
            username:
              type: string
              description: group name
              example: group1
    ClusterName:
      type: string
      example: cluster-a
    ResourceData:
      type: object
      description: quota equals to the given resources and allocated equal to the real count of used resources
      required:
        - quota
        - allocated
      properties:
        quota:
          type: number
          example: 3
        allocated:
          type: number
          example: 2.5
        utilization:
          type: number
          example: 0.765
    ResourcesData:
      type: object
      required:
        - numberOfPendingWorkloads
        - gpu
        - cpu
        - memory
      properties:
        numberOfPendingWorkloads:
          type: integer
          example: 1
        gpu:
          description: GPU resources in fractions. 0.7 = 70% of a gpu
          $ref: '#/components/schemas/ResourceData'
        cpu:
          description: CPU resources in millicpus. 1000 = 1 cpu
          $ref: '#/components/schemas/ResourceData'
        memory:
          description: Memory resources in megabytes. 1 = 10^6  (1000*1000)
          $ref: '#/components/schemas/ResourceData'
    NodepoolName:
      type: string
      example: nodepoola
    ProjectName1:
      type: string
      example: project-a
    DepartmentName:
      type: string
      example: default
    nodepoolName:
      type: string
      example: nodepoola
    ResourcesDataOvertime:
      allOf:
        - $ref: '#/components/schemas/ResourcesData'
        - type: object
          required:
            - timestamp
          properties:
            timestamp:
              type: string
              format: date-time
              example: '2023-06-06T12:09:18.211Z'
    TimeRange:
      type: object
      description: Overtime metrics data. Returned only if both start and end query parameters are set.
      required:
        - resources
      properties:
        resources:
          type: array
          items:
            $ref: '#/components/schemas/ResourcesDataOvertime'
    cluster:
      type: object
      required:
        - metadata
        - current
      properties:
        metadata:
          type: object
          required:
            - clusterId
            - clusterName
          properties:
            clusterId:
              $ref: '#/components/schemas/ClusterId'
            clusterName:
              $ref: '#/components/schemas/ClusterName'
        current:
          type: object
          description: Current reported metrics data. resources holds data that is summed up to the cluster level and projectResources explains the division of it to projects
          required:
            - resources
            - projectResources
          properties:
            resources:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/ResourcesData'
                  - type: object
                    required:
                      - nodepoolName
                    properties:
                      nodepoolName:
                        $ref: '#/components/schemas/NodepoolName'
            projectResources:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/ResourcesData'
                  - type: object
                    required:
                      - projectName
                      - departmentName
                      - nodepoolName
                    properties:
                      projectName:
                        $ref: '#/components/schemas/ProjectName1'
                      departmentName:
                        $ref: '#/components/schemas/DepartmentName'
                      nodepoolName:
                        $ref: '#/components/schemas/nodepoolName'
        timeRange:
          $ref: '#/components/schemas/TimeRange'
    DepartmentId:
      description: The id of the department
      type: integer
      format: int32
      minimum: 1
      example: 8
    Department1:
      type: object
      required:
        - metadata
        - current
      properties:
        metadata:
          type: object
          required:
            - departmentId
            - departmentName
            - clusterId
            - clusterName
          properties:
            departmentId:
              $ref: '#/components/schemas/DepartmentId'
            departmentName:
              $ref: '#/components/schemas/DepartmentName'
            clusterId:
              $ref: '#/components/schemas/ClusterId'
            clusterName:
              $ref: '#/components/schemas/ClusterName'
        current:
          type: object
          description: Current reported metrics data. resources holds data that is summed up to the department level and projectResources explains the division of it to projects
          required:
            - resources
            - projectResources
          properties:
            resources:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/ResourcesData'
                  - type: object
                    required:
                      - nodepoolName
                    properties:
                      nodepoolName:
                        $ref: '#/components/schemas/NodepoolName'
            projectResources:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/ResourcesData'
                  - type: object
                    required:
                      - projectName
                      - nodepoolName
                    properties:
                      projectName:
                        $ref: '#/components/schemas/ProjectName1'
                      nodepoolName:
                        $ref: '#/components/schemas/NodepoolName'
        timeRange:
          $ref: '#/components/schemas/TimeRange'
    departments:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Department1'
              - properties:
                  timeRange:
                    example: null
        timeRange:
          $ref: '#/components/schemas/TimeRange'
    department:
      type: object
      required:
        - metadata
        - current
      properties:
        metadata:
          type: object
          required:
            - departmentId
            - departmentName
            - clusterId
            - clusterName
          properties:
            departmentId:
              $ref: '#/components/schemas/DepartmentId'
            departmentName:
              $ref: '#/components/schemas/DepartmentName'
            clusterId:
              $ref: '#/components/schemas/ClusterId'
            clusterName:
              $ref: '#/components/schemas/ClusterName'
        current:
          type: object
          description: Current reported metrics data. resources holds data that is summed up to the department level and projectResources explains the division of it to projects
          required:
            - resources
            - projectResources
          properties:
            resources:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/ResourcesData'
                  - type: object
                    required:
                      - nodepoolName
                    properties:
                      nodepoolName:
                        $ref: '#/components/schemas/NodepoolName'
            projectResources:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/ResourcesData'
                  - type: object
                    required:
                      - projectName
                      - nodepoolName
                    properties:
                      projectName:
                        $ref: '#/components/schemas/ProjectName1'
                      nodepoolName:
                        $ref: '#/components/schemas/NodepoolName'
        timeRange:
          $ref: '#/components/schemas/TimeRange'
    ProjectId:
      type: integer
      example: 1
    Project1:
      type: object
      required:
        - metadata
        - current
      properties:
        metadata:
          type: object
          required:
            - projectId
            - projectName
            - departmentId
            - departmentName
            - clusterId
            - clusterName
          properties:
            projectId:
              $ref: '#/components/schemas/ProjectId'
            projectName:
              $ref: '#/components/schemas/ProjectName1'
            departmentId:
              $ref: '#/components/schemas/DepartmentId'
            departmentName:
              $ref: '#/components/schemas/DepartmentName'
            clusterId:
              $ref: '#/components/schemas/ClusterId'
            clusterName:
              $ref: '#/components/schemas/ClusterName'
        current:
          type: object
          required:
            - resources
            - nodepoolResources
          description: Current reported metrics data. resources holds data that is summed up to the project level and projectResources explains the division of it to nodepools
          properties:
            resources:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/ResourcesData'
                  - type: object
                    required:
                      - nodepoolName
                    properties:
                      nodepoolName:
                        $ref: '#/components/schemas/NodepoolName'
        timeRange:
          $ref: '#/components/schemas/TimeRange'
    projects:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Project1'
              - properties:
                  timeRange:
                    example: null
        timeRange:
          $ref: '#/components/schemas/TimeRange'
    project:
      type: object
      required:
        - metadata
        - current
      properties:
        metadata:
          type: object
          required:
            - projectId
            - projectName
            - departmentId
            - departmentName
            - clusterId
            - clusterName
          properties:
            projectId:
              $ref: '#/components/schemas/ProjectId'
            projectName:
              $ref: '#/components/schemas/ProjectName1'
            departmentId:
              $ref: '#/components/schemas/DepartmentId'
            departmentName:
              $ref: '#/components/schemas/DepartmentName'
            clusterId:
              $ref: '#/components/schemas/ClusterId'
            clusterName:
              $ref: '#/components/schemas/ClusterName'
        current:
          type: object
          required:
            - resources
            - nodepoolResources
          description: Current reported metrics data. resources holds data that is summed up to the project level and projectResources explains the division of it to nodepools
          properties:
            resources:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/ResourcesData'
                  - type: object
                    required:
                      - nodepoolName
                    properties:
                      nodepoolName:
                        $ref: '#/components/schemas/NodepoolName'
        timeRange:
          $ref: '#/components/schemas/TimeRange'
    JobResourceData:
      type: object
      required:
        - allocated
      properties:
        allocated:
          type: number
          example: 2.5
        utilization:
          description: Utilization percentage, values between 0 to 1.
          type: number
          example: 0.8
    JobAdvancedData:
      type: object
      properties:
        idleSeconds:
          type: number
          example: 50
        grEngineActive:
          description: The fraction of time any portion of the graphics or compute engines were active
          type: number
        dramActive:
          description: The fraction of cycles where data was sent to or received from device memory
          type: number
        smActive:
          description: The fraction of time at least one warp was active on a multiprocessor, averaged over all multiprocessors
          type: number
        smOccupancy:
          description: The fraction of resident warps on a multiprocessor, relative to the maximum number of concurrent warps supported on a multiprocessor
          type: number
        pipeTensorActive:
          description: The fraction of cycles the tensor (HMMA / IMMA) pipe was active
          type: number
        pipeFp64Active:
          description: The fraction of cycles the FP64 (double precision) pipe was active
          type: number
        pipeFp32Active:
          description: The fraction of cycles the FMA (FP32 (single precision), and integer) pipe was active
          type: number
        pipeFp16Active:
          description: The fraction of cycles the FP16 (half precision) pipe was active
          type: number
        nvlinkTxBytes:
          description: The rate of data transmitted over NVLink, not including protocol headers, in bytes per second
          type: number
        nvlinkRxBytes:
          description: The rate of data received over NVLink, not including protocol headers, in bytes per second
          type: number
        pcieTxBytes:
          description: The rate of data transmitted over the PCIe bus, including both protocol headers and data payloads, in bytes per second
          type: number
        pcieRxBytes:
          description: The rate of data received over the PCIe bus, including both protocol headers and data payloads, in bytes per second
          type: number
    JobResourcesData:
      type: object
      required:
        - gpu
        - gpu-memory
        - cpu
        - cpu-memory
      properties:
        gpu:
          description: GPU resources in fractions. 0.7 = 70% of a gpu
          $ref: '#/components/schemas/JobResourceData'
        gpu-memory:
          description: GPU memory resources in megabytes. 1 = 10^6  (1000*1000)
          $ref: '#/components/schemas/JobResourceData'
        cpu:
          description: CPU resources in millicpus. 1000 = 1 cpu
          $ref: '#/components/schemas/JobResourceData'
        cpu-memory:
          description: CPU memory resources in megabytes. 1 = 10^6  (1000*1000)
          $ref: '#/components/schemas/JobResourceData'
        advanced:
          description: Advanced job metrics data, available only if advanced metrics enables and advanced query param is set
          $ref: '#/components/schemas/JobAdvancedData'
    JobResourcesDataOvertime:
      allOf:
        - $ref: '#/components/schemas/JobResourcesData'
        - type: object
          required:
            - timestamp
          properties:
            timestamp:
              type: string
              format: date-time
              example: '2023-06-06T12:09:18.211Z'
    IdentityAlias:
      description: Alias for identity provider
      type: string
      example: saml
    Idp:
      $ref: '#/components/schemas/IdentityAlias'
    TenantConfig:
      $ref: '#/components/schemas/Config'
    TenantSetting:
      $ref: '#/components/schemas/Setting'
    ChecksumResponse:
      properties:
        description:
          type: string
        md5Hash:
          type: string
        crc32c:
          type: string
    Error1:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
    AssetName:
      description: The name of the asset.
      type: string
      minLength: 1
      example: my-asset
    AssetDescription:
      description: The description of the asset.
      type: string
      minLength: 1
      maxLength: 250
      example: description of my asset.
      nullable: true
    AssetUpdatableFields:
      required:
        - name
      properties:
        name:
          $ref: '#/components/schemas/AssetName'
        description:
          $ref: '#/components/schemas/AssetDescription'
    Scope:
      description: The scope in which an asset can be used. The highest scope, system, is intended for internal purposes only.
      type: string
      minLength: 1
      enum:
        - system
        - tenant
        - cluster
        - department
        - project
    WorkloadSupportedTypes:
      properties:
        inference:
          description: Is inference a supported workload type.
          type: boolean
          nullable: true
        workspace:
          description: Is workspace a supported workload type.
          type: boolean
          nullable: true
        training:
          description: Is training a supported workload type.
          type: boolean
          nullable: true
        distributed:
          description: Is distributed a supported workload type.
          type: boolean
          nullable: true
        distFramework:
          description: The distributed training framework used in the workload.
          type: string
          enum:
            - MPI
            - PyTorch
            - TF
            - XGBoost
          nullable: true
      nullable: true
      type: object
    AssetCreationFields:
      type: object
      required:
        - scope
      properties:
        scope:
          $ref: '#/components/schemas/Scope'
        clusterId:
          $ref: '#/components/schemas/ClusterIdOptional'
        departmentId:
          description: The id of the department. Must be specified for department scoped assets.
          type: string
          nullable: true
          minLength: 1
        projectId:
          description: The id of the project. Must be specified for project scoped assets.
          type: integer
          format: int32
          nullable: true
        autoDelete:
          description: The asset will be deleted automatically. This is intended for internal use.
          type: boolean
          nullable: true
          default: false
        workloadSupportedTypes:
          $ref: '#/components/schemas/WorkloadSupportedTypes'
    AssetId:
      description: Unique identifier of the asset.
      type: string
      format: uuid
      minLength: 1
    AssetKind:
      description: The kind of the asset.
      type: string
      minLength: 1
      enum:
        - compute
        - environment
        - accessKey
        - dockerRegistry
        - password
        - genericSecret
        - registry
        - s3
        - git
        - nfs
        - pvc
        - hostPath
        - workload-template
        - model
        - config-map
        - secret-volume
    AssetReadOnlyFields:
      required:
        - id
        - kind
        - createdBy
        - createdAt
        - updatedBy
        - updatedAt
      properties:
        id:
          $ref: '#/components/schemas/AssetId'
        kind:
          $ref: '#/components/schemas/AssetKind'
        tenantId:
          description: The id of the tenant.
          type: integer
          format: int32
          nullable: true
        createdBy:
          description: The user who created the asset.
          type: string
          minLength: 1
        createdAt:
          description: The time at which the asset were created
          type: string
          minLength: 1
          format: date-time
        updatedBy:
          description: The user who updated the asset.
          type: string
          minLength: 1
        updatedAt:
          description: The time at which the asset has been updated
          type: string
          minLength: 1
          format: date-time
        projectName:
          description: The name of the project that the asset is associated with, for project scoped assets.
          type: string
          minLength: 1
          nullable: true
      type: object
    AssetMeta:
      allOf:
        - $ref: '#/components/schemas/AssetUpdatableFields'
        - $ref: '#/components/schemas/AssetCreationFields'
        - $ref: '#/components/schemas/AssetReadOnlyFields'
      example:
        name: my-asset
        scope: tenant
        id: a418ed33-9399-48c0-a890-122cadd13bfd
        kind: s3
        createdBy: test@run.ai
        createdAt: '2023-02-23T14:25:36.707685Z'
        updatedBy: test@run.ai
        updatedAt: '2023-02-23T14:25:36.707685Z'
        workloadSupportedTypes:
          workspace: false
          training: false
          distributed: true
          distFramework: TF
    DataSourceOverrides:
      description: specific fields to override in the data source.
      type: object
      nullable: true
      properties:
        containerPath:
          type: string
          minLength: 1
          example: /container/directory
          nullable: true
    AssetIdAndKind:
      description: Asset id and its kind.
      required:
        - id
        - kind
      properties:
        id:
          $ref: '#/components/schemas/AssetId'
        kind:
          $ref: '#/components/schemas/AssetKind'
        overrides:
          $ref: '#/components/schemas/DataSourceOverrides'
    AssetsIds:
      description: Set of assets comprising a workspace or a workspace template.
      required:
        - environment
      properties:
        environment:
          $ref: '#/components/schemas/AssetId'
        compute:
          nullable: true
          type: string
          allOf:
            - $ref: '#/components/schemas/AssetId'
        datasources:
          type: array
          items:
            $ref: '#/components/schemas/AssetIdAndKind'
        workloadVolumes:
          type: array
          items:
            type: string
    WorkloadId1:
      description: A unique ID of the workload.
      type: string
      format: uuid
    WorkloadName:
      description: The name of the workload.
      type: string
      minLength: 1
      example: my-workload-name
    WorkloadRefAndStatus:
      description: Id, name and status of a workspace or training
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/WorkloadId1'
        name:
          $ref: '#/components/schemas/WorkloadName'
        status:
          description: The status of the workspace or training.
          type: string
          minLength: 1
    AssetRef:
      description: Reference information about an asset.
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/AssetId'
        name:
          $ref: '#/components/schemas/AssetName'
    ToolType:
      description: Super set of Internal and External tool types.
      type: string
      minLength: 1
      enum:
        - jupyter-notebook
        - pycharm
        - visual-studio-code
        - tensorboard
        - rstudio
        - mlflow
        - custom
        - wandb
        - matlab
        - comet
        - chatbot-ui
    EnvironmentAssetRef:
      description: Reference information about environment asset.
      required:
        - id
        - name
      properties:
        id:
          $ref: '#/components/schemas/AssetId'
        name:
          $ref: '#/components/schemas/AssetName'
        toolTypes:
          description: the type of tools as defined in the connections of the environment asset.
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ToolType'
    AssetsUsageRefCompute:
      allOf:
        - $ref: '#/components/schemas/AssetRef'
      nullable: true
      type: object
    AssetDatasourceRef:
      description: Reference information about a datasource asset.
      required:
        - id
        - name
        - kind
      properties:
        id:
          $ref: '#/components/schemas/AssetId'
        name:
          $ref: '#/components/schemas/AssetName'
        kind:
          $ref: '#/components/schemas/AssetKind'
        overrides:
          $ref: '#/components/schemas/DataSourceOverrides'
          deprecated: true
    AssetsUsageRef:
      description: Reference information about usage of assets by other assets, for example datasources that uses credentials.
      properties:
        environment:
          nullable: true
          type: object
          description: environment asset.
          allOf:
            - $ref: '#/components/schemas/EnvironmentAssetRef'
          deprecated: true
        environments:
          type: array
          items:
            $ref: '#/components/schemas/AssetRef'
        compute:
          $ref: '#/components/schemas/AssetsUsageRefCompute'
          deprecated: true
        computes:
          type: array
          items:
            $ref: '#/components/schemas/AssetRef'
        datasources:
          type: array
          items:
            $ref: '#/components/schemas/AssetDatasourceRef'
    AssetUsageInfo:
      description: Details about resources that use the asset.
      properties:
        workspaces:
          description: workspaces that rely on this asset.
          type: array
          items:
            $ref: '#/components/schemas/WorkloadRefAndStatus'
        trainings:
          description: trainings that rely on this asset.
          type: array
          items:
            $ref: '#/components/schemas/WorkloadRefAndStatus'
        distributed:
          description: distributed trainings that rely on this asset.
          type: array
          items:
            $ref: '#/components/schemas/WorkloadRefAndStatus'
        inferences:
          description: inferences that rely on this asset.
          type: array
          items:
            $ref: '#/components/schemas/WorkloadRefAndStatus'
        templates:
          description: templates that rely on this asset.
          type: array
          items:
            $ref: '#/components/schemas/AssetRef'
        assets:
          description: list of other assets that use this asset. specifically, accessKeys used by s3, and passwords used by git.
          $ref: '#/components/schemas/AssetsUsageRef'
      nullable: true
      type: object
    UsageTimesInfo:
      description: Details about times the asset has been used by workloads, etc.
      properties:
        lastUsedByWorkload:
          description: The time at which the asset were last used by a workload of given type and project. This field requires complyToProject and complyToWorkload types flags of the API, to specify the workload type and project id.
          type: string
          minLength: 1
          format: date-time
          nullable: true
      nullable: true
      type: object
    ComplianceInfoReason:
      description: A reason explaining why the asset does not comply with workloads creation for a given project.
      required:
        - details
      properties:
        field:
          description: for policy related issues, includes a json path to the field in the policy for which the message applies.
          nullable: true
          type: string
        details:
          description: explanation of the reason for rejecting the asset.
          type: string
    ComplianceInfo:
      description: Compliance of the asset with creation of workloads in the given project.
      properties:
        imposed:
          description: Whether the asset is imposed on created workloads by the administrator.
          type: boolean
        compliance:
          description: Whether the asset info complies with creation of workloads in the project.
          type: boolean
        reason:
          description: For asset that does not comply, specify one or more reason why.
          type: array
          items:
            $ref: '#/components/schemas/ComplianceInfoReason'
      nullable: true
      type: object
    AssetCreationRequest:
      allOf:
        - $ref: '#/components/schemas/AssetUpdatableFields'
        - $ref: '#/components/schemas/AssetCreationFields'
      example:
        name: my-asset
        scope: tenant
        workloadSupportedTypes:
          workspace: false
          training: false
          inference: false
          distributed: true
          distFramework: TF
    AssetUpdateRequest:
      allOf:
        - $ref: '#/components/schemas/AssetUpdatableFields'
      example:
        name: my-asset
    GpuRequestType:
      description: Sets the unit type for GPU resources requests. Stated in terms of portion, memory or  mig profile [deprecated]. Sets the unit type for other GPU request fields. If `gpuDevicesRequest > 1`, only `portion` is supported. If `gpuDeviceRequest = 1`, the request type can be stated as `portion`, `memory` or `migProfile` [deprecated].
      type: string
      minLength: 1
      enum:
        - portion
        - memory
        - migProfile
      nullable: true
    MigProfile:
      description: Required only if `gpuRequestType` is `migProfile`. This states the memory profile to be used for the workload running NVIDIA Multi-Instance GPU (MIG) technology.
      type: string
      deprecated: true
      minLength: 1
      enum:
        - 1g.5gb
        - 1g.10gb
        - 2g.10gb
        - 2g.20gb
        - 3g.20gb
        - 3g.40gb
        - 4g.20gb
        - 4g.40gb
        - 7g.40gb
        - 7g.80gb
      nullable: true
    ComputeFlatFields:
      properties:
        gpuDevicesRequest:
          description: Requested number of GPU devices. Currently if more than one device is requested, it is not possible to provide values for gpuMemory, gpuPortion or migProfile [deprecated].
          type: integer
          format: int32
          example: 1
          nullable: true
        gpuRequestType:
          $ref: '#/components/schemas/GpuRequestType'
        gpuPortionRequest:
          description: Required if and only if gpuRequestType is portion. States the portion of the GPU to allocate for the created workload, per GPU device, between 0 and 1. The default is no allocated GPUs.
          type: number
          format: double
          example: 0.5
          nullable: true
        gpuPortionLimit:
          description: Limitations on the portion consumed by the workload, per GPU device. The system guarantees The gpuPotionLimit must be no less than the gpuPortionRequest.
          type: number
          format: double
          example: 0.5
          nullable: true
        gpuMemoryRequest:
          description: Required if and only if gpuRequestType is memory. States the GPU memory to allocate for the created workload, per GPU device. Note that the workload will not be scheduled unless the system can guarantee this amount of GPU memory to the workload.
          type: string
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 10M
          nullable: true
        gpuMemoryLimit:
          description: Limitation on the memory consumed by the workload, per GPU device. The system guarantees The gpuMemoryLimit must be no less than gpuMemoryRequest.
          type: string
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 10M
          nullable: true
        migProfile:
          $ref: '#/components/schemas/MigProfile'
          deprecated: true
        cpuCoreRequest:
          description: CPU units to allocate for the created workload (0.5, 1, .etc). The workload will receive at least this amount of CPU. Note that the workload will not be scheduled unless the system can guarantee this amount of CPUs to the workload.
          format: double
          type: number
          example: 0.5
          nullable: true
        cpuCoreLimit:
          description: Limitations on the number of CPUs consumed by the workload (0.5, 1, .etc). The system guarantees that this workload will not be able to consume more than this amount of CPUs.
          format: double
          type: number
          example: 2
          nullable: true
        cpuMemoryRequest:
          description: The amount of CPU memory to allocate for this workload (1G, 20M, .etc). The workload will receive at least this amount of memory. Note that the workload will not be scheduled unless the system can guarantee this amount of memory to the workload
          type: string
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 20M
          nullable: true
        cpuMemoryLimit:
          description: Limitations on the CPU memory to allocate for this workload (1G, 20M, .etc). The system guarantees that this workload will not be able to consume more than this amount of memory. The workload will receive an error when trying to allocate more memory than this limit.
          type: string
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 30M
          nullable: true
        largeShmRequest:
          description: A large /dev/shm device to mount into a container running the created workload. An shm is a shared file system mounted on RAM.
          type: boolean
          example: false
          nullable: true
      nullable: true
      type: object
    ExtendedResource:
      description: Quantity of an extended resource.
      properties:
        resource:
          description: The name of the extended resource (mandatory)
          type: string
          example: hardware-vendor.example/foo
          minLength: 1
          nullable: true
        quantity:
          description: The requested quantity for the resource.
          type: string
          example: 2
          minLength: 1
          nullable: true
        exclude:
          description: Use 'true' in case the extended resource is defined in defaults of the policy, and you wish to exclude it from the workload.
          type: boolean
          example: false
          nullable: true
      nullable: true
      type: object
    ExtendedResources:
      description: Extended resources and their quantity.
      type: array
      items:
        $ref: '#/components/schemas/ExtendedResource'
      nullable: true
    ComputeItemizedFields:
      properties:
        extendedResources:
          $ref: '#/components/schemas/ExtendedResources'
      nullable: true
      type: object
    ComputeFields:
      allOf:
        - $ref: '#/components/schemas/ComputeFlatFields'
        - $ref: '#/components/schemas/ComputeItemizedFields'
      nullable: true
      type: object
    ComputeAssetSpec:
      allOf:
        - $ref: '#/components/schemas/ComputeFields'
    ComputeAsset:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/ComputeAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
    ComputeListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/ComputeAsset'
    ComputeCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/ComputeAssetSpec'
    ComputeUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
        spec:
          $ref: '#/components/schemas/ComputeAssetSpec'
    AccessKeyCreationSpec:
      properties:
        existingSecretName:
          description: optional name of existing secret in the cluster from which the access key id and secret should be taken. If omitted, you will have to provide those credentials in the accessKeyId and secretAccessKey fields. The provided credentials are encrypted into the control plane database and cloned to a kubernetes secret in the cluster.
          nullable: true
          type: string
          minLength: 1
        accessKeyId:
          description: The access key id of the S3-compatible bucket, required only when not using existing secret.
          type: string
          nullable: true
          minLength: 1
        secretAccessKey:
          description: The secret access key of the S3-compatible bucket, required only when not using existing secret.
          type: string
          nullable: true
          minLength: 1
    EncryptionKeyId:
      required:
        - keyId
      properties:
        keyId:
          description: id of the encryption key which has been used to encrypt an asset's data.
          type: integer
          format: int32
    AccessKeySpec:
      allOf:
        - $ref: '#/components/schemas/AccessKeyCreationSpec'
        - $ref: '#/components/schemas/EncryptionKeyId'
    PasswordCreationSpec:
      properties:
        existingSecretName:
          description: optional name of existing secret in the cluster from which the user name and password should be taken. If omitted, you will have to provide those credentials in the user and password fields. The provided credentials are encrypted into the control plane database and cloned to a kubernetes secret in the cluster.
          nullable: true
          type: string
          minLength: 1
        user:
          description: The name of the user, required only when not using existing secret.
          type: string
          nullable: true
          minLength: 1
        password:
          description: The password, required only when not using existing secret.
          type: string
          nullable: true
          minLength: 1
    PasswordSpec:
      allOf:
        - $ref: '#/components/schemas/PasswordCreationSpec'
        - $ref: '#/components/schemas/EncryptionKeyId'
    DockerRegistryCreationSpec:
      properties:
        existingSecretName:
          description: optional name of existing secret in the cluster from which the docker registry details should be taken. If omitted, you will have to provide those credentials and url in relevant fields. The provided credentials are encrypted into the control plane database and cloned to a kubernetes secret in the cluster, along with the url.
          nullable: true
          type: string
          minLength: 1
        user:
          description: The name of the user, required only when not using existing secret.
          type: string
          nullable: true
          minLength: 1
        password:
          description: The password, required only when not using existing secret.
          type: string
          nullable: true
          minLength: 1
        url:
          description: The url, required only when not using existing secret.
          type: string
          nullable: true
          minLength: 1
    DockerRegistrySpec:
      allOf:
        - $ref: '#/components/schemas/DockerRegistryCreationSpec'
        - $ref: '#/components/schemas/EncryptionKeyId'
    KeyValuePair:
      description: Details of key-value pair to be stored in the credential.
      properties:
        key:
          description: The key of the secret
          type: string
          minLength: 1
          example: secret-key
          nullable: true
        value:
          description: The value of the secret.
          type: string
          example: my-secret
          nullable: true
      nullable: true
      type: object
    GenericSecretKeyValuePairs:
      description: Set of key-value pairs to store in the new credential.
      type: array
      items:
        $ref: '#/components/schemas/KeyValuePair'
      nullable: true
    GenericSecretCreationSpec:
      properties:
        existingSecretName:
          description: name of existing secret in the cluster from which the general key-value values should be taken.
          type: string
          minLength: 1
          nullable: true
        keyValuePairs:
          $ref: '#/components/schemas/GenericSecretKeyValuePairs'
    GenericSecretSpec:
      allOf:
        - $ref: '#/components/schemas/GenericSecretCreationSpec'
        - $ref: '#/components/schemas/EncryptionKeyId'
    CredentialsListResponseAssetSpec:
      properties:
        accessKey:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/AccessKeySpec'
        password:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/PasswordSpec'
        dockerRegistry:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/DockerRegistrySpec'
        genericSecret:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/GenericSecretSpec'
    AssetSyncStatusEnum:
      type: string
      enum:
        - Issues found
        - No issues found
        - No status
    ScopeId:
      description: The id of the cluster, department or project, depending on the scope type.
      type: string
    AssetClusterStatusIssueEnum:
      type: string
      enum:
        - ReplicationError
        - LostPhase
        - NotCreated
    AssetClusterStatusIssue:
      type: object
      required:
        - scopeId
        - scopeType
        - issue
      properties:
        scopeId:
          $ref: '#/components/schemas/ScopeId'
        scopeType:
          $ref: '#/components/schemas/ScopeType'
        issue:
          $ref: '#/components/schemas/AssetClusterStatusIssueEnum'
    AssetClusterStatusIssues:
      type: array
      items:
        $ref: '#/components/schemas/AssetClusterStatusIssue'
    AssetClusterStatusInfo:
      properties:
        status:
          $ref: '#/components/schemas/AssetSyncStatusEnum'
        issues:
          $ref: '#/components/schemas/AssetClusterStatusIssues'
        message:
          type: string
        url:
          type: string
      nullable: true
      type: object
    CredentialsListResponseEntry:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/CredentialsListResponseAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    CredentialsListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/CredentialsListResponseEntry'
    AccessKey:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/AccessKeySpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    AccessKeyListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/AccessKey'
    AccessKeyCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/AccessKeyCreationSpec'
    AccessKeyUpdateRequest:
      required:
        - meta
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
    Password:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/PasswordSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    PasswordListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/Password'
    PasswordCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/PasswordCreationSpec'
    PasswordUpdateRequest:
      required:
        - meta
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
    DockerRegistry:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/DockerRegistrySpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    DockerRegistryListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/DockerRegistry'
    DockerRegistryCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/DockerRegistryCreationSpec'
    DockerRegistryUpdateRequest:
      required:
        - meta
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
    GenericSecret:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/GenericSecretSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    GenericSecretListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/GenericSecret'
    GenericSecretCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/GenericSecretCreationSpec'
    GenericSecretUpdateRequest:
      required:
        - meta
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
    CredentialKind:
      description: The kind of credential used.
      type: string
      minLength: 1
      example: password
      enum:
        - password
    RegistrySpec:
      required:
        - url
        - credentialKind
        - user
        - password
      properties:
        url:
          description: The registry base url.
          type: string
          example: https://hub.docker.com/
          minLength: 1
        credentialKind:
          $ref: '#/components/schemas/CredentialKind'
        user:
          description: The name of the user.
          type: string
          example: admin
          minLength: 1
        password:
          description: The password.
          type: string
          example: 12345678
          minLength: 1
    Registry:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/RegistrySpec'
    RegistryListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/Registry'
    RegistryCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/RegistrySpec'
    RegistryUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
    Repositories:
      required:
        - repositories
      properties:
        repositories:
          type: array
          items:
            type: string
    RepositoryTags:
      required:
        - name
        - tags
      properties:
        name:
          type: string
        tags:
          type: array
          items:
            type: string
    ContainerOverridable:
      description: Container overrideable fields. In the context of assets,these are environment asset fields that can be overriden in the submit workload request.
      properties:
        command:
          description: A command to the server as the entry point of the container running the workspace.
          type: string
          minLength: 1
          nullable: true
          example: python
        args:
          description: Arguments to the command that the container running the workspace executes.
          type: string
          minLength: 1
          example: '-x my-script.py'
          nullable: true
      nullable: true
      type: object
    CommonSecurityOverridable:
      description: Security overrideable fields. In the context of assets,these are environment asset fields that can be overriden in the submit workload request.
      properties:
        runAsUid:
          description: The user id to run the entrypoint of the container which executes the workspace. Default to the value specified in the environment asset `runAsUid` field (optional). Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled.
          type: integer
          format: int64
          example: 500
          nullable: true
        runAsGid:
          description: The group id to run the entrypoint of the container which executes the workspace. Default to the value specified in the environment asset `runAsGid` field (optional). Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled.
          type: integer
          format: int64
          example: 30
          nullable: true
        supplementalGroups:
          description: Comma separated list of groups that the user running the container belongs to, in addition to the group indicated by runAsGid. Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled. Using an empty string implies reverting the supplementary groups of the image.
          type: string
          example: 2,3,5,8
          nullable: true
      nullable: true
      type: object
    EnvironmentVariablesField:
      properties:
        environmentVariables:
          $ref: '#/components/schemas/EnvironmentVariables2'
      nullable: true
      type: object
    OverridableSpecFields:
      allOf:
        - $ref: '#/components/schemas/ContainerOverridable'
        - $ref: '#/components/schemas/CommonSecurityOverridable'
        - $ref: '#/components/schemas/EnvironmentVariablesField'
    ImagePullPolicy:
      description: Image pull policy. Defaults to `Always` if `:latest` tag is specified, otherwise it is `IfNotPresent`.
      type: string
      minLength: 1
      enum:
        - Always
        - Never
        - IfNotPresent
      nullable: true
    ProbeHandlerScheme:
      description: Scheme to use for connecting to the host, defaults to HTTP.
      type: string
      enum:
        - HTTP
        - HTTPS
      nullable: true
    ProbeHandler:
      description: The action taken to determine the health of the container. (mandatory)
      type: object
      properties:
        httpGet:
          description: An action based on HTTP Get requests.
          type: object
          properties:
            path:
              description: Path to access on the HTTP server, defaults to /.
              type: string
              pattern: ^(\x2F[a-zA-Z0-9\-_.\x2F]*)?$
              example: /
              nullable: true
            port:
              description: Number of the port to access on the container.
              type: integer
              format: int32
              minimum: 1
              maximum: 65535
              nullable: true
            host:
              description: Host name to connect to, defaults to the pod IP.
              type: string
              format: hostname
              example: example.com
              nullable: true
            scheme:
              $ref: '#/components/schemas/ProbeHandlerScheme'
      nullable: true
    Probe:
      type: object
      properties:
        initialDelaySeconds:
          description: Number of seconds after the container has started before liveness or readiness probes are initiated.
          type: integer
          format: int32
          minimum: 0
          nullable: true
        periodSeconds:
          description: How often (in seconds) to perform the probe.
          type: integer
          format: int32
          minimum: 1
          nullable: true
        timeoutSeconds:
          description: Number of seconds after which the probe times out.
          type: integer
          format: int32
          minimum: 1
          nullable: true
        successThreshold:
          description: Minimum consecutive successes for the probe to be considered successful after having failed.
          type: integer
          format: int32
          minimum: 1
          nullable: true
        failureThreshold:
          description: When a probe fails, the number of times to try before giving up.
          type: integer
          format: int32
          minimum: 1
          nullable: true
        handler:
          $ref: '#/components/schemas/ProbeHandler'
      nullable: true
    Probes:
      description: Probes are used to determine if the container is healthy and ready to accept traffic.
      type: object
      properties:
        readiness:
          $ref: '#/components/schemas/Probe'
      nullable: true
    ContainerNonOverridable:
      description: Container non overrideable fields. In the context of assets,these are environment asset fields that cannot be overriden in the submit workload request.
      properties:
        image:
          description: Docker image name. For more information, see [Images](https://kubernetes.io/docs/concepts/containers/images). The image name is mandatory for creating a workspace.
          type: string
          minLength: 1
          example: python:3.8
          nullable: true
        imagePullPolicy:
          $ref: '#/components/schemas/ImagePullPolicy'
        workingDir:
          description: Container's working directory. If not specified, the container runtime default will be used. This may be configured in the container image.
          type: string
          minLength: 1
          nullable: true
          example: /home/myfolder
        createHomeDir:
          description: When set to `true`, creates a home directory for the container.
          type: boolean
          nullable: true
        probes:
          $ref: '#/components/schemas/Probes'
      nullable: true
      type: object
    UidGidSource:
      description: Indicate the way to determine the user and group ids of the container. The options are a. `fromTheImage` - user and group ids are determined by the docker image that the container runs. this is the default option. b. `custom` - user and group ids can be specified in the environment asset and/or the workspace creation request. c. `idpToken` - user and group ids are determined according to the identity provider (idp) access token. This option is intended for internal use of the environment UI form. For more information, see [User Identity](https://docs.run.ai/v2.19/admin/runai-setup/config/non-root-containers/).
      type: string
      enum:
        - fromTheImage
        - fromIdpToken
        - custom
      nullable: true
    Capability:
      type: string
      enum:
        - AUDIT_CONTROL
        - AUDIT_READ
        - AUDIT_WRITE
        - BLOCK_SUSPEND
        - CHOWN
        - DAC_OVERRIDE
        - DAC_READ_SEARCH
        - FOWNER
        - FSETID
        - IPC_LOCK
        - IPC_OWNER
        - KILL
        - LEASE
        - LINUX_IMMUTABLE
        - MAC_ADMIN
        - MAC_OVERRIDE
        - MKNOD
        - NET_ADMIN
        - NET_BIND_SERVICE
        - NET_BROADCAST
        - NET_RAW
        - SETGID
        - SETFCAP
        - SETPCAP
        - SETUID
        - SYS_ADMIN
        - SYS_BOOT
        - SYS_CHROOT
        - SYS_MODULE
        - SYS_NICE
        - SYS_PACCT
        - SYS_PTRACE
        - SYS_RAWIO
        - SYS_RESOURCE
        - SYS_TIME
        - SYS_TTY_CONFIG
        - SYSLOG
        - WAKE_ALARM
    SeccompProfileType:
      description: Indicates which kind of seccomp profile will be applied to the container. The options are a. `RuntimeDefault` - the container runtime default profile should be used. b. `Unconfined` - no profile should be applied. c. `Localhost` is not yet supported by Run:ai.
      type: string
      enum:
        - RuntimeDefault
        - Unconfined
        - Localhost
      nullable: true
    CommonSecurityNonOverridable:
      description: Security non overrideable fields. In the context of assets,these are environment asset fields that cannot be overriden in the submit workload request.
      properties:
        uidGidSource:
          $ref: '#/components/schemas/UidGidSource'
        capabilities:
          description: Add POSIX capabilities to running containers. Defaults to the default set of capabilities granted by the container runtime.
          type: array
          items:
            $ref: '#/components/schemas/Capability'
          example:
            - CHOWN
            - KILL
          nullable: true
        seccompProfileType:
          $ref: '#/components/schemas/SeccompProfileType'
        runAsNonRoot:
          description: Force the container to run as a non-root user.
          type: boolean
          example: true
          nullable: true
        readOnlyRootFilesystem:
          description: If true, mounts the container's root filesystem as read-only.
          type: boolean
          example: false
          nullable: true
      nullable: true
      type: object
    ContainerNonInferenceNonOverridable:
      description: Container non Inference overrideable fields. It adds properties which are not allowed for Inference containers
      properties:
        tty:
          description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
          type: boolean
          nullable: true
        stdin:
          description: Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF
          type: boolean
          nullable: true
      nullable: true
      type: object
    NonInferenceSecurityNonOverridable:
      description: Security related fields. When used in assets context, those are environment asset fields that cannot be override in the submit workload request.
      properties:
        allowPrivilegeEscalation:
          description: Allow the container running the workload and all launched processes to gain additional privileges after the workload starts. For more information consult the User Identity in Container guide at https://docs.run.ai/admin/runai-setup/config/non-root-containers/
          type: boolean
          example: false
          nullable: true
        hostIpc:
          description: Whether to enable host IPC. Defaults to false.
          type: boolean
          example: false
          nullable: true
        hostNetwork:
          description: Whether to enable host networking. Default to false.
          type: boolean
          example: false
          nullable: true
      nullable: true
      type: object
    InternalToolType:
      description: The type of the internal tool. Internal tool runs within the container and exposes ports associated with the tool using NodePort, LoadBalancer or ExternalUrl.
      type: string
      minLength: 1
      enum:
        - jupyter-notebook
        - pycharm
        - visual-studio-code
        - tensorboard
        - rstudio
        - mlflow
        - custom
        - matlab
        - chatbot-ui
    InternalConnectionType:
      description: The type of connection that exposes the container port.
      type: string
      minLength: 1
      enum:
        - LoadBalancer
        - NodePort
        - ExternalUrl
        - ServingPort
    NodePortInfo:
      properties:
        isCustomPort:
          description: Whether the node port is provided in the specific env of the workspace. Default is false, and in this case the node port is auto generated by the system.
          type: boolean
          default: false
      nullable: true
      type: object
    ExternalUrlInfo:
      properties:
        isCustomUrl:
          description: Whether external url is provided in the specific env of the workspace. Default is false, and in this case the external url is auto generated by the system.
          type: boolean
          default: false
        externalUrl:
          description: Default value for the external url. You can override it in the specific env of the workspace. Should be specified for ExternalUrl only.
          type: string
          nullable: true
          minLength: 1
      nullable: true
      type: object
    ServingPortInfo:
      properties:
        protocol:
          type: string
          enum:
            - grpc
            - http
          nullable: true
      nullable: true
      type: object
    InternalToolInfo:
      description: Information of the internal tool.
      required:
        - toolType
        - connectionType
        - containerPort
      properties:
        toolType:
          $ref: '#/components/schemas/InternalToolType'
        connectionType:
          $ref: '#/components/schemas/InternalConnectionType'
        containerPort:
          description: The port within the container that the connection exposes.
          type: integer
          format: int32
          minimum: 1
          maximum: 65535
        nodePortInfo:
          $ref: '#/components/schemas/NodePortInfo'
        externalUrlInfo:
          $ref: '#/components/schemas/ExternalUrlInfo'
        servingPortInfo:
          $ref: '#/components/schemas/ServingPortInfo'
      nullable: true
      type: object
    ExternalToolType:
      description: The type of external tool that is associated with the connection. External tool typically runs in the cloud and require external url for connecting to it.
      type: string
      minLength: 1
      enum:
        - wandb
        - comet
    ExternalToolInfo:
      description: Information of the external tool.
      required:
        - toolType
        - externalUrl
      properties:
        toolType:
          $ref: '#/components/schemas/ExternalToolType'
        externalUrl:
          description: The external url for connecting to the external tool. The url can include environment variables that will be replaced with the value provided for those variables when the workspace is created.
          example: https://wandb.com/myteam/${PROJECT_NAME}
          type: string
          minLength: 1
      nullable: true
      type: object
    Connection:
      required:
        - name
      properties:
        name:
          description: A unique name of this connection. This name correlates between the connection information specified at the environment asset, to the information about the connection as specified in SpecificEnv for a specific workspace.
          type: string
          minLength: 1
        isExternal:
          description: Internal tools (isExternal=false) are tools that run as part of the container. External tools (isExternal=true) run outside the container, typically in the cloud.
          type: boolean
          default: false
        internalToolInfo:
          $ref: '#/components/schemas/InternalToolInfo'
        externalToolInfo:
          $ref: '#/components/schemas/ExternalToolInfo'
    NonOverridableSpecFields:
      allOf:
        - $ref: '#/components/schemas/ContainerNonOverridable'
        - $ref: '#/components/schemas/CommonSecurityNonOverridable'
        - $ref: '#/components/schemas/ContainerNonInferenceNonOverridable'
        - $ref: '#/components/schemas/NonInferenceSecurityNonOverridable'
        - properties:
            connections:
              description: List of connections that either expose ports from the container (each port is associated with a tool that the container runs), or URL's to be used for connecting to an external tool that is related to the action of the container (such as Weights & Biases).
              type: array
              items:
                $ref: '#/components/schemas/Connection'
            overrideUidGidInWorkspace:
              description: Allow specifying uid/gid as part of create workspace. This is relevant only for custom uigGidSource.
              type: boolean
              default: false
    EnvironmentAssetSpec:
      allOf:
        - $ref: '#/components/schemas/OverridableSpecFields'
        - $ref: '#/components/schemas/NonOverridableSpecFields'
    EnvironmentAsset:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/EnvironmentAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    EnvironmentListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/EnvironmentAsset'
    EnvironmentCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/EnvironmentAssetSpec'
    EnvironmentUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
        spec:
          $ref: '#/components/schemas/EnvironmentAssetSpec'
    HostPathMountPropagation:
      description: Share this volumes mount with other containers. If set to HostToContainer, this volume mount will receive all subsequent mounts that are mounted to this volume or any of its subdirectories. In case of multiple hostPath entries, this field should have the same value for all of them.
      type: string
      enum:
        - None
        - HostToContainer
      nullable: true
    HostPath:
      properties:
        path:
          description: Local path within the controller to which the host volume will be mapped. (mandatory)
          type: string
          minLength: 1
          example: /container/directory
          nullable: true
        readOnly:
          description: Force the volume to be mounted with read-only permissions. Defaults to false.
          type: boolean
          default: true
          nullable: true
        mountPath:
          description: The path that the host volume will be mounted to when in use. (mandatory)
          type: string
          minLength: 1
          example: /local/directory
          nullable: true
        mountPropagation:
          $ref: '#/components/schemas/HostPathMountPropagation'
      nullable: true
      type: object
    HostPathSpec:
      allOf:
        - $ref: '#/components/schemas/HostPath'
    Nfs:
      properties:
        path:
          description: Path that is exported by the NFS server (mandatory). For more information, see [NFS](https://kubernetes.io/docs/concepts/storage/volumes#nfs).
          type: string
          minLength: 1
          example: /container/nfs
          nullable: true
        readOnly:
          description: Force the NFS export to be mounted with read-only permissions.
          type: boolean
          default: true
          nullable: true
        server:
          description: The hostname or IP address of the NFS server. (mandatory)
          type: string
          minLength: 1
          example: my.nfs.com
          nullable: true
        mountPath:
          description: The path that the NFS volume will be mounted to when in use. (mandatory)
          type: string
          minLength: 1
          example: /local/nfs
          nullable: true
      nullable: true
      type: object
    NFSAssetSpec:
      allOf:
        - $ref: '#/components/schemas/Nfs'
    PvcFieldsUpdatable:
      properties:
        path:
          description: Local path within the workspace to which the PVC bucket will be mapped. (mandatory)
          type: string
          minLength: 1
          example: /container/my-claim
          nullable: true
      nullable: true
      type: object
    PvcAccessModes:
      description: Requested access mode(s) for the newly created PVC.
      properties:
        readWriteOnce:
          description: Requesting claim that can be mounted in read/write mode to exactly one host. This is the default access mode.
          type: boolean
          default: true
          nullable: true
        readOnlyMany:
          description: Requesting claim that can be mounted in read-only mode to many hosts.
          type: boolean
          default: false
          nullable: true
        readWriteMany:
          description: Requesting claim that can be mounted in read/write mode to many hosts.
          type: boolean
          default: false
          nullable: true
      nullable: true
      type: object
    ClaimInfo:
      description: Claim information for the newly created PVC. The information should not be provided when attempting to use existing PVC.
      properties:
        size:
          description: 'Requested size for the PVC. Mandatory when existingPvc is false. Recommended sizes: TB/GB/MB/TIB/GIB/MIB'
          type: string
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 1G
          nullable: true
        storageClass:
          description: Storage class name to associate with the PVC. This parameter may be omitted if there is a single storage class in the system, or you are using the default storage class. For more information, see [Storage class](https://kubernetes.io/docs/concepts/storage/storage-classes).
          type: string
          minLength: 1
          example: my-storage-class
          nullable: true
        accessModes:
          $ref: '#/components/schemas/PvcAccessModes'
        volumeMode:
          description: The volume mode required by the claim. Choose Filesystem (default) or Block.
          type: string
          enum:
            - Filesystem
            - Block
          nullable: true
      nullable: true
      type: object
    PvcFieldsNonUpdatable:
      properties:
        existingPvc:
          description: Verify existing PVC. PVC is assumed to exist when set to `true`. If set to `false`, the PVC will be created, if it does not exist.
          type: boolean
          default: false
          nullable: true
        claimName:
          description: Name for the PVC. Allow referencing it across workloads. If not provided, a name based on the workload name and scope will be auto-generated.
          type: string
          minLength: 1
          maxLength: 63
          example: my-claim
          nullable: true
        readOnly:
          description: Permit only read access to PVC.
          type: boolean
          default: false
          nullable: true
        ephemeral:
          description: Use `true` to set PVC to ephemeral. If set to `true`, the PVC will be deleted when the workspace is stopped.
          type: boolean
          default: false
          example: false
          nullable: true
        claimInfo:
          $ref: '#/components/schemas/ClaimInfo'
      nullable: true
      type: object
    Pvc:
      allOf:
        - $ref: '#/components/schemas/PvcFieldsUpdatable'
        - $ref: '#/components/schemas/PvcFieldsNonUpdatable'
    PVCAssetSpec:
      allOf:
        - $ref: '#/components/schemas/Pvc'
    GitCommon:
      properties:
        repository:
          description: URL to a remote Git repository. The content of this repository will be mapped to the container running the workload. (mandatory)
          type: string
          minLength: 1
          example: https://github.com/my-git/my-repo
          nullable: true
        branch:
          description: Specific branch to synchronize the repository from.
          type: string
          minLength: 1
          example: main
          nullable: true
        revision:
          description: Specific revision to synchronize the repository from.
          type: string
          minLength: 1
          nullable: true
        path:
          description: Local path within the workspace to which the Git repository will be mapped (mandatory).
          type: string
          minLength: 1
          example: /container/my-repository
          nullable: true
      nullable: true
      type: object
    GitPasswordAsset:
      properties:
        passwordAssetId:
          description: ID of credentials asset of type password. Needed for non public repository which requires authentication.
          type: string
          format: uuid
          nullable: true
          minLength: 1
    GitAssetSpec:
      allOf:
        - $ref: '#/components/schemas/GitCommon'
        - $ref: '#/components/schemas/GitPasswordAsset'
    S3Common:
      properties:
        bucket:
          description: The name of the bucket. (mandatory)
          type: string
          minLength: 1
          example: my-bucket
          nullable: true
        path:
          description: Local path within the workspace to which the S3 bucket will be mapped. (mandatory)
          type: string
          minLength: 1
          example: /container/my-bucket
          nullable: true
        url:
          description: The url of the S3 service provider. The default is the URL of the Amazon AWS S3 service.
          type: string
          minLength: 1
          example: https://s3.amazonaws.com
          nullable: true
      nullable: true
      type: object
    S3AccessKeyAsset:
      properties:
        accessKeyAssetId:
          description: ID of credentials asset of type access-key, for private S3 buckets.
          type: string
          format: uuid
          minLength: 1
          nullable: true
    S3AssetSpec:
      allOf:
        - $ref: '#/components/schemas/S3Common'
        - $ref: '#/components/schemas/S3AccessKeyAsset'
    ConfigMap:
      properties:
        configMap:
          description: The name of the ConfigMap resource. (mandatory)
          type: string
          minLength: 1
          nullable: true
        mountPath:
          description: Local path within the workspace to which the ConfigMap will be mapped to. (mandatory)
          type: string
          minLength: 1
          nullable: true
      nullable: true
      type: object
    ConfigMapAssetSpec:
      allOf:
        - $ref: '#/components/schemas/ConfigMap'
    CredentialAsset:
      properties:
        credentialAssetId:
          description: ID of credentials asset (mandatory)
          type: string
          format: uuid
          nullable: true
          minLength: 1
    SecretAssetSpec:
      allOf:
        - $ref: '#/components/schemas/CredentialAsset'
        - properties:
            mountPath:
              description: Local path within the workspace to which the Secret will be mapped to (mandatory)
              type: string
              minLength: 1
              nullable: true
      type: object
    DatasourceListResponseAssetSpec:
      properties:
        hostPath:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/HostPathSpec'
        nfs:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/NFSAssetSpec'
        pvc:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/PVCAssetSpec'
        git:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/GitAssetSpec'
        s3:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/S3AssetSpec'
        config_map:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/ConfigMapAssetSpec'
        secret:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/SecretAssetSpec'
    DatasourceListResponseEntry:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/DatasourceListResponseAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    DatasourceListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/DatasourceListResponseEntry'
    GitAsset:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/GitAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    GitListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/GitAsset'
    GitCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/GitAssetSpec'
    GitUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
        spec:
          $ref: '#/components/schemas/GitAssetSpec'
    HostPathAsset:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/HostPathSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
    HostPathListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/HostPathAsset'
    HostPathCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/HostPathSpec'
    HostPathUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
        spec:
          $ref: '#/components/schemas/HostPathSpec'
    NFSAsset:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/NFSAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
    NFSListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/NFSAsset'
    NFSCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/NFSAssetSpec'
    S3Asset:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/S3AssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    NFSUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
        spec:
          $ref: '#/components/schemas/NFSAssetSpec'
    PVCAsset:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/PVCAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    PVCListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/PVCAsset'
    PVCCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/PVCAssetSpec'
    PVCUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
        spec:
          $ref: '#/components/schemas/PvcFieldsUpdatable'
    S3ListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/S3Asset'
    S3CreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/S3AssetSpec'
    S3UpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
        spec:
          $ref: '#/components/schemas/S3AssetSpec'
    AssetsRefCompute:
      allOf:
        - $ref: '#/components/schemas/AssetRef'
      nullable: true
      type: object
    DatasourceRef:
      description: Reference information about a datasource asset.
      required:
        - id
        - name
        - kind
      properties:
        id:
          $ref: '#/components/schemas/AssetId'
        name:
          $ref: '#/components/schemas/AssetName'
        kind:
          $ref: '#/components/schemas/AssetKind'
        overrides:
          $ref: '#/components/schemas/DataSourceOverrides'
    AssetsRef:
      description: Reference information about a set of assets. used to describe - assets comprising a workspace - assets comprising a workspace template - assets that use other assets (e.g. s3 asset which uses access key).
      required:
        - environment
      properties:
        environment:
          description: environment asset.
          allOf:
            - $ref: '#/components/schemas/EnvironmentAssetRef'
        compute:
          $ref: '#/components/schemas/AssetsRefCompute'
        datasources:
          type: array
          items:
            $ref: '#/components/schemas/DatasourceRef'
        workloadVolumes:
          type: array
          items:
            type: string
    PodAffinityType:
      description: The affinity type, required or preferred. (mandatory)
      type: string
      enum:
        - Required
        - Preferred
      nullable: true
    PodAffinity:
      description: Pod affinity scheduling rules (e.g. co-locate this workload in the same node, zone, etc. as some other workloads).
      type: object
      properties:
        type:
          $ref: '#/components/schemas/PodAffinityType'
        key:
          description: The label key to use. (mandatory)
          type: string
          nullable: true
      nullable: true
    ResourcesFlatFields:
      description: Resource parameters.
      properties:
        nodeType:
          description: Nodes (machines), or a group of nodes on which the workload will run. To use this feature, your Administrator will need to label nodes. For more information, see [Group Nodes](https://docs.run.ai/v2.19/admin/researcher-setup/limit-to-node-group). When using this flag with with Project-based affinity, it refines the list of allowable node groups set in the Project. For more information, see [Projects](https://docs.run.ai/admin/admin-ui-setup/project-setup).
          type: string
          minLength: 1
          example: my-node-type
          nullable: true
        nodePools:
          description: A prioritized list of node pools for the scheduler to run the workspace on. The scheduler will always try to use the first node pool before moving to the next one if the first is not available.
          type: array
          items:
            type: string
          example:
            - my-node-pool-a
            - my-node-pool-b
          nullable: true
        podAffinity:
          $ref: '#/components/schemas/PodAffinity'
      nullable: true
      type: object
    AdvancedFlatFields:
      properties:
        terminateAfterPreemption:
          description: Indicates if the job should be terminated by the system after it has been preempted.
          type: boolean
          example: false
          nullable: true
        autoDeletionTimeAfterCompletionSeconds:
          description: Specifies the duration after which a finished workload (completed or failed) will be automatically deleted. The default is 30 days.
          format: int64
          type: integer
          example: 15
          nullable: true
        backoffLimit:
          description: Specifies the number of retries before marking a workload as failed (not applicable to Inference workloads). The default value is 6.
          format: int64
          type: integer
          example: 3
          nullable: true
      nullable: true
      type: object
    Annotation:
      description: Annotation details to be populated into the container.
      properties:
        name:
          description: The name of the annotation (mandatory)
          type: string
          minLength: 1
          maxLength: 63
          example: billing
          nullable: true
        value:
          description: The value of the annotation.
          type: string
          example: my-billing-unit
          nullable: true
        exclude:
          description: Use 'true' in case the annotation is defined in defaults of the policy, and you wish to exclude it from the workload.
          type: boolean
          default: false
          example: false
          nullable: true
      nullable: true
      type: object
    Annotations:
      description: Set of annotations to populate into the container running the workspace.
      type: array
      items:
        $ref: '#/components/schemas/Annotation'
      nullable: true
    AnnotationsField:
      properties:
        annotations:
          $ref: '#/components/schemas/Annotations'
      nullable: true
      type: object
    Label:
      description: Label details to be populated into the container.
      properties:
        name:
          description: The name of the label (mandatory)
          type: string
          minLength: 1
          maxLength: 63
          example: stage
          nullable: true
        value:
          description: The value of the label.
          type: string
          example: initial-research
          nullable: true
        exclude:
          description: Use 'true' in case the label is defined in defaults of the policy, and you wish to exclude it from the workload.
          type: boolean
          example: false
          nullable: true
      nullable: true
      type: object
    Labels:
      description: Set of labels to populate into the container running the workspace.
      type: array
      items:
        $ref: '#/components/schemas/Label'
      nullable: true
    LabelsField:
      properties:
        labels:
          $ref: '#/components/schemas/Labels'
      nullable: true
      type: object
    TolerationOperator:
      description: A key's relationship to the value. Equal uses key and value. Exists is equivalent to wildcard for value, so that a workload can tolerate all taints of a particular category. (mandatory)
      type: string
      enum:
        - Equal
        - Exists
      nullable: true
    TolerationEffect:
      description: The taint effect to match. (mandatory)
      type: string
      enum:
        - NoSchedule
        - NoExecute
        - PreferNoSchedule
        - Any
      nullable: true
    Toleration:
      description: Toleration details.
      properties:
        name:
          description: The name of the toleration.
          type: string
          minLength: 1
          nullable: true
        operator:
          $ref: '#/components/schemas/TolerationOperator'
        key:
          description: The taint key that the toleration applies to. (mandatory)
          type: string
          nullable: true
        value:
          description: The taint value the toleration matches to. Mandatory if operator is Exists, forbidden otherwise.
          type: string
          nullable: true
        effect:
          $ref: '#/components/schemas/TolerationEffect'
        seconds:
          description: The period of time the toleration tolerates the taint. Valid only if effect is NoExecute. taint.
          type: integer
          minimum: 1
          nullable: true
        exclude:
          description: Use 'true' in case the label is defined in defaults of the policy, and you wish to exclude it from the workload.
          type: boolean
          example: false
          nullable: true
      nullable: true
      type: object
    Tolerations:
      description: Set of tolerations to apply to the workload.
      type: array
      items:
        $ref: '#/components/schemas/Toleration'
      nullable: true
    TolerationsField:
      properties:
        tolerations:
          $ref: '#/components/schemas/Tolerations'
      nullable: true
      type: object
    AdvancedItemizedFields:
      allOf:
        - $ref: '#/components/schemas/AnnotationsField'
        - $ref: '#/components/schemas/LabelsField'
        - $ref: '#/components/schemas/TolerationsField'
      nullable: true
      type: object
    SpecificRunConnectionInfo:
      required:
        - connectionName
      properties:
        name:
          type: string
          minLength: 1
          description: Unique identifier of the connection. Will be used to correlate between the information given here and the information provided for the connection in the environment asset.
        nodePort:
          description: Port number of the host that will be connected with the container port. Required if and only if isCustomPort is set to true in the environment asset.
          type: integer
          format: int32
          minimum: 0
          maximum: 65535
          nullable: true
        externalUrl:
          description: URL to associated with the container port. Required if and only if isCustomExternalUrl is set to true in the environment asset.
          type: string
          minLength: 1
          nullable: true
        authorizedUsers:
          description: Specifies the emails of those users that are allowed to access the connection. Note that authorizedUsers and authorizedGroups are mutually exclusive.
          type: array
          items:
            type: string
          nullable: true
        authorizedGroups:
          description: Specifies the names of those groups that are allowed to access the connection. Note that authorizedUsers and authorizedGroups are mutually exclusive.
          type: array
          items:
            type: string
          nullable: true
    SpecificRunConnections:
      properties:
        connections:
          type: array
          items:
            $ref: '#/components/schemas/SpecificRunConnectionInfo'
          nullable: true
      nullable: true
      type: object
    SpecificRunParamsCommon:
      allOf:
        - $ref: '#/components/schemas/ContainerOverridable'
        - $ref: '#/components/schemas/CommonSecurityOverridable'
        - $ref: '#/components/schemas/EnvironmentVariablesField'
        - $ref: '#/components/schemas/ResourcesFlatFields'
        - $ref: '#/components/schemas/AdvancedFlatFields'
        - $ref: '#/components/schemas/AdvancedItemizedFields'
        - $ref: '#/components/schemas/SpecificRunConnections'
      nullable: true
      type: object
    AllowOverQuota:
      properties:
        allowOverQuota:
          description: Whether to allow the workload to exceed the quota of the project.
          type: boolean
          nullable: true
    AutoScalingCommonFields:
      description: Auto scaling common fields
      properties:
        minReplicas:
          description: The minimum number of replicas for autoscaling. Defaults to 1. Use 0 to allow scale-to-zero
          type: integer
          format: int32
          minimum: 0
          nullable: true
        maxReplicas:
          description: The maximum number of replicas for autoscaling. Defaults to minReplicas, or to 1 if minReplicas is set to 0
          type: integer
          format: int32
          minimum: 1
          nullable: true
        scaleToZeroRetentionSeconds:
          description: The minimum amount of time (in seconds) that the last replica will remain active after a scale-to-zero decision. Defaults to 0. Available only if minReplicas is set to 0
          type: integer
          format: int32
          minimum: 0
          maximum: 3600
          nullable: true
      nullable: true
      type: object
    AutoScalingMetric:
      description: The metric to use for autoscaling. Mandatory if minReplicas < maxReplicas, except for the special case where minReplicas is set to 0 and maxReplicas is set to 1, as in this case autoscaling decisions are made according to network activity rather than metrics. Only the 'throughput' and 'concurrency' metrics support scale-to-zero
      type: string
      enum:
        - throughput
        - concurrency
        - latency
      nullable: true
    SpecificRunMetricFields:
      properties:
        thresholdMetric:
          $ref: '#/components/schemas/AutoScalingMetric'
        thresholdValue:
          description: The threshold value to use with the specified metric for autoscaling
          type: integer
          format: int32
          nullable: true
      type: object
      nullable: true
    SpecificRunAutoScaling:
      properties:
        autoScaling:
          allOf:
            - $ref: '#/components/schemas/AutoScalingCommonFields'
            - $ref: '#/components/schemas/SpecificRunMetricFields'
          nullable: true
          type: object
      nullable: true
      type: object
    SpecificRunParams:
      description: |
        Parameters which apply to a specific workload. They complement the information gathered from the assets comprising the workload.
      allOf:
        - $ref: '#/components/schemas/SpecificRunParamsCommon'
        - $ref: '#/components/schemas/AllowOverQuota'
        - $ref: '#/components/schemas/SpecificRunAutoScaling'
      nullable: true
      type: object
    DistributedFramework:
      description: The distributed training framework used in the workload.
      type: string
      enum:
        - MPI
        - PyTorch
        - TF
        - XGBoost
      nullable: true
    AssetsRefOptional:
      allOf:
        - $ref: '#/components/schemas/AssetsRef'
      type: object
      nullable: true
    InfoDistMaster:
      description: |
        Parameters which apply to the master in a distributed training.
      nullable: true
      type: object
      properties:
        assets:
          $ref: '#/components/schemas/AssetsRefOptional'
        specificEnv:
          $ref: '#/components/schemas/SpecificRunParams'
    InfoDistributed:
      description: |
        Parameters which apply to distributed training.
      allOf:
        - properties:
            numWorkers:
              type: integer
            noMaster:
              type: boolean
              nullable: true
            distFramework:
              $ref: '#/components/schemas/DistributedFramework'
            master:
              $ref: '#/components/schemas/InfoDistMaster'
      nullable: true
      type: object
    SpecificRunInfoFields:
      description: Information about the set of assets which comprises a workspace, training or template, and an optional set of specific run parameters.
      required:
        - assets
      properties:
        assets:
          $ref: '#/components/schemas/AssetsRef'
        specificEnv:
          $ref: '#/components/schemas/SpecificRunParams'
        distributed:
          $ref: '#/components/schemas/InfoDistributed'
    WorkloadTemplate:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/SpecificRunInfoFields'
    WorkloadTemplateListResponse:
      type: object
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/WorkloadTemplate'
    SpecificRunCreationFields:
      description: The information needed for creating az template - a set of assets and an optional set of specific environment parameters.
      required:
        - assets
      properties:
        assets:
          $ref: '#/components/schemas/AssetsIds'
        specificEnv:
          $ref: '#/components/schemas/SpecificRunParams'
    WorkloadTemplateCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/SpecificRunCreationFields'
    WorkloadTemplateUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
        spec:
          $ref: '#/components/schemas/SpecificRunCreationFields'
    DistMaster:
      description: |
        Parameters which apply to the master in a distributed training.
      nullable: true
      type: object
      properties:
        assets:
          $ref: '#/components/schemas/AssetsIds'
        specificEnv:
          $ref: '#/components/schemas/SpecificRunParams'
    Distributed:
      description: |
        Parameters which apply to distributed training.
      allOf:
        - properties:
            numWorkers:
              type: integer
            noMaster:
              type: boolean
              nullable: true
            distFramework:
              $ref: '#/components/schemas/DistributedFramework'
            master:
              $ref: '#/components/schemas/DistMaster'
      nullable: true
      type: object
    WorkloadDesiredPhase:
      description: The desired phase of the workload.
      type: string
      enum:
        - Running
        - Stopped
        - Deleted
    Phase:
      type: string
      enum:
        - Creating
        - Initializing
        - Resuming
        - Pending
        - Deleting
        - Running
        - Updating
        - Stopped
        - Stopping
        - Degraded
        - Failed
        - Completed
        - Terminating
        - Unknown
    WorkspaceSpecificRunParams:
      allOf:
        - $ref: '#/components/schemas/SpecificRunParamsCommon'
        - $ref: '#/components/schemas/AllowOverQuota'
      nullable: true
      type: object
    DataVolume:
      properties:
        id:
          description: The unique identifier of the data volume. (mandatory)
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
          nullable: true
        mountPath:
          description: The path where the data volume will be mounted. (mandatory)
          type: string
          example: /mnt/data
          nullable: true
      nullable: true
      type: object
    SecretFieldsUpdatable:
      properties:
        mountPath:
          description: Local path within the workspace to which the Secret will be mapped to. (mandatory)
          type: string
          minLength: 1
          nullable: true
      nullable: true
      type: object
    SecretFieldsNonUpdatable:
      properties:
        secret:
          description: The name of the Secret resource. (mandatory)
          type: string
          minLength: 1
          nullable: true
      nullable: true
      type: object
    Secret2:
      allOf:
        - $ref: '#/components/schemas/SecretFieldsUpdatable'
        - $ref: '#/components/schemas/SecretFieldsNonUpdatable'
    ProjectIdOptional:
      description: The id of the project.
      type: integer
      format: int32
      example: 1
      nullable: true
    SourceOfRule:
      description: This field is used by the system along with effective rules, in order to specify the org unit from which this effective rule has been derived. It should be left empty when sending apply policy requests.
      required:
        - scope
      properties:
        scope:
          $ref: '#/components/schemas/ScopeType'
        projectId:
          $ref: '#/components/schemas/ProjectIdOptional'
        departmentId:
          $ref: '#/components/schemas/DepartmentIdOptional'
        clusterId:
          $ref: '#/components/schemas/ClusterIdOptional'
      example:
        scope: project
        projectId: 3
      nullable: true
      type: object
    StringRulesCommon:
      properties:
        sourceOfRule:
          $ref: '#/components/schemas/SourceOfRule'
        required:
          description: Whether the field is mandatory, default to false.
          type: boolean
          nullable: true
        canEdit:
          description: Whether the value of the field is editable, default to true
          type: boolean
          nullable: true
      example:
        required: true
        canEdit: false
    StringOption:
      description: One of the values that the field can be assigned to, when options police is applied on the field.
      required:
        - value
      properties:
        value:
          description: The value that the field should hold
          type: string
        displayed:
          description: Textual description of the value. to be used by user interface applications.
          type: string
          nullable: true
      example:
        value: value
        displayed: A description of the value.
    StringRulesOptions:
      properties:
        options:
          description: Set of options that the value of the field must be chosen from.
          type: array
          items:
            $ref: '#/components/schemas/StringOption'
          nullable: true
    StringRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/StringRulesOptions'
      nullable: true
      type: object
    DataVolumeRules:
      properties:
        id:
          $ref: '#/components/schemas/StringRules'
        mountPath:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    ItemRules:
      properties:
        sourceOfRule:
          $ref: '#/components/schemas/SourceOfRule'
        canAdd:
          description: Whether it is permitted to add items. Default to true.
          type: boolean
          nullable: true
        locked:
          description: Set of keys for items that are "locked", i.e. cannot be removed or deleted.
          type: array
          items:
            type: string
          example:
            - HOME
            - USER
      nullable: true
      type: object
    DataVolumesRules:
      properties:
        attributes:
          $ref: '#/components/schemas/DataVolumeRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    BooleanRules:
      properties:
        sourceOfRule:
          $ref: '#/components/schemas/SourceOfRule'
        required:
          description: Whether the field is mandatory. default to false.
          type: boolean
          nullable: true
        canEdit:
          description: Whether the value of the field is editable. default to true
          type: boolean
          nullable: true
      nullable: true
      type: object
    PvcAccessModesRules:
      description: Rules for access mode(s) for a newly created PVC.
      properties:
        readWriteOnce:
          $ref: '#/components/schemas/BooleanRules'
        readOnlyMany:
          $ref: '#/components/schemas/BooleanRules'
        readWriteMany:
          $ref: '#/components/schemas/BooleanRules'
      nullable: true
      type: object
    ClaimInfoRules:
      properties:
        size:
          $ref: '#/components/schemas/StringRules'
        storageClass:
          $ref: '#/components/schemas/StringRules'
        accessModes:
          $ref: '#/components/schemas/PvcAccessModesRules'
      nullable: true
      type: object
    PvcRules:
      properties:
        claimName:
          $ref: '#/components/schemas/StringRules'
        path:
          $ref: '#/components/schemas/StringRules'
        readOnly:
          $ref: '#/components/schemas/BooleanRules'
        claimInfo:
          $ref: '#/components/schemas/ClaimInfoRules'
      nullable: true
      type: object
    PvcsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/PvcRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    GitRules:
      properties:
        repository:
          $ref: '#/components/schemas/StringRules'
        branch:
          $ref: '#/components/schemas/StringRules'
        revision:
          $ref: '#/components/schemas/StringRules'
        path:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    GitsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/GitRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    ConfigMapRules:
      properties:
        configMap:
          $ref: '#/components/schemas/StringRules'
        mountPath:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    ConfigMapsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/ConfigMapRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    SecretRules:
      properties:
        secret:
          $ref: '#/components/schemas/StringRules'
        mountPath:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    SecretsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/SecretRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    CommonStorageFieldsRules:
      properties:
        dataVolume:
          $ref: '#/components/schemas/DataVolumesRules'
        pvc:
          $ref: '#/components/schemas/PvcsRules'
        git:
          $ref: '#/components/schemas/GitsRules'
        configMapVolume:
          $ref: '#/components/schemas/ConfigMapsRules'
        secretVolume:
          $ref: '#/components/schemas/SecretsRules'
      nullable: true
      type: object
    HostPathMountPropagationOptions:
      properties:
        options:
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/HostPathMountPropagation'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
    HostPathMountPropagationRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/HostPathMountPropagationOptions'
      nullable: true
      type: object
    HostPathRules:
      properties:
        path:
          $ref: '#/components/schemas/StringRules'
        readOnly:
          $ref: '#/components/schemas/BooleanRules'
        mountPath:
          $ref: '#/components/schemas/StringRules'
        mountPropagation:
          $ref: '#/components/schemas/HostPathMountPropagationRules'
      nullable: true
      type: object
    HostPathsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/HostPathRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    NfsRules:
      properties:
        path:
          $ref: '#/components/schemas/StringRules'
        readOnly:
          $ref: '#/components/schemas/BooleanRules'
        server:
          $ref: '#/components/schemas/StringRules'
        mountPath:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    NfssRules:
      properties:
        attributes:
          $ref: '#/components/schemas/NfsRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    S3Rules:
      properties:
        bucket:
          $ref: '#/components/schemas/StringRules'
        path:
          $ref: '#/components/schemas/StringRules'
        url:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    S3sRules:
      properties:
        attributes:
          $ref: '#/components/schemas/S3Rules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    NonInferenceStorageFieldsRules:
      properties:
        hostPath:
          $ref: '#/components/schemas/HostPathsRules'
        nfs:
          $ref: '#/components/schemas/NfssRules'
        s3:
          $ref: '#/components/schemas/S3sRules'
      nullable: true
      type: object
    StorageFieldsRules:
      allOf:
        - $ref: '#/components/schemas/CommonStorageFieldsRules'
        - $ref: '#/components/schemas/NonInferenceStorageFieldsRules'
      nullable: true
      type: object
    ContainerOverridableRules:
      description: Container related fields. When used in assets context, those are environment asset fields that can be override in the submit workload request.
      properties:
        command:
          $ref: '#/components/schemas/StringRules'
        args:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    IntegerRulesOptional:
      properties:
        sourceOfRule:
          $ref: '#/components/schemas/SourceOfRule'
        canEdit:
          description: Whether the value of the field is editable. default to true
          type: boolean
          nullable: true
        min:
          description: The minimum value that the field can be assigned to.
          type: integer
          format: int32
          nullable: true
        max:
          description: The maximum value that the field can be assigned to.
          type: integer
          format: int32
          nullable: true
        step:
          description: The minimal difference between two values the field can be assigned to. For example, min=2, max=10, step=2 implies that the values the field can hold are 2, 4, 6, 8 and 10.
          type: integer
          format: int32
          nullable: true
      nullable: true
      type: object
    CommonSecurityOverridableRules:
      description: Security related fields. When used in assets context, those are environment asset fields that can be override in the submit workload request.
      properties:
        runAsUid:
          $ref: '#/components/schemas/IntegerRulesOptional'
        runAsGid:
          $ref: '#/components/schemas/IntegerRulesOptional'
        supplementalGroups:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    InstancesRules:
      properties:
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    EnvironmentVariablesFieldRules:
      properties:
        environmentVariables:
          $ref: '#/components/schemas/InstancesRules'
      nullable: true
      type: object
    ArrayRules:
      properties:
        sourceOfRule:
          $ref: '#/components/schemas/SourceOfRule'
        required:
          description: Whether this array is mandatory. Mandatory array must include at least one item. default to false.
          type: boolean
          nullable: true
        canEdit:
          description: Whether the value of the array, as a whole, is editable. default to false.
          type: boolean
          nullable: true
      nullable: true
      type: object
    PodAffinityTypeOptions:
      properties:
        options:
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/PodAffinityType'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      type: object
    PodAffinityTypeRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/PodAffinityTypeOptions'
      nullable: true
      type: object
    PodAffinityRules:
      properties:
        type:
          $ref: '#/components/schemas/PodAffinityTypeRules'
        key:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    ResourcesFlatFieldsRules:
      description: Resource related parameters.
      properties:
        nodeType:
          $ref: '#/components/schemas/StringRules'
        nodePools:
          $ref: '#/components/schemas/ArrayRules'
        podAffinity:
          $ref: '#/components/schemas/PodAffinityRules'
      nullable: true
      type: object
    IntegerRules:
      properties:
        sourceOfRule:
          $ref: '#/components/schemas/SourceOfRule'
        required:
          description: Whether the field is mandatory. default to false.
          type: boolean
          nullable: true
        canEdit:
          description: Whether the value of the field is editable. default to true
          type: boolean
          nullable: true
        min:
          description: The minimum value that the field can be assigned to.
          type: integer
          format: int32
          nullable: true
        max:
          description: The maximum value that the field can be assigned to.
          type: integer
          format: int32
          nullable: true
        step:
          description: The minimal difference between two values the field can be assigned to. For example, min=2, max=10, step=2 implies that the values the field can hold are 2, 4, 6, 8 and 10.
          type: integer
          format: int32
          nullable: true
      nullable: true
      type: object
    AdvancedFlatFieldsRules:
      properties:
        terminateAfterPreemption:
          $ref: '#/components/schemas/BooleanRules'
        autoDeletionTimeAfterCompletionSeconds:
          $ref: '#/components/schemas/IntegerRules'
        backoffLimit:
          $ref: '#/components/schemas/IntegerRules'
      nullable: true
      type: object
    AnnotationsFieldRules:
      properties:
        annotations:
          $ref: '#/components/schemas/InstancesRules'
      nullable: true
      type: object
    LabelsFieldRules:
      properties:
        labels:
          $ref: '#/components/schemas/InstancesRules'
      nullable: true
      type: object
    TolerationOperatorOptions:
      properties:
        options:
          description: Limit the permitted values for imagePullPolicy to a given set of values.
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/TolerationOperator'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    TolerationOperatorRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/TolerationOperatorOptions'
      nullable: true
      type: object
    TolerationEffectOptions:
      properties:
        options:
          description: Limit the permitted values for imagePullPolicy to a given set of values.
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/TolerationEffect'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    TolerationEffectRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/TolerationEffectOptions'
      nullable: true
      type: object
    TolerationRules:
      description: Toleration details.
      properties:
        operator:
          $ref: '#/components/schemas/TolerationOperatorRules'
        key:
          $ref: '#/components/schemas/StringRules'
        value:
          $ref: '#/components/schemas/StringRules'
        effect:
          $ref: '#/components/schemas/TolerationEffectRules'
        seconds:
          $ref: '#/components/schemas/IntegerRules'
        exclude:
          $ref: '#/components/schemas/BooleanRules'
      nullable: true
      type: object
    TolerationsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/TolerationRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    TolerationsFieldRules:
      properties:
        tolerations:
          $ref: '#/components/schemas/TolerationsRules'
      nullable: true
      type: object
    AdvancedItemizedRules:
      allOf:
        - $ref: '#/components/schemas/AnnotationsFieldRules'
        - $ref: '#/components/schemas/LabelsFieldRules'
        - $ref: '#/components/schemas/TolerationsFieldRules'
      type: object
      nullable: true
    SpecificRunParamsCommonRules:
      allOf:
        - $ref: '#/components/schemas/ContainerOverridableRules'
        - $ref: '#/components/schemas/CommonSecurityOverridableRules'
        - $ref: '#/components/schemas/EnvironmentVariablesFieldRules'
        - $ref: '#/components/schemas/ResourcesFlatFieldsRules'
        - $ref: '#/components/schemas/AdvancedFlatFieldsRules'
        - $ref: '#/components/schemas/AdvancedItemizedRules'
      nullable: true
      type: object
    SpecificRunParamsRules:
      description: Rules which apply to specific workload.
      allOf:
        - $ref: '#/components/schemas/SpecificRunParamsCommonRules'
      nullable: true
      type: object
    TrainingSpecificRunParams:
      allOf:
        - $ref: '#/components/schemas/SpecificRunParamsCommon'
        - $ref: '#/components/schemas/AllowOverQuota'
      nullable: true
      type: object
    OptionalAssetIds:
      allOf:
        - $ref: '#/components/schemas/AssetsIds'
      nullable: true
      type: object
    InferenceSpecificRunParams:
      allOf:
        - $ref: '#/components/schemas/SpecificRunParamsCommon'
        - $ref: '#/components/schemas/SpecificRunAutoScaling'
      nullable: true
      type: object
    ConfigMapAsset:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/ConfigMapAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    ConfigMapListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/ConfigMapAsset'
    ConfigMapCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/ConfigMapAssetSpec'
    ConfigMapUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
    SecretAsset:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetMeta'
        spec:
          $ref: '#/components/schemas/SecretAssetSpec'
        usedBy:
          $ref: '#/components/schemas/AssetUsageInfo'
        usageTimes:
          $ref: '#/components/schemas/UsageTimesInfo'
        compliance:
          $ref: '#/components/schemas/ComplianceInfo'
        status:
          $ref: '#/components/schemas/AssetClusterStatusInfo'
    SecretAssetListResponse:
      required:
        - entries
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/SecretAsset'
    SecretAssetCreationRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetCreationRequest'
        spec:
          $ref: '#/components/schemas/SecretAssetSpec'
    SecretAssetUpdateRequest:
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/AssetUpdateRequest'
    supersetRules:
      $ref: '#/components/schemas/SupersetRules'
    PolicyType:
      description: The type of policy which determines the kind of workloads it is affecting
      type: string
      enum:
        - workspace
        - training
        - distributed
        - inference
    PolicyId:
      description: The unique id of the policy.
      type: string
      minLength: 1
      format: uuid
    PolicyReadOnlyFields:
      required:
        - id
        - createdBy
        - createdAt
        - updatedBy
        - updatedAt
      properties:
        id:
          $ref: '#/components/schemas/PolicyId'
        tenantId:
          $ref: '#/components/schemas/TenantId'
        clusterId:
          $ref: '#/components/schemas/ClusterIdOptional'
        createdBy:
          description: The user who created the policy.
          type: string
          minLength: 1
        createdAt:
          description: The time at which the policy wes created
          type: string
          minLength: 1
          format: date-time
        updatedBy:
          description: The user who updated the policy.
          type: string
          minLength: 1
        updatedAt:
          description: The time at which the policy has been updated
          type: string
          minLength: 1
          format: date-time
    PolicyName:
      description: A chosen name for the policy.
      type: string
      minLength: 1
      example: my-policy
    PolicyCreationFields:
      required:
        - name
        - scope
      properties:
        scope:
          $ref: '#/components/schemas/ScopeType'
        projectId:
          $ref: '#/components/schemas/ProjectIdOptional'
        departmentId:
          $ref: '#/components/schemas/DepartmentIdOptional'
        clusterId:
          $ref: '#/components/schemas/ClusterIdOptional'
        name:
          $ref: '#/components/schemas/PolicyName'
    PolicyMeta:
      allOf:
        - $ref: '#/components/schemas/PolicyReadOnlyFields'
        - $ref: '#/components/schemas/PolicyCreationFields'
    PolicySyncStatusOfCluster:
      required:
        - clusterId
        - status
      properties:
        clusterId:
          $ref: '#/components/schemas/ClusterId'
        status:
          description: Policy sync status of the cluster
          type: string
          enum:
            - Not ready
            - Applying
            - Failed
            - Ready
            - Pending deletion
            - Deleting
            - Deleted
            - Deletion failed
        errorMessage:
          description: In case sync failed, holds the error message received from the cluster
          type: string
          nullable: true
      type: object
    PolicySyncStatus:
      properties:
        clusters:
          type: array
          items:
            $ref: '#/components/schemas/PolicySyncStatusOfCluster'
    PolicyListEntry:
      properties:
        type:
          $ref: '#/components/schemas/PolicyType'
        meta:
          $ref: '#/components/schemas/PolicyMeta'
        status:
          $ref: '#/components/schemas/PolicySyncStatus'
      nullable: true
      type: object
    PolicyListResponse:
      properties:
        policies:
          type: array
          items:
            $ref: '#/components/schemas/PolicyListEntry'
    CommonFlatFields:
      allOf:
        - $ref: '#/components/schemas/ContainerOverridable'
        - $ref: '#/components/schemas/ContainerNonOverridable'
        - $ref: '#/components/schemas/ResourcesFlatFields'
      nullable: true
      type: object
    EnvironmentVariableSecret:
      description: Details of the secret and key use to populated the environment variable. (mutually exclusive with value)
      properties:
        name:
          description: The name of the secret resource. (mandatory)
          type: string
          minLength: 1
          example: postgress_secret
          nullable: true
        key:
          description: The key in the secret resource. (mandatory)
          type: string
          minLength: 1
          example: POSTGRES_PASSWORD
          nullable: true
      nullable: true
      type: object
    EnvironmentVariable1:
      description: Details of an environment variable which is populated into the container.
      properties:
        name:
          description: The name of the environment variable. (mandatory)
          type: string
          minLength: 1
          example: HOME
          nullable: true
        value:
          description: The value of the environment variable. (mutually exclusive with secret)
          type: string
          example: /home/my-folder
          nullable: true
        secret:
          $ref: '#/components/schemas/EnvironmentVariableSecret'
        exclude:
          description: Use 'true' in case the environment variable is defined in defaults of the policy, and you wish to exclude it from the workload.
          type: boolean
          example: false
          nullable: true
      nullable: true
      type: object
    EnvironmentVariables1:
      description: Set of environment variables to populate into the container running the workspace.
      type: array
      items:
        $ref: '#/components/schemas/EnvironmentVariable1'
      nullable: true
    EnvironmentVariablesDefaults:
      properties:
        instances:
          $ref: '#/components/schemas/EnvironmentVariables1'
      nullable: true
      type: object
    EnvironmentVariablesFieldDefaults:
      properties:
        environmentVariables:
          $ref: '#/components/schemas/EnvironmentVariablesDefaults'
      nullable: true
      type: object
    AnnotationsDefaults:
      properties:
        instances:
          $ref: '#/components/schemas/Annotations'
      nullable: true
      type: object
    AnnotationsFieldDefaults:
      properties:
        annotations:
          $ref: '#/components/schemas/AnnotationsDefaults'
      nullable: true
      type: object
    LabelsDefaults:
      properties:
        instances:
          $ref: '#/components/schemas/Labels'
      nullable: true
      type: object
    LabelsFieldDefaults:
      properties:
        labels:
          $ref: '#/components/schemas/LabelsDefaults'
      nullable: true
      type: object
    TolerationsDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/Toleration'
        instances:
          $ref: '#/components/schemas/Tolerations'
      nullable: true
      type: object
    TolerationsFieldDefaults:
      properties:
        tolerations:
          $ref: '#/components/schemas/TolerationsDefaults'
      nullable: true
      type: object
    AdvancedItemizedDefaults:
      allOf:
        - $ref: '#/components/schemas/AnnotationsFieldDefaults'
        - $ref: '#/components/schemas/LabelsFieldDefaults'
        - $ref: '#/components/schemas/TolerationsFieldDefaults'
      type: object
      nullable: true
    CommonItemizedDefaults:
      allOf:
        - $ref: '#/components/schemas/EnvironmentVariablesFieldDefaults'
        - $ref: '#/components/schemas/AdvancedItemizedDefaults'
      nullable: true
      type: object
    PortServiceType:
      description: The service type of the port (mandatory).
      type: string
      enum:
        - LoadBalancer
        - NodePort
        - ClusterIP
      nullable: true
    Port:
      description: A port for accessing the workload.
      properties:
        container:
          description: The port that the container running the workload exposes. (mandatory)
          type: integer
          format: int32
          minimum: 1
          maximum: 65535
          example: 8080
          nullable: true
        serviceType:
          $ref: '#/components/schemas/PortServiceType'
        external:
          description: The external port which allows a connection to the container port. If not specified, the port will be auto-generated by the system..
          type: integer
          format: int32
          nullable: true
          example: 30080
        toolType:
          description: The tool type that runs on this port.
          type: string
          example: pytorch
          nullable: true
        toolName:
          description: A name describing the tool that runs on this port.
          type: string
          example: my-pytorch
          nullable: true
        name:
          description: Unique name to identify the instance. primarily used for policy locked rules.
          type: string
          minLength: 1
          example: port-instance-a
          nullable: true
      nullable: true
      type: object
    Ports:
      description: Set of container ports that the workload exposes.
      type: array
      items:
        $ref: '#/components/schemas/Port'
      nullable: true
    PortsDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/Port'
        instances:
          $ref: '#/components/schemas/Ports'
      nullable: true
      type: object
    ExposedUrl:
      description: A URL for accessing the workload.
      properties:
        container:
          description: The port that the container running the workload exposes. (mandatory)
          type: integer
          format: int32
          example: 8080
          nullable: true
        url:
          description: The URL for connecting to the container port. If not specified, the URL will be auto-generated by the system..
          type: string
          example: https://my-url.com
          nullable: true
        authorizedUsers:
          description: List of users that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
          type: array
          items:
            type: string
          example:
            - user-a
            - user-b
          nullable: true
        authorizedGroups:
          description: List of groups that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
          type: array
          items:
            type: string
          example:
            - group-a
            - group-b
          nullable: true
        toolType:
          description: The tool type that runs on this container port.
          type: string
          example: jupyter
          nullable: true
        toolName:
          description: A name describing the tool that runs on this url.
          type: string
          example: my-pytorch
          nullable: true
        name:
          description: Unique name to identify the instance. primarily used for policy locked rules.
          type: string
          minLength: 1
          example: url-instance-a
          nullable: true
      nullable: true
      type: object
    ExposedUrls:
      description: Set of container ports that the workload exposes via URLs.
      type: array
      items:
        $ref: '#/components/schemas/ExposedUrl'
      nullable: true
    ExposedUrlsDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/ExposedUrl'
        instances:
          $ref: '#/components/schemas/ExposedUrls'
      nullable: true
      type: object
    RelatedUrl:
      description: A URL that is related to the workload. For example, a URL to an external server providing statistics or logging about the workload.
      properties:
        url:
          description: The URL for connecting an external service related to the workload. (mandatory)
          type: string
          example: https://my-url.com
          nullable: true
        type:
          description: The type of service that the url provides. For example, wandb (Weights & Biases). (mandatory)
          type: string
          example: wandb
          nullable: true
        name:
          description: Unique name to identify the instance. primarily used for policy locked rules.
          type: string
          example: url-instance-a
          nullable: true
      nullable: true
      type: object
    RelatedUrls:
      description: Set of URLs that are related to the workload.
      type: array
      items:
        $ref: '#/components/schemas/RelatedUrl'
      nullable: true
    RelatedUrlsDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/RelatedUrl'
        instances:
          $ref: '#/components/schemas/RelatedUrls'
      nullable: true
      type: object
    ConnectivityDefaults:
      properties:
        ports:
          $ref: '#/components/schemas/PortsDefaults'
        exposedUrls:
          $ref: '#/components/schemas/ExposedUrlsDefaults'
        relatedUrls:
          $ref: '#/components/schemas/RelatedUrlsDefaults'
      nullable: true
      type: object
    PriorityClass:
      description: Priority class of the workload. The default value for workspace is `build` and it can be changed to `interactive-preemptible` to allow the workload to use over-quota resources. The default value for training is `train` and it can be changed to `build` to allow the training workload to have a higher priority for in-queue scheduling and also become non-preemptive (if it`s in deserved quota)..
      type: string
      enum:
        - build
        - train
        - interactive-preemptible
      nullable: true
    PriorityClassFields:
      properties:
        priorityClass:
          $ref: '#/components/schemas/PriorityClass'
      nullable: true
      type: object
    TrainingFields:
      properties:
        completions:
          description: Used with Hyperparameter Optimization. Specifies the number of successful pods the job should reach to be completed. The Job will be marked as successful once the specified amount of pods has been reached.
          type: integer
          format: int32
          example: 1
          nullable: true
        parallelism:
          description: Used with Hyperparameter Optimization. Specifies the maximum number of pods the workload should run at any given time.
          type: integer
          format: int32
          example: 1
          nullable: true
      nullable: true
      type: object
    CommonSecurityFlatFields:
      allOf:
        - $ref: '#/components/schemas/CommonSecurityNonOverridable'
        - $ref: '#/components/schemas/CommonSecurityOverridable'
      nullable: true
      type: object
    NonInferenceSecurityFlatFields:
      allOf:
        - $ref: '#/components/schemas/NonInferenceSecurityNonOverridable'
      nullable: true
      type: object
    SecurityFlatFields:
      allOf:
        - $ref: '#/components/schemas/CommonSecurityFlatFields'
        - $ref: '#/components/schemas/NonInferenceSecurityFlatFields'
      nullable: true
      type: object
    Security:
      properties:
        security:
          $ref: '#/components/schemas/SecurityFlatFields'
      nullable: true
      type: object
    ExtendedResourcesDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/ExtendedResource'
        instances:
          $ref: '#/components/schemas/ExtendedResources'
      nullable: true
      type: object
    ComputeItemizedFieldsDefaults:
      properties:
        extendedResources:
          $ref: '#/components/schemas/ExtendedResourcesDefaults'
      nullable: true
      type: object
    ComputeFieldsDefaults:
      allOf:
        - $ref: '#/components/schemas/ComputeFlatFields'
        - $ref: '#/components/schemas/ComputeItemizedFieldsDefaults'
      nullable: true
      type: object
    ComputeDefaults:
      properties:
        compute:
          $ref: '#/components/schemas/ComputeFieldsDefaults'
      nullable: true
      type: object
    DataVolumeInstance:
      allOf:
        - $ref: '#/components/schemas/DataVolume'
      nullable: true
      type: object
    DataVolumeItems:
      description: Set of data volumes to use in the workload.
      type: array
      items:
        $ref: '#/components/schemas/DataVolumeInstance'
      nullable: true
    DataVolumesDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/DataVolumeInstance'
        instances:
          $ref: '#/components/schemas/DataVolumeItems'
      nullable: true
      type: object
    StorageInstanceName:
      properties:
        name:
          description: unique name to identify the instance. primarily used for policy locked rules.
          type: string
          minLength: 1
          example: storage-instance-a
          nullable: true
      nullable: true
      type: object
    PvcInstance:
      allOf:
        - $ref: '#/components/schemas/StorageInstanceName'
        - $ref: '#/components/schemas/Pvc'
      nullable: true
      type: object
    PvcItems:
      description: Set of pvc persistent volume claims to use in the workload.
      type: array
      items:
        $ref: '#/components/schemas/PvcInstance'
      nullable: true
    PvcsDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/PvcInstance'
        instances:
          $ref: '#/components/schemas/PvcItems'
      nullable: true
      type: object
    GitPassword:
      properties:
        passwordSecret:
          description: Secret containing the credentials of the repository (needed for non public repository which requires authentication).
          type: string
          minLength: 1
          example: my-password-secret
          nullable: true
        secretKeyOfUser:
          description: The key to use for loading the user name from the secret. The default is `User`.
          type: string
          minLength: 1
          example: User
          nullable: true
        secretKeyOfPassword:
          description: The key to use for loading the password from the secret. The default is `Password`.
          type: string
          minLength: 1
          example: Password
          nullable: true
      nullable: true
      type: object
    GitInstance:
      allOf:
        - $ref: '#/components/schemas/StorageInstanceName'
        - $ref: '#/components/schemas/GitCommon'
        - $ref: '#/components/schemas/GitPassword'
      nullable: true
      type: object
    GitItems:
      description: Set of git repositories to use in the workload.
      type: array
      items:
        $ref: '#/components/schemas/GitInstance'
      nullable: true
    GitsDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/GitInstance'
        instances:
          $ref: '#/components/schemas/GitItems'
      nullable: true
      type: object
    ConfigMapInstance:
      allOf:
        - $ref: '#/components/schemas/StorageInstanceName'
        - $ref: '#/components/schemas/ConfigMap'
      nullable: true
      type: object
    ConfigMapField:
      description: Set of config map volumes to use in the workload
      type: array
      items:
        $ref: '#/components/schemas/ConfigMapInstance'
      nullable: true
    ConfigMapsDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/ConfigMapInstance'
        instances:
          $ref: '#/components/schemas/ConfigMapField'
      nullable: true
      type: object
    Secret3:
      allOf:
        - $ref: '#/components/schemas/SecretFieldsUpdatable'
        - $ref: '#/components/schemas/SecretFieldsNonUpdatable'
    SecretInstance:
      allOf:
        - $ref: '#/components/schemas/StorageInstanceName'
        - $ref: '#/components/schemas/Secret3'
      nullable: true
      type: object
    SecretItems:
      description: Set of secret volumes to use in the workload
      type: array
      items:
        $ref: '#/components/schemas/SecretInstance1'
      nullable: true
    SecretsDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/SecretInstance'
        instances:
          $ref: '#/components/schemas/SecretItems'
      nullable: true
      type: object
    CommonStorageFieldsDefaults:
      properties:
        dataVolume:
          $ref: '#/components/schemas/DataVolumesDefaults'
        pvc:
          $ref: '#/components/schemas/PvcsDefaults'
        git:
          $ref: '#/components/schemas/GitsDefaults'
        configMapVolume:
          $ref: '#/components/schemas/ConfigMapsDefaults'
        secretVolume:
          $ref: '#/components/schemas/SecretsDefaults'
      nullable: true
      type: object
    HostPathInstance:
      allOf:
        - $ref: '#/components/schemas/StorageInstanceName'
        - $ref: '#/components/schemas/HostPath'
      nullable: true
      type: object
    HostPathItems:
      description: Set of host paths to use in the workload.
      type: array
      items:
        $ref: '#/components/schemas/HostPathInstance'
      nullable: true
    HostPathsDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/HostPathInstance'
        instances:
          $ref: '#/components/schemas/HostPathItems'
      nullable: true
      type: object
    NfsInstance:
      allOf:
        - $ref: '#/components/schemas/StorageInstanceName'
        - $ref: '#/components/schemas/Nfs'
      nullable: true
      type: object
    NfsItems:
      description: Set of nfs volumes to use in the workload.
      type: array
      items:
        $ref: '#/components/schemas/NfsInstance'
      nullable: true
    NfssDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/NfsInstance'
        instances:
          $ref: '#/components/schemas/NfsItems'
      nullable: true
      type: object
    S3AccessKey:
      properties:
        accessKeySecret:
          description: Name of the secret containing credentials of the S3 bucket. Used for private S3 buckets.
          type: string
          minLength: 1
          example: my-access-key-secret
          nullable: true
        secretKeyOfAccessKeyId:
          description: The key to use for loading the access key id from the secret. The default is `AccessKeyId`. For more information, see [Credentials access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
          type: string
          minLength: 1
          example: AccessKeyId
          nullable: true
        secretKeyOfSecretKey:
          description: The key to use for loading the secret key from the secret. The default is `SecretKey`. For more information, see [Credentials access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
          type: string
          minLength: 1
          example: SecretKey
          nullable: true
      nullable: true
      type: object
    S3Instance:
      allOf:
        - $ref: '#/components/schemas/StorageInstanceName'
        - $ref: '#/components/schemas/S3Common'
        - $ref: '#/components/schemas/S3AccessKey'
      nullable: true
      type: object
    S3Items:
      description: Set of s3 buckets to use in the workload.
      type: array
      items:
        $ref: '#/components/schemas/S3Instance'
      nullable: true
    S3sDefaults:
      properties:
        attributes:
          $ref: '#/components/schemas/S3Instance'
        instances:
          $ref: '#/components/schemas/S3Items'
      nullable: true
      type: object
    NonInferenceStorageFieldsDefaults:
      properties:
        hostPath:
          $ref: '#/components/schemas/HostPathsDefaults'
        nfs:
          $ref: '#/components/schemas/NfssDefaults'
        s3:
          $ref: '#/components/schemas/S3sDefaults'
      nullable: true
      type: object
    StorageFieldsDefaults:
      allOf:
        - $ref: '#/components/schemas/CommonStorageFieldsDefaults'
        - $ref: '#/components/schemas/NonInferenceStorageFieldsDefaults'
      nullable: true
      type: object
    StorageDefaults:
      properties:
        storage:
          $ref: '#/components/schemas/StorageFieldsDefaults'
      nullable: true
      type: object
    NonInferenceFlatFields:
      allOf:
        - $ref: '#/components/schemas/ContainerNonInferenceNonOverridable'
      nullable: true
      type: object
    ImagePullPolicyOptions:
      properties:
        options:
          description: Limit the permitted values for imagePullPolicy to a given set of values.
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/ImagePullPolicy'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    ImagePullPolicyRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/ImagePullPolicyOptions'
      nullable: true
      type: object
    ProbeHandlerRules:
      properties:
        httpGet:
          properties:
            path:
              $ref: '#/components/schemas/StringRules'
            port:
              $ref: '#/components/schemas/IntegerRules'
            host:
              $ref: '#/components/schemas/StringRules'
            scheme:
              $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    ProbeRules:
      properties:
        initialDelaySeconds:
          $ref: '#/components/schemas/IntegerRules'
        periodSeconds:
          $ref: '#/components/schemas/IntegerRules'
        timeoutSeconds:
          $ref: '#/components/schemas/IntegerRules'
        successThreshold:
          $ref: '#/components/schemas/IntegerRules'
        failureThreshold:
          $ref: '#/components/schemas/IntegerRules'
        handler:
          $ref: '#/components/schemas/ProbeHandlerRules'
      nullable: true
      type: object
    ProbesRules:
      properties:
        readiness:
          $ref: '#/components/schemas/ProbeRules'
      nullable: true
      type: object
    ContainerNonOverridableRules:
      properties:
        image:
          $ref: '#/components/schemas/StringRules'
        imagePullPolicy:
          $ref: '#/components/schemas/ImagePullPolicyRules'
        workingDir:
          $ref: '#/components/schemas/StringRules'
        createHomeDir:
          $ref: '#/components/schemas/BooleanRules'
        probes:
          $ref: '#/components/schemas/ProbesRules'
      nullable: true
      type: object
    CommonFlatFieldsRules:
      allOf:
        - $ref: '#/components/schemas/ContainerOverridableRules'
        - $ref: '#/components/schemas/ContainerNonOverridableRules'
        - $ref: '#/components/schemas/ResourcesFlatFieldsRules'
      nullable: true
      type: object
    CommonItemizedFieldsRules:
      allOf:
        - $ref: '#/components/schemas/EnvironmentVariablesFieldRules'
        - $ref: '#/components/schemas/AdvancedItemizedRules'
      nullable: true
      type: object
    PortServiceTypeOptions:
      properties:
        options:
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/PortServiceType'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    PortServiceTypeRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/PortServiceTypeOptions'
      nullable: true
      type: object
    PortRules:
      description: Rules for port attributes
      properties:
        container:
          $ref: '#/components/schemas/IntegerRules'
        serviceType:
          $ref: '#/components/schemas/PortServiceTypeRules'
        customExternalPort:
          $ref: '#/components/schemas/BooleanRules'
        external:
          $ref: '#/components/schemas/IntegerRules'
        toolType:
          $ref: '#/components/schemas/StringRules'
        toolName:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    PortsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/PortRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    ExposedUrlRules:
      description: Rules for the attributed of exposedUrls
      properties:
        container:
          $ref: '#/components/schemas/IntegerRules'
        customUrl:
          $ref: '#/components/schemas/BooleanRules'
        url:
          $ref: '#/components/schemas/StringRules'
        authorizedUsers:
          $ref: '#/components/schemas/ArrayRules'
        toolType:
          $ref: '#/components/schemas/StringRules'
        toolName:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    ExposedUrlsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/ExposedUrlRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    RelatedUrlRules:
      description: Rules for the attributes of relatedUrls
      properties:
        url:
          $ref: '#/components/schemas/StringRules'
        type:
          $ref: '#/components/schemas/StringRules'
        name:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    RelatedUrlsRules:
      properties:
        attributes:
          $ref: '#/components/schemas/RelatedUrlRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    ConnectivityRules:
      properties:
        ports:
          $ref: '#/components/schemas/PortsRules'
        exposedUrls:
          $ref: '#/components/schemas/ExposedUrlsRules'
        relatedUrls:
          $ref: '#/components/schemas/RelatedUrlsRules'
      nullable: true
      type: object
    PriorityClassOptions:
      properties:
        options:
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/PriorityClass'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    PriorityClassRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/PriorityClassOptions'
      nullable: true
      type: object
    PriorityClassFieldsRules:
      properties:
        priorityClass:
          $ref: '#/components/schemas/PriorityClassRules'
      nullable: true
      type: object
    TrainingFieldsRules:
      properties:
        completions:
          $ref: '#/components/schemas/IntegerRules'
        parallelism:
          $ref: '#/components/schemas/IntegerRules'
      nullable: true
      type: object
    UidGidSourceOptions:
      properties:
        options:
          description: Limit the permitted values for uidGidSource to a given set of values.
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/UidGidSource'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    UidGidSourceRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/UidGidSourceOptions'
      nullable: true
      type: object
    SeccompProfileTypeOptions:
      properties:
        options:
          description: Limit the permitted values for secompProfileType to a given set of values.
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/SeccompProfileType'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    SeccompProfileTypeRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/SeccompProfileTypeOptions'
      nullable: true
      type: object
    CommonSecurityNonOverridableRules:
      properties:
        uidGidSource:
          $ref: '#/components/schemas/UidGidSourceRules'
        capabilities:
          $ref: '#/components/schemas/ArrayRules'
        seccompProfileType:
          $ref: '#/components/schemas/SeccompProfileTypeRules'
        runAsNonRoot:
          $ref: '#/components/schemas/BooleanRules'
        readOnlyRootFilesystem:
          $ref: '#/components/schemas/BooleanRules'
      nullable: true
      type: object
    CommonSecurityFlatFieldsRules:
      allOf:
        - $ref: '#/components/schemas/CommonSecurityNonOverridableRules'
        - $ref: '#/components/schemas/CommonSecurityOverridableRules'
      nullable: true
      type: object
    NonInferenceSecurityNonOverridableRules:
      properties:
        allowPrivilegeEscalation:
          $ref: '#/components/schemas/BooleanRules'
        hostIpc:
          $ref: '#/components/schemas/BooleanRules'
        hostNetwork:
          $ref: '#/components/schemas/BooleanRules'
      nullable: true
      type: object
    NonInferenceSecurityFlatFieldsRules:
      allOf:
        - $ref: '#/components/schemas/NonInferenceSecurityNonOverridableRules'
      nullable: true
      type: object
    SecurityFlatFieldsRules:
      allOf:
        - $ref: '#/components/schemas/CommonSecurityFlatFieldsRules'
        - $ref: '#/components/schemas/NonInferenceSecurityFlatFieldsRules'
      nullable: true
      type: object
    SecurityRules:
      properties:
        security:
          $ref: '#/components/schemas/SecurityFlatFieldsRules'
      nullable: true
      type: object
    NumberRules:
      properties:
        sourceOfRule:
          $ref: '#/components/schemas/SourceOfRule'
        required:
          description: Whether the field is mandatory. default to false.
          type: boolean
          nullable: true
        canEdit:
          description: Whether the value of the field is editable. default to true
          type: boolean
          nullable: true
        min:
          description: The minimum value that the field can be assigned to.
          type: number
          nullable: true
        max:
          description: The maximum value that the field can be assigned to.
          type: number
          nullable: true
        step:
          description: The minimal difference between two values the field can be assigned to. For example, min=2, max=3, step=0.25 implies that the values the field can hold are 2, 2.25, 2.5 and 3.
          type: number
          nullable: true
      nullable: true
      type: object
    QuantityRules:
      properties:
        sourceOfRule:
          $ref: '#/components/schemas/SourceOfRule'
        required:
          description: Whether the field is mandatory, default to false.
          type: boolean
          nullable: true
        canEdit:
          description: Whether the value of the field is editable, default to true
          type: boolean
          nullable: true
        min:
          description: The minimum value that the field can be assigned to.
          type: string
          nullable: true
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
        max:
          description: The maximum value that the field can be assigned to.
          type: string
          nullable: true
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
      nullable: true
      type: object
    GpuRequestOptions:
      properties:
        options:
          description: Limit the permitted values for gpuRequest to a given set of values.
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/GpuRequestType'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    GpuRequestRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/GpuRequestOptions'
      nullable: true
      type: object
    MigProfileOptions:
      properties:
        options:
          description: Limit the permitted values for migProfile to a given set of values.
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/MigProfile'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
      deprecated: true
    MigProfileRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/MigProfileOptions'
      nullable: true
      type: object
    ComputeFlatFieldsRules:
      properties:
        cpuCoreRequest:
          $ref: '#/components/schemas/NumberRules'
        cpuCoreLimit:
          $ref: '#/components/schemas/NumberRules'
        cpuMemoryRequest:
          $ref: '#/components/schemas/QuantityRules'
        cpuMemoryLimit:
          $ref: '#/components/schemas/QuantityRules'
        largeShmRequest:
          $ref: '#/components/schemas/BooleanRules'
        gpuRequestType:
          $ref: '#/components/schemas/GpuRequestRules'
        migProfile:
          $ref: '#/components/schemas/MigProfileRules'
          deprecated: true
        gpuDevicesRequest:
          $ref: '#/components/schemas/IntegerRules'
        gpuPortionRequest:
          $ref: '#/components/schemas/NumberRules'
        gpuPortionLimit:
          $ref: '#/components/schemas/NumberRules'
        gpuMemoryRequest:
          $ref: '#/components/schemas/QuantityRules'
        gpuMemoryLimit:
          $ref: '#/components/schemas/QuantityRules'
      nullable: true
      type: object
    ExtendedResourceRules:
      description: Rules for the attributes of extendedResources
      properties:
        quantity:
          $ref: '#/components/schemas/StringRules'
      nullable: true
      type: object
    ExtendedResourcesRules:
      properties:
        attributes:
          $ref: '#/components/schemas/ExtendedResourceRules'
        instances:
          $ref: '#/components/schemas/ItemRules'
      nullable: true
      type: object
    ComputeItemizedFieldsRules:
      properties:
        extendedResources:
          $ref: '#/components/schemas/ExtendedResourcesRules'
      nullable: true
      type: object
    ComputeFieldsRules:
      allOf:
        - $ref: '#/components/schemas/ComputeFlatFieldsRules'
        - $ref: '#/components/schemas/ComputeItemizedFieldsRules'
      nullable: true
      type: object
    ComputeRules:
      properties:
        compute:
          $ref: '#/components/schemas/ComputeFieldsRules'
      nullable: true
      type: object
    StorageRules:
      properties:
        storage:
          $ref: '#/components/schemas/StorageFieldsRules'
      nullable: true
      type: object
    ContainerNonInferenceNonOverridableRules:
      properties:
        tty:
          $ref: '#/components/schemas/BooleanRules'
        stdin:
          $ref: '#/components/schemas/BooleanRules'
      nullable: true
      type: object
    NonInferenceFlatFieldsRules:
      allOf:
        - $ref: '#/components/schemas/ContainerNonInferenceNonOverridableRules'
      nullable: true
      type: object
    TrainingPolicyRulesV2:
      allOf:
        - $ref: '#/components/schemas/CommonFlatFieldsRules'
        - $ref: '#/components/schemas/CommonItemizedFieldsRules'
        - $ref: '#/components/schemas/AdvancedFlatFieldsRules'
        - $ref: '#/components/schemas/ConnectivityRules'
        - $ref: '#/components/schemas/PriorityClassFieldsRules'
        - $ref: '#/components/schemas/TrainingFieldsRules'
        - $ref: '#/components/schemas/SecurityRules'
        - $ref: '#/components/schemas/ComputeRules'
        - $ref: '#/components/schemas/StorageRules'
        - $ref: '#/components/schemas/NonInferenceFlatFieldsRules'
    ImposedAssets:
      description: a list of datasource assets to import into the policy. these datasources will be included in any workload that will be created in the scope of the policy.
      type: array
      items:
        type: string
        format: uuid
      nullable: true
    TrainingPolicyDefaultsAndRulesV2:
      properties:
        defaults:
          allOf:
            - $ref: '#/components/schemas/CommonFlatFields'
            - $ref: '#/components/schemas/CommonItemizedDefaults'
            - $ref: '#/components/schemas/AdvancedFlatFields'
            - $ref: '#/components/schemas/ConnectivityDefaults'
            - $ref: '#/components/schemas/PriorityClassFields'
            - $ref: '#/components/schemas/TrainingFields'
            - $ref: '#/components/schemas/Security'
            - $ref: '#/components/schemas/ComputeDefaults'
            - $ref: '#/components/schemas/StorageDefaults'
            - $ref: '#/components/schemas/NonInferenceFlatFields'
          nullable: true
          type: object
        rules:
          allOf:
            - $ref: '#/components/schemas/TrainingPolicyRulesV2'
          nullable: true
          type: object
        imposedAssets:
          $ref: '#/components/schemas/ImposedAssets'
      nullable: true
      type: object
    Timestamp:
      description: The time at which an event occurred. e.g. the time an effective policy has been updated
      type: string
      minLength: 1
      format: date-time
    TrainingPolicyV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyMeta'
        policy:
          $ref: '#/components/schemas/TrainingPolicyDefaultsAndRulesV2'
        effective:
          $ref: '#/components/schemas/TrainingPolicyDefaultsAndRulesV2'
        effectiveUpdatedAt:
          $ref: '#/components/schemas/Timestamp'
      nullable: true
      type: object
    TrainingPolicyOverwriteRequestV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyCreationFields'
        policy:
          $ref: '#/components/schemas/TrainingPolicyDefaultsAndRulesV2'
      type: object
    FieldsToReset:
      description: set of fields in jsonpath format that is requested to clear their policy (default and rules)
      type: array
      items:
        type: string
      example:
        - master.security.runAsGpu
        - worker.compute.gpu
    TrainingPolicyChangeRequestV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyCreationFields'
        policy:
          $ref: '#/components/schemas/TrainingPolicyDefaultsAndRulesV2'
        reset:
          $ref: '#/components/schemas/FieldsToReset'
      type: object
    DistributedFields:
      properties:
        numWorkers:
          description: the number of workers that will be allocated for running the workload.
          type: integer
          minimum: 1
          nullable: true
        distributedFramework:
          $ref: '#/components/schemas/DistributedFramework'
        slotsPerWorker:
          description: Specifies the number of slots per worker used in hostfile. Defaults to 1. (applicable only for MPI)
          type: integer
          minimum: 1
          nullable: true
          default: 1
        minReplicas:
          description: the lower limit for the number of worker pods to which the training job can scale down. (applicable only for PyTorch)
          type: integer
          nullable: true
        maxReplicas:
          description: the upper limit for the number of worker pods that can be set by the autoscaler. Cannot be smaller than MinReplicas. (applicable only for PyTorch)
          type: integer
          nullable: true
      nullable: true
      type: object
    ServingPortProtocol:
      description: The protocol used by the port, defaults to http
      type: string
      enum:
        - http
        - grpc
      nullable: true
    ServingPort:
      description: A port for accessing the inference service
      properties:
        container:
          description: The port that the container running the inference service exposes (mandatory).
          type: integer
          format: int32
          minimum: 1
          maximum: 65535
          example: 8080
          nullable: true
        protocol:
          $ref: '#/components/schemas/ServingPortProtocol'
        authorizationType:
          type: string
          enum:
            - public
            - authenticatedUsers
            - authorizedUsersOrGroups
          description: The authorization type for serving port URL access. Defaults to public, which means no authorization is required. If set to authenticatedUsers, only authenticated Run:ai users are allowed to access the URL. If set to authorizedUsersOrGroups, only users or groups specified in authorizedUsers or authorizedGroups are allowed to access the URL. Supported from cluster version 2.19.
          nullable: true
        authorizedUsers:
          description: List of users that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
          type: array
          items:
            type: string
          example:
            - user.a@example.com
            - user.b@example.com
          nullable: true
        authorizedGroups:
          description: List of groups that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
          type: array
          items:
            type: string
          example:
            - group-a
            - group-b
          nullable: true
        clusterLocalAccessOnly:
          description: Configure the serving port URL to be available only on the cluster-local network, and not externally. Defaults to false
          type: boolean
          nullable: true
      nullable: true
      type: object
    AutoScalingMetricFields:
      description: Auto scaling metric fields
      properties:
        metric:
          $ref: '#/components/schemas/AutoScalingMetric'
        metricThreshold:
          description: The threshold to use with the specified metric for autoscaling. Mandatory if metric is specified
          type: integer
          format: int32
          nullable: true
      nullable: true
      type: object
    AutoScaling:
      allOf:
        - $ref: '#/components/schemas/AutoScalingCommonFields'
        - $ref: '#/components/schemas/AutoScalingMetricFields'
      nullable: true
      type: object
    InferenceFields:
      properties:
        servingPort:
          $ref: '#/components/schemas/ServingPort'
        autoscaling:
          $ref: '#/components/schemas/AutoScaling'
      nullable: true
      type: object
    InferenceFlatFields:
      allOf:
        - $ref: '#/components/schemas/CommonFlatFields'
      nullable: true
      type: object
    SupersetDefaults:
      allOf:
        - $ref: '#/components/schemas/CommonFlatFields'
        - $ref: '#/components/schemas/NonInferenceFlatFields'
        - $ref: '#/components/schemas/CommonItemizedDefaults'
        - $ref: '#/components/schemas/AdvancedFlatFields'
        - $ref: '#/components/schemas/ConnectivityDefaults'
        - $ref: '#/components/schemas/PriorityClassFields'
        - $ref: '#/components/schemas/TrainingFields'
        - $ref: '#/components/schemas/DistributedFields'
        - $ref: '#/components/schemas/InferenceFields'
        - $ref: '#/components/schemas/InferenceFlatFields'
        - $ref: '#/components/schemas/Security'
        - $ref: '#/components/schemas/ComputeDefaults'
        - $ref: '#/components/schemas/StorageDefaults'
    DistributedFrameworkOptions:
      properties:
        options:
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/DistributedFramework'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    DistributedFrameworkRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/DistributedFrameworkOptions'
      nullable: true
      type: object
    DistributedFieldsRules:
      properties:
        numWorkers:
          $ref: '#/components/schemas/IntegerRules'
        distributedFramework:
          $ref: '#/components/schemas/DistributedFrameworkRules'
        slotsPerWorker:
          $ref: '#/components/schemas/IntegerRules'
        minReplicas:
          $ref: '#/components/schemas/IntegerRules'
        maxReplicas:
          $ref: '#/components/schemas/IntegerRules'
      nullable: true
      type: object
    ServingPortProtocolOptions:
      properties:
        options:
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/ServingPortProtocol'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    ServingPortProtocolRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/ServingPortProtocolOptions'
      nullable: true
      type: object
    ServingPortRules:
      properties:
        container:
          $ref: '#/components/schemas/IntegerRules'
        protocol:
          $ref: '#/components/schemas/ServingPortProtocolRules'
      nullable: true
      type: object
    AutoScalingMetricOptions:
      properties:
        options:
          type: array
          items:
            required:
              - value
            properties:
              value:
                $ref: '#/components/schemas/AutoScalingMetric'
              displayed:
                description: Textual description of the value
                type: string
                nullable: true
          nullable: true
      nullable: true
      type: object
    AutoScalingMetricRules:
      allOf:
        - $ref: '#/components/schemas/StringRulesCommon'
        - $ref: '#/components/schemas/AutoScalingMetricOptions'
      nullable: true
      type: object
    AutoScalingRules:
      properties:
        minReplicas:
          $ref: '#/components/schemas/IntegerRules'
        maxReplicas:
          $ref: '#/components/schemas/IntegerRules'
        metric:
          $ref: '#/components/schemas/AutoScalingMetricRules'
        metricThreshold:
          $ref: '#/components/schemas/IntegerRules'
        scaleToZeroRetentionSeconds:
          $ref: '#/components/schemas/IntegerRules'
      nullable: true
      type: object
    InferenceFieldsRules:
      properties:
        servingPort:
          $ref: '#/components/schemas/ServingPortRules'
        autoscaling:
          $ref: '#/components/schemas/AutoScalingRules'
      nullable: true
      type: object
    InferenceFlatFieldsRules:
      allOf:
        - $ref: '#/components/schemas/ContainerNonOverridableRules'
      nullable: true
      type: object
    SupersetRules:
      allOf:
        - $ref: '#/components/schemas/CommonFlatFieldsRules'
        - $ref: '#/components/schemas/NonInferenceFlatFieldsRules'
        - $ref: '#/components/schemas/CommonItemizedFieldsRules'
        - $ref: '#/components/schemas/AdvancedFlatFieldsRules'
        - $ref: '#/components/schemas/ConnectivityRules'
        - $ref: '#/components/schemas/PriorityClassFieldsRules'
        - $ref: '#/components/schemas/TrainingFieldsRules'
        - $ref: '#/components/schemas/DistributedFieldsRules'
        - $ref: '#/components/schemas/InferenceFieldsRules'
        - $ref: '#/components/schemas/InferenceFlatFieldsRules'
        - $ref: '#/components/schemas/SecurityRules'
        - $ref: '#/components/schemas/ComputeRules'
        - $ref: '#/components/schemas/StorageRules'
    ReplicaDefaultsV2:
      allOf:
        - $ref: '#/components/schemas/CommonFlatFields'
        - $ref: '#/components/schemas/CommonItemizedDefaults'
        - $ref: '#/components/schemas/AdvancedFlatFields'
        - $ref: '#/components/schemas/ConnectivityDefaults'
        - $ref: '#/components/schemas/Security'
        - $ref: '#/components/schemas/ComputeDefaults'
        - $ref: '#/components/schemas/StorageDefaults'
        - $ref: '#/components/schemas/NonInferenceFlatFields'
      nullable: true
      type: object
    DistributedPolicyDefaultsV2:
      properties:
        worker:
          allOf:
            - $ref: '#/components/schemas/ReplicaDefaultsV2'
            - $ref: '#/components/schemas/DistributedFields'
          nullable: true
          type: object
        master:
          $ref: '#/components/schemas/ReplicaDefaultsV2'
      nullable: true
      type: object
    ReplicaRulesV2:
      allOf:
        - $ref: '#/components/schemas/CommonFlatFieldsRules'
        - $ref: '#/components/schemas/CommonItemizedFieldsRules'
        - $ref: '#/components/schemas/AdvancedFlatFieldsRules'
        - $ref: '#/components/schemas/ConnectivityRules'
        - $ref: '#/components/schemas/SecurityRules'
        - $ref: '#/components/schemas/ComputeRules'
        - $ref: '#/components/schemas/StorageRules'
        - $ref: '#/components/schemas/NonInferenceFlatFieldsRules'
      nullable: true
      type: object
    DistributedPolicyRulesV2:
      properties:
        worker:
          allOf:
            - $ref: '#/components/schemas/ReplicaRulesV2'
            - $ref: '#/components/schemas/DistributedFieldsRules'
          nullable: true
          type: object
        master:
          $ref: '#/components/schemas/ReplicaRulesV2'
      nullable: true
      type: object
    DistributedImposedAssets:
      properties:
        worker:
          $ref: '#/components/schemas/ImposedAssets'
        master:
          $ref: '#/components/schemas/ImposedAssets'
      nullable: true
      type: object
    DistributedPolicyDefaultsAndRulesV2:
      properties:
        defaults:
          $ref: '#/components/schemas/DistributedPolicyDefaultsV2'
        rules:
          $ref: '#/components/schemas/DistributedPolicyRulesV2'
        imposedAssets:
          $ref: '#/components/schemas/DistributedImposedAssets'
      nullable: true
      type: object
    WorkspacePolicyRulesV2:
      allOf:
        - $ref: '#/components/schemas/CommonFlatFieldsRules'
        - $ref: '#/components/schemas/CommonItemizedFieldsRules'
        - $ref: '#/components/schemas/AdvancedFlatFieldsRules'
        - $ref: '#/components/schemas/ConnectivityRules'
        - $ref: '#/components/schemas/PriorityClassFieldsRules'
        - $ref: '#/components/schemas/SecurityRules'
        - $ref: '#/components/schemas/ComputeRules'
        - $ref: '#/components/schemas/StorageRules'
        - $ref: '#/components/schemas/NonInferenceFlatFieldsRules'
    WorkspacePolicyDefaultsAndRulesV2:
      properties:
        defaults:
          allOf:
            - $ref: '#/components/schemas/CommonFlatFields'
            - $ref: '#/components/schemas/CommonItemizedDefaults'
            - $ref: '#/components/schemas/AdvancedFlatFields'
            - $ref: '#/components/schemas/ConnectivityDefaults'
            - $ref: '#/components/schemas/PriorityClassFields'
            - $ref: '#/components/schemas/Security'
            - $ref: '#/components/schemas/ComputeDefaults'
            - $ref: '#/components/schemas/StorageDefaults'
            - $ref: '#/components/schemas/NonInferenceFlatFields'
          nullable: true
          type: object
        rules:
          allOf:
            - $ref: '#/components/schemas/WorkspacePolicyRulesV2'
          nullable: true
          type: object
        imposedAssets:
          $ref: '#/components/schemas/ImposedAssets'
      nullable: true
      type: object
    WorkspacePolicyV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyMeta'
        policy:
          $ref: '#/components/schemas/WorkspacePolicyDefaultsAndRulesV2'
        effective:
          $ref: '#/components/schemas/WorkspacePolicyDefaultsAndRulesV2'
        effectiveUpdatedAt:
          $ref: '#/components/schemas/Timestamp'
      nullable: true
      type: object
    WorkspacePolicyOverwriteRequestV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyCreationFields'
        policy:
          $ref: '#/components/schemas/WorkspacePolicyDefaultsAndRulesV2'
      type: object
    WorkspacePolicyChangeRequestV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyCreationFields'
        policy:
          $ref: '#/components/schemas/WorkspacePolicyDefaultsAndRulesV2'
        reset:
          $ref: '#/components/schemas/FieldsToReset'
      type: object
    DistributedPolicyV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyMeta'
        policy:
          $ref: '#/components/schemas/DistributedPolicyDefaultsAndRulesV2'
        effective:
          $ref: '#/components/schemas/DistributedPolicyDefaultsAndRulesV2'
        effectiveUpdatedAt:
          $ref: '#/components/schemas/Timestamp'
      nullable: true
      type: object
    DistributedPolicyOverwriteRequestV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyCreationFields'
        policy:
          $ref: '#/components/schemas/DistributedPolicyDefaultsAndRulesV2'
      type: object
    DistributedPolicyChangeRequestV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyCreationFields'
        policy:
          $ref: '#/components/schemas/DistributedPolicyDefaultsAndRulesV2'
        reset:
          $ref: '#/components/schemas/FieldsToReset'
      type: object
    CommonStorageDefaults:
      properties:
        storage:
          $ref: '#/components/schemas/CommonStorageFieldsDefaults'
      nullable: true
      type: object
    CommonSecurity:
      properties:
        security:
          $ref: '#/components/schemas/CommonSecurityFlatFields'
      nullable: true
      type: object
    InferenceSecurityRules:
      properties:
        security:
          $ref: '#/components/schemas/CommonSecurityFlatFieldsRules'
      nullable: true
      type: object
    CommonStorageRules:
      properties:
        storage:
          $ref: '#/components/schemas/CommonStorageFieldsRules'
      nullable: true
      type: object
    InferencePolicyRulesV2:
      allOf:
        - $ref: '#/components/schemas/CommonFlatFieldsRules'
        - $ref: '#/components/schemas/CommonItemizedFieldsRules'
        - $ref: '#/components/schemas/ConnectivityRules'
        - $ref: '#/components/schemas/ComputeRules'
        - $ref: '#/components/schemas/InferenceSecurityRules'
        - $ref: '#/components/schemas/CommonStorageRules'
        - $ref: '#/components/schemas/InferenceFieldsRules'
    InferencePolicyDefaultsAndRulesV2:
      properties:
        defaults:
          allOf:
            - $ref: '#/components/schemas/CommonFlatFields'
            - $ref: '#/components/schemas/CommonItemizedDefaults'
            - $ref: '#/components/schemas/ConnectivityDefaults'
            - $ref: '#/components/schemas/ComputeDefaults'
            - $ref: '#/components/schemas/CommonStorageDefaults'
            - $ref: '#/components/schemas/CommonSecurity'
            - $ref: '#/components/schemas/InferenceFields'
          nullable: true
          type: object
        rules:
          allOf:
            - $ref: '#/components/schemas/InferencePolicyRulesV2'
          nullable: true
          type: object
        imposedAssets:
          $ref: '#/components/schemas/ImposedAssets'
      nullable: true
      type: object
    InferencePolicyV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyMeta'
        policy:
          $ref: '#/components/schemas/InferencePolicyDefaultsAndRulesV2'
        effective:
          $ref: '#/components/schemas/InferencePolicyDefaultsAndRulesV2'
        effectiveUpdatedAt:
          $ref: '#/components/schemas/Timestamp'
      nullable: true
      type: object
    InferencePolicyOverwriteRequestV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyCreationFields'
        policy:
          $ref: '#/components/schemas/InferencePolicyDefaultsAndRulesV2'
      type: object
    InferencePolicyChangeRequestV2:
      properties:
        meta:
          $ref: '#/components/schemas/PolicyCreationFields'
        policy:
          $ref: '#/components/schemas/InferencePolicyDefaultsAndRulesV2'
        reset:
          $ref: '#/components/schemas/FieldsToReset'
      type: object
    V1Error:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          minimum: 100
          maximum: 599
        message:
          type: string
        details:
          type: string
      example:
        code: 400
        message: Bad request - Resource should have a name
    StorageClass1:
      type: object
      required:
        - storage_class_name
      properties:
        cluster_id:
          type: string
          format: uuid
          description: Cluster ID which has sent the resource info
          example: null
        storage_class_name:
          type: string
          description: Storage class name
          example: my storage class
        Spec:
          type: object
          required:
            - is_default
          properties:
            provisioner:
              type: string
              description: The provisioner type (unique name)
              example: kubernetes.io/aws-ebs
            allow_volume_expansion:
              type: boolean
              description: Indicates whether the storage class allows volume expansion
              example: true
            is_default:
              type: boolean
              description: Indicates whether the storage class is the default one
              example: false
    StorageClasses1:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/StorageClass1'
    ProjectCreateRequest:
      required:
        - name
        - departmentId
      allOf:
        - properties:
            name:
              type: string
              description: Project Name
              example: team-a
            departmentId:
              type: integer
              format: int32
              description: ID of the department that owns the project.
              example: 2
            nodePoolsResources:
              type: array
              items:
                $ref: '#/components/schemas/NodePoolAssignedResourcesCreate'
              description: Resources assigned to this Project per Node Pool.
            namespace:
              type: string
              description: The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher.
              example: ns-proj1
        - $ref: '#/components/schemas/ProjectCommonFields'
    ProjectUpdateRequest1:
      allOf:
        - properties:
            nodePoolsResources:
              type: array
              items:
                $ref: '#/components/schemas/NodePoolAssignedResources'
              description: Resources assigned to this Project per Node Pool.
        - $ref: '#/components/schemas/ProjectCommonFields'
    ProjectCommonFields:
      properties:
        deservedGpus:
          type: number
          description: Deprecated. Use 'deserved' for the relevant resource type under `NodePoolResources`. The project's deserved GPU allocation in case the cluster has those resources.
          example: 3
          deprecated: true
        maxAllowedGpus:
          type: number
          description: Deprecated. Instead, use `maxAllowed` for the relevant resource type under `NodePoolResources`. An upper limit for the amount of GPUs the project can get (Even if over quota is allowed and resources are available).
          example: 5
          deprecated: true
        gpuOverQuotaWeight:
          type: number
          description: Deprecated. Instead, use `overQuotaWeight` for the relevant resource type under `NodePoolResources`. The priority the project gets for over quota resources.
          maximum: 3
          minimum: 0
          example: 1
          deprecated: true
        defaultNodePools:
          type: array
          description: Default node pools list for workload submission for this project if a workload doesn't specify a node pools list.
          items:
            type: string
          example:
            - default
        interactiveJobTimeLimitSecs:
          type: number
          description: A limit (in seconds) for the duration of interactive jobs from this project.
          example: 3600
        interactiveJobMaxIdleDurationSecs:
          type: number
          description: Maximum duration (in seconds) that an interactive job can be idle before being terminated.
          example: 3000
        interactivePreemptibleJobMaxIdleDurationSecs:
          type: number
          description: Maximum duration (in seconds) that an interactive preemptible job can be idle before being terminated.
          example: 3000
        trainingJobTimeLimitSecs:
          type: number
          description: A limit (in seconds) for the duration of training jobs from this project. Available only from cluster version 2.12
          example: 3600
        trainingJobMaxIdleDurationSecs:
          type: number
          description: Maximum duration (in seconds) that a training job can be idle before being terminated.
          example: 3000
        nodeAffinity:
          allOf:
            - $ref: '#/components/schemas/JobsNodeAffinity'
          description: Node affinity configuration for jobs in the project.
        permissions:
          allOf:
            - $ref: '#/components/schemas/ResourcePermissions'
          description: Deprecated. Instead, use the `accessRules` API to add permissions to a specific subject in the project scope.
          deprecated: true
        resources:
          allOf:
            - $ref: '#/components/schemas/AssignedResources'
          deprecated: true
          description: Deprecated. Instead, use `nodePoolsResources`. Total resources assigned to the Project. Can only be used in PUT/POST when there is a single Node Pool in the system. The resources returned in `GET` are the sum of all Node Pool Resources.
    Project2:
      allOf:
        - properties:
            name:
              type: string
              description: Project name.
              example: team-a
            nodePoolsResources:
              type: array
              items:
                $ref: '#/components/schemas/NodePoolAssignedResources'
              description: Resources assigned to this Project per Node Pool.
            namespace:
              type: string
              description: The name of an existing namespace to use for the project in the cluster. Supported only for cluster versions 2.12 or higher.
              example: ns-proj1
            id:
              type: integer
              format: int32
              description: Project id.
              readOnly: true
              example: 5
            departmentId:
              type: integer
              format: int32
              description: ID of the department that owns the project.
              example: 2
            tenantId:
              type: integer
              format: int32
              description: ID of the tenant where the project is located.
              example: 2
            clusterUuid:
              type: string
              format: uuid
              description: ID of the cluster where the project is located.
              example: 71f69d83-ba66-4822-adf5-55ce55efd210
            departmentName:
              type: string
              description: Name of the department where the project is located.
              example: department-a
            interactiveNodeAffinity:
              type: string
              example: none
            trainNodeAffinity:
              type: string
              example: none
            createdAt:
              type: string
              description: Creation date of the project.
              format: date-time
              example: '2021-12-14T16:04:15.099Z'
            status:
              $ref: '#/components/schemas/ProjectStatus1'
            phase:
              type: string
              description: project's phase
              example: Ready
        - $ref: '#/components/schemas/ProjectCommonFields'
    ResourcePermissions:
      properties:
        users:
          type: array
          items:
            type: string
          description: Names of users that have permissions to the project.
        groups:
          type: array
          items:
            type: string
          description: Names of groups that have permissions to the project.
        applications:
          type: array
          items:
            type: string
          description: Names of applications that have permissions to the project.
    JobsNodeAffinity:
      properties:
        train:
          allOf:
            - $ref: '#/components/schemas/NodeAffinity'
          description: Node affinity configuration for training jobs.
        interactive:
          allOf:
            - $ref: '#/components/schemas/NodeAffinity'
          description: Node affinity configuration for interactive jobs.
    NodeAffinity:
      properties:
        affinityType:
          type: string
          enum:
            - no_limit
            - only_selected
          description: The type of affinity of the jobs on the nodes.
        selectedTypes:
          type: array
          items:
            $ref: '#/components/schemas/NodeTypeForProject'
    NodeTypeForProject:
      properties:
        id:
          type: number
        name:
          type: string
    AssignedResources:
      properties:
        id:
          type: number
        gpu:
          allOf:
            - $ref: '#/components/schemas/Resource1'
          description: GPU number assigned
        cpu:
          allOf:
            - $ref: '#/components/schemas/Resource1'
          description: CPU Millicores assigned. Supported only if 'CPU Resources Quota' feature flag is enabled.
        memory:
          allOf:
            - $ref: '#/components/schemas/Resource1'
          description: CPU Memory Mib assigned. Supported only if 'CPU Resources Quota' feature flag is enabled.
    NodePoolAssignedResources:
      required:
        - id
      allOf:
        - properties:
            id:
              description: The id of the assigned resources. Required in PUT when updating the assigned resources.
              type: number
        - $ref: '#/components/schemas/NodePoolAssignedResourcesCreate'
    NodePoolAssignedResourcesCreate:
      required:
        - nodePool
      properties:
        nodePool:
          allOf:
            - $ref: '#/components/schemas/NodePoolResources'
          description: The node pool which the assigned resources refer to.
        gpu:
          allOf:
            - $ref: '#/components/schemas/Resource1'
          description: Number of GPUs assigned in the node pool.
        cpu:
          allOf:
            - $ref: '#/components/schemas/Resource1'
          description: Number of CPU Millicores assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled.
        memory:
          allOf:
            - $ref: '#/components/schemas/Resource1'
          description: Amount of CPU Memory Mib assigned in the node pool. Supported only if the 'CPU Resources Quota' feature flag is enabled.
    Resource1:
      properties:
        deserved:
          type: number
          description: The amount of resources guaranteed to be allocated in case the cluster has those resources.
          example: 0
        maxAllowed:
          type: number
          description: Maximum amount of resources that can be allocated. If equal to deserved, no over-quota will be allowed. Use "-1" for unlimited over quota.
          example: 1000
        overQuotaWeight:
          type: number
          description: The priority for over quota resources.
          example: 2
    NodePoolResources:
      required:
        - id
      properties:
        id:
          type: number
          description: Node pool id.
          example: 3
        name:
          type: string
          description: Node pool name.
          example: default
    ProjectStatus1:
      properties:
        namespace:
          type: string
          description: The namespace of the project
          example: runai-team-a
        message:
          type: string
          description: Detailed phase message
          example: NamespaceHandlerFailed
        quotaStatuses:
          $ref: '#/components/schemas/NodePoolsQuotaStatuses'
    NodePoolsQuotaStatuses:
      type: array
      items:
        $ref: '#/components/schemas/NodePoolQuotaStatus'
      description: The current quota status for each node pool. Supported only for cluster versions 2.15+ or higher.
    NodePoolQuotaStatus:
      properties:
        nodePoolName:
          type: string
          description: The node pool name which the current quota status refers to.
        allocated:
          $ref: '#/components/schemas/QuotaStatusResourceList'
        allocatedNonPreemptible:
          $ref: '#/components/schemas/QuotaStatusResourceList'
        requested:
          $ref: '#/components/schemas/QuotaStatusResourceList'
    QuotaStatusResourceList:
      properties:
        gpu:
          type: number
          description: The number of GPUs (allocated/requested/...).
          example: 0
        cpu:
          type: number
          description: CPU in Millicores (allocated/requested/...).
          example: 1000
        memory:
          type: number
          description: Memory in Mib (allocated/requested/...).
          example: 1000
    DepartmentCreateRequest:
      required:
        - name
      allOf:
        - properties:
            nodePoolsResources:
              type: array
              items:
                $ref: '#/components/schemas/NodePoolAssignedResourcesCreate'
              description: Resources assigned to this Department per Node Pool
        - $ref: '#/components/schemas/DepartmentCommonFields'
    DepartmentUpdateRequest1:
      required:
        - name
      allOf:
        - properties:
            nodePoolsResources:
              type: array
              items:
                $ref: '#/components/schemas/NodePoolAssignedResources'
              description: Resources assigned to this Department per Node Pool
        - $ref: '#/components/schemas/DepartmentCommonFields'
    DepartmentCommonFields:
      properties:
        name:
          type: string
          description: The name of the department.
          example: default
        deservedGpus:
          type: number
          description: Deprecated. Instead, use `deserved` for the relevant resource type under `NodePoolResources`. Deserved GPUs for the department.
          example: 2
          deprecated: true
        allowOverQuota:
          type: boolean
          description: Deprecated. Instead, use `maxAllowed` for the relevant resource type under `NodePoolResources`. Is over quota allowed for the department.
          example: false
          deprecated: true
        maxAllowedGpus:
          type: number
          description: Deprecated. Instead, use `maxAllowed` for the relevant resource type under `NodePoolResources`. Max allowed GPUs for the department.
          example: 2
          deprecated: true
        resources:
          allOf:
            - $ref: '#/components/schemas/AssignedResources'
          deprecated: true
          description: Deprecated. Instead, use 'nodePoolsResources'. Total resources assigned to the Department. Can only be used in PUT/POST when there is a single Node Pool in the system. The resources returned in GET are the sum of all Node Pool Resources.
    DepartmentAccessControl:
      properties:
        departmentId:
          type: integer
          format: int32
          description: The unique id identifying the department.
          example: 2
        departmentAdmins:
          type: array
          items:
            type: string
          description: Id's of users with department admin role that are assigned to managed the department
    Department2:
      allOf:
        - properties:
            nodePoolsResources:
              type: array
              items:
                $ref: '#/components/schemas/NodePoolAssignedResources'
              description: Resources assigned to the Department per node pool.
            tenantId:
              type: integer
              description: The tenant id this cluster belongs to.
              example: 42
            clusterUuid:
              type: string
              description: The cluster UUID this department belongs to.
              example: UUID
            createdAt:
              type: string
              description: The creation date of the department.
              format: date-time
              example: '2021-12-14T16:04:15.099Z'
            id:
              type: integer
              format: int32
              description: The unique id identifying the department.
              example: 2
            projects:
              type: array
              items:
                $ref: '#/components/schemas/Project2'
              description: Projects under this department.
              example:
                - id: 16
                  name: team-a
                  deserved_gpus: 3
            projectsDeservedGpus:
              type: string
              description: Deprecated. Instead, use 'nodePoolsResources' field. Total deserved GPUs of the projects under this department - as string.
              example: '3.00'
              deprecated: true
            departmentAdmins:
              type: array
              items:
                type: string
              description: Id's of users with department admin role that are assigned to managed the department
        - $ref: '#/components/schemas/DepartmentCommonFields'
    ResourceType:
      type: string
      enum:
        - department
        - tenant
        - project
        - cluster
        - cluster-config
        - internal-cluster-config
        - nodepools
        - nodes
        - settings
        - users
        - groups
        - apps
        - dashboards-overview
        - dashboards-analytics
        - dashboards-consumption
        - roles
        - access_rules
        - jobs
        - workloads
        - workspaces
        - trainings
        - inferences
        - environments
        - pvc-assets
        - git-assets
        - host-path-assets
        - nfs-assets
        - s3-assets
        - compute-resources
        - templates
        - credentials
        - events-history
        - policies
        - cm-volume-assets
        - datavolumes
        - datavolumes/sharedscopes
        - secret-volume-assets
    ResourceTypeGroupId:
      type: string
      enum:
        - organization
        - physical-resource
        - iam
        - dashboard
        - workload
        - workload-asset
    Action:
      type: string
      enum:
        - create
        - read
        - update
        - delete
        - sync
    Permission:
      type: object
      required:
        - resourceType
        - actions
        - groupId
        - displayName
      properties:
        resourceType:
          $ref: '#/components/schemas/ResourceType'
        displayName:
          type: string
          example: Projects
        groupId:
          $ref: '#/components/schemas/ResourceTypeGroupId'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/Action'
    Permissions:
      type: array
      items:
        $ref: '#/components/schemas/Permission'
      x-schema-name: Permissions
    RoleCreationFields:
      type: object
      description: May contain additional creation fields that are not updatable
      required:
        - name
        - description
        - permissions
      properties:
        name:
          type: string
          example: admin
        description:
          type: string
          example: can manage all resources
        permissions:
          $ref: '#/components/schemas/Permissions'
    MetadataFields:
      type: object
      required:
        - id
        - createdAt
        - updatedAt
        - createdBy
      properties:
        id:
          type: integer
          format: int32
          example: 32
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          nullable: true
          format: date-time
        tenantId:
          $ref: '#/components/schemas/TenantId'
        createdBy:
          type: string
          example: user@run.ai
    Role1:
      allOf:
        - $ref: '#/components/schemas/RoleCreationFields'
        - $ref: '#/components/schemas/MetadataFields'
    Roles:
      type: array
      items:
        $ref: '#/components/schemas/Role1'
      x-schema-name: Roles
    AccessRulesSortFilterFields:
      type: string
      enum:
        - subjectId
        - subjectType
        - roleId
        - scopeId
        - scopeType
        - roleName
        - scopeName
        - createdAt
        - deletedAt
        - createdBy
    SubjectType:
      type: string
      enum:
        - user
        - app
        - group
    AccessRuleCreationFields:
      type: object
      required:
        - subjectId
        - subjectType
        - roleId
        - scopeId
        - scopeType
      properties:
        subjectId:
          type: string
          example: user@run.ai
        subjectType:
          $ref: '#/components/schemas/SubjectType'
        roleId:
          type: integer
          format: int32
          example: 53142648
        scopeId:
          type: string
          example: a418ed33-9399-48c0-a890-122cadd13bfd
        scopeType:
          $ref: '#/components/schemas/ScopeType'
        clusterId:
          $ref: '#/components/schemas/ClusterId'
    EnrichmentDataFields:
      type: object
      required:
        - roleName
        - scopeName
      properties:
        roleName:
          type: string
          example: admin
        scopeName:
          type: string
          example: tenant-x
    AccessRule:
      allOf:
        - $ref: '#/components/schemas/AccessRuleCreationFields'
        - $ref: '#/components/schemas/EnrichmentDataFields'
        - $ref: '#/components/schemas/MetadataFields'
        - required:
            - tenantId
    AccessRules:
      type: array
      items:
        $ref: '#/components/schemas/AccessRule'
      x-schema-name: AccessRules
    AccessRuleById:
      allOf:
        - $ref: '#/components/schemas/AccessRule'
        - properties:
            scopePath:
              type: string
              nullable: true
              example: runai/production-cluster/dep-42/prj-73
    AccessRuleStatusRequest:
      type: object
      required:
        - phase
        - message
      properties:
        phase:
          type: string
          enum:
            - Ready
            - NotReady
          description: Phase of Access Rule in the cluster
          example: Ready
        message:
          type: string
          description: Message for status of Access Rule in the cluster
          example: Failed to enforce department 'department-a'
    AccessRuleForSync:
      allOf:
        - $ref: '#/components/schemas/AccessRuleStatusRequest'
        - type: object
          required:
            - accessRuleId
          properties:
            accessRuleId:
              type: integer
              format: int32
              minimum: 0
              description: The id of the access rule to retrieve
              example: 32
    PermittedScopes:
      type: object
      properties:
        system:
          type: boolean
          example: false
        tenants:
          type: array
          items:
            type: string
            example: '1'
        tenant:
          deprecated: true
          type: string
          example: '1'
        clusters:
          type: array
          items:
            type: string
            example: a418ed33-9399-48c0-a890-122cadd13bfd
        departments:
          type: array
          items:
            type: string
            example: '7'
        projects:
          type: array
          items:
            type: string
    PermittedScopesActions:
      type: object
      required:
        - create
        - read
        - update
        - delete
      properties:
        create:
          $ref: '#/components/schemas/PermittedScopes'
        read:
          $ref: '#/components/schemas/PermittedScopes'
        update:
          $ref: '#/components/schemas/PermittedScopes'
        delete:
          $ref: '#/components/schemas/PermittedScopes'
    AccessRulesFilterFields:
      $ref: '#/components/schemas/AccessRulesSortFilterFields'
    IdpResources:
      type: object
      properties:
        resourceName:
          type: string
        resource:
          type: string
        type:
          enum:
            - url
            - file
    UsersFilterSortFields:
      type: string
      enum:
        - username
        - createdBy
        - lastLogin
        - creationTime
        - lastUpdated
        - type
    User2:
      type: object
      required:
        - id
        - username
        - createdBy
        - createdAt
        - updatedAt
        - lastLogin
        - isLocal
      properties:
        id:
          type: string
        username:
          type: string
        createdBy:
          type: string
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
        lastLogin:
          type: string
          format: date-time
          nullable: true
        isLocal:
          type: boolean
          nullable: true
        groups:
          type: array
          items:
            type: string
          nullable: true
      example:
        id: 3434c-12323ab-4ce2ea6-b44fc-db344d
        username: test@run.ai
        createdBy: devops@run.ai
        createdAt: '2020-01-01T00:00:00Z'
        updatedAt: '2022-01-01T00:00:00Z'
        lastLogin: '2023-02-01T00:00:00Z'
        isLocal: true
        groups:
          - groupA
          - groupB
    Users1:
      type: array
      items:
        $ref: '#/components/schemas/User2'
    UserCreationRequest1:
      type: object
      required:
        - email
      properties:
        email:
          type: string
        resetPassword:
          type: boolean
          nullable: true
      example:
        email: test@run.ai
        resetPassword: false
    UserPostResponse:
      type: object
      required:
        - id
        - username
        - tempPassword
      properties:
        id:
          type: string
        username:
          type: string
        tempPassword:
          type: string
      example:
        id: 0eeaf222-e503-4f35-9d9c-c419816272e3
        username: test@run.ai
        tempPassword: asdasidjn9d
    UserChangePasswordRequest:
      type: object
      required:
        - currentPassword
        - newPassword
      properties:
        currentPassword:
          type: string
        newPassword:
          type: string
      example:
        currentPassword: Abcd!234
        newPassword: Zxcv!567
    Application:
      type: object
      required:
        - name
        - createdBy
        - createdAt
        - updatedAt
        - enabled
        - lastLogin
        - id
      properties:
        name:
          type: string
        createdBy:
          type: string
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
        enabled:
          type: boolean
        tenantId:
          type: string
        lastLogin:
          type: string
          format: date-time
          nullable: true
        id:
          type: string
      example:
        name: app123
        createdBy: test@run.ai
        createdAt: '2020-01-01T00:00:00Z'
        updatedAt: '2020-01-01T00:00:00Z'
        enabled: true
        tenantId: 1234567890
        lastLogin: '2020-01-01T00:00:00Z'
        id: 3434c-12323ab-4ce2ea6-b44fc-db344d
    Applications:
      type: array
      items:
        $ref: '#/components/schemas/Application'
    ApplicationCreationRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
      example:
        name: app123
    ApplicationPostResponse:
      type: object
      required:
        - id
        - name
        - secret
      properties:
        id:
          type: string
        name:
          type: string
        secret:
          type: string
      example:
        id: 0eeaf222-e503-4f35-9d9c-c419816272e3
        name: app123
        secret: asdasidjn9d
    ApplicationPatchRequest:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
      example:
        enabled: true
    TokenRequest:
      type: object
      properties:
        grantType:
          enum:
            - app_token
            - refresh_token
            - exchange_token
            - password
        appID:
          type: string
        appSecret:
          type: string
        code:
          type: string
        redirectUri:
          type: string
        refreshToken:
          type: string
        username:
          type: string
        password:
          type: string
        clientID:
          type: string
    TokenResponse:
      type: object
      properties:
        accessToken:
          type: string
        idToken:
          type: string
        refreshToken:
          type: string
        externalToken:
          type: string
    AppTokenRequest:
      type: object
      required:
        - id
        - name
        - secret
      properties:
        id:
          type: string
        name:
          type: string
        secret:
          type: string
    AppTokenResponse:
      type: object
      required:
        - access_token
        - id_token
      properties:
        access_token:
          type: string
        id_token:
          type: string
    IdpResourcdes:
      $ref: '#/components/schemas/IdpResources'
    RequestResourceCores:
      type: object
      properties:
        limit:
          type: number
          nullable: true
          format: double
          example: 1.5
        request:
          type: number
          nullable: true
          format: double
          example: 1
      nullable: true
    RequestResourceQuantity:
      type: object
      properties:
        limit:
          type: string
          nullable: true
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 2G
        request:
          type: string
          nullable: true
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 200M
      nullable: true
    WorkloadsExtendedResource:
      description: Quantity of an extended resource.
      type: object
      properties:
        resource:
          description: The name of the extended resource (mandatory)
          type: string
          example: hardware-vendor.example/foo
          minLength: 1
          nullable: true
        quantity:
          description: The requested quantity for the given resource.
          type: string
          example: 2
          minLength: 1
          nullable: true
        exclude:
          description: Whether to exclude this extended resource from the workload. This is necessary in case the extended resource is inherited from the policy defaults and it is desired not to include it in this workload.
          type: boolean
          example: false
          nullable: true
      nullable: true
    WorkloadsExtendedResources:
      description: Set of extended resources with their quantity
      type: array
      items:
        $ref: '#/components/schemas/WorkloadsExtendedResource'
      nullable: true
    WorkloadRequestResources:
      type: object
      nullable: true
      properties:
        gpuRequestType:
          $ref: '#/components/schemas/GpuRequestType'
        gpu:
          $ref: '#/components/schemas/RequestResourceCores'
        gpuMemory:
          $ref: '#/components/schemas/RequestResourceQuantity'
        cpu:
          $ref: '#/components/schemas/RequestResourceCores'
        cpuMemory:
          $ref: '#/components/schemas/RequestResourceQuantity'
        migProfile:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/MigProfile'
        extendedResources:
          $ref: '#/components/schemas/WorkloadsExtendedResources'
    RequestedPods:
      type: object
      properties:
        number:
          type: integer
          format: int32
          example: 1
          nullable: true
        min:
          type: integer
          format: int32
          example: 2
          nullable: true
        max:
          type: integer
          format: int32
          example: 5
          nullable: true
        parallelism:
          type: integer
          format: int32
          description: specifies how many Pods can run in parallel
          example: 3
          nullable: true
        completions:
          type: integer
          description: specifies how many Pods should terminate successfully before the Workload is completed
          format: int32
          example: 5
          nullable: true
    Datasource:
      type: object
      required:
        - name
        - id
      properties:
        type:
          type: string
          example: pvc
        name:
          type: string
          example: my-pvc-datasource-1
        id:
          type: string
          format: uuid
    Connection1:
      type: object
      description: Connection that either expose port from the container (a port is associated with a tool that the container runs), or URL to be used for connecting to an external tool that is related to the action of the container (such as Weights & Biases).
      required:
        - toolType
        - name
        - connectionType
      properties:
        name:
          type: string
          example: my-pytorch-env
        toolType:
          type: string
          example: pytorch
        connectionType:
          type: string
          example: ExternalUrl
        url:
          type: string
          example: http://wandb.com/yourproject
        authorizedUsers:
          type: array
          items:
            type: string
          example:
            - user@company.ai
            - another@company.ai
        authorizedGroups:
          type: array
          items:
            type: string
          example:
            - group-a
            - group-b
        containerPort:
          description: The port that the container running the workload exposes.
          type: integer
          format: int32
          example: 8080
    ReplicaType:
      type: string
      nullable: true
      enum:
        - Master
        - Worker
    Environment:
      type: object
      required:
        - name
        - id
      properties:
        connections:
          type: array
          items:
            $ref: '#/components/schemas/Connection1'
        name:
          type: string
          example: pytorch
        id:
          type: string
          format: uuid
        replicaType:
          $ref: '#/components/schemas/ReplicaType'
    Source:
      type: string
      enum:
        - CLI
        - Control-plane
        - Other
    WorkloadAllocatedResources:
      type: object
      nullable: true
      properties:
        gpu:
          type: number
          nullable: true
          format: double
          example: 1.5
          description: Required if and only if gpuRequestType is portion. States the number of GPUs allocated for the created workload. The default is no allocated GPUs.
        migProfile:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/MigProfile'
        gpuMemory:
          type: string
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          nullable: true
          example: 200Mi
        cpu:
          type: number
          nullable: true
          format: double
          description: States the amount of CPU cores used by the workload running.
          example: 0.5
        cpuMemory:
          type: string
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          nullable: true
          example: 0B
        extendedResources:
          $ref: '#/components/schemas/WorkloadsExtendedResources'
    ActionsSupport:
      description: The actions support provided for the workload.
      type: object
      properties:
        delete:
          type: boolean
          example: true
        suspend:
          description: This permission includes resume as well as suspend.
          type: boolean
          example: true
    Condition1:
      type: object
      required:
        - type
        - status
      properties:
        type:
          description: The type of the condition, such as Failed or Available. See Types of domain status conditions.
          type: string
          example: Ready
        status:
          type: string
          description: The status of the condition, such as True, False or Unknown.
          example: 'False'
        message:
          type: string
          description: An optional, human-readable message providing more details about the condition.
          example: 'Resource validation failed: ...'
        reason:
          type: string
          description: The reason for the Failed condition. Not applicable to other types of condition.
          example: ErrorConfig
        lastTransitionTime:
          description: A timestamp of when the condition was created or the last time time the condition transitioned from one status to another.
          type: string
          nullable: true
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
    Conditions:
      type: array
      items:
        $ref: '#/components/schemas/Condition1'
      x-schema-name: Conditions
    PhaseReason:
      type: string
      enum:
        - NonPreemptibleOverQuota
        - OverLimit
    Workload:
      type: object
      required:
        - type
        - name
        - id
        - source
        - priority
        - priorityClassName
        - clusterId
        - projectName
        - projectId
        - departmentName
        - departmentId
        - namespace
        - createdAt
        - phase
        - conditions
        - k8sPhase
        - tenantId
        - runningPods
        - phaseUpdatedAt
        - k8sPhaseUpdatedAt
        - updatedAt
        - deletedAt
      properties:
        tenantId:
          $ref: '#/components/schemas/TenantId'
        runningPods:
          type: integer
          format: int32
          example: 1
        phaseUpdatedAt:
          type: string
          format: date-time
          example: '2022-06-08T11:28:24.131Z'
        k8sPhaseUpdatedAt:
          type: string
          format: date-time
          example: '2022-06-08T11:28:24.131Z'
        updatedAt:
          type: string
          format: date-time
          example: '2022-06-08T11:28:24.131Z'
        source:
          $ref: '#/components/schemas/Source'
        deletedAt:
          type: string
          format: date-time
          example: '2022-08-12T19:28:24.131Z'
          nullable: true
        type:
          type: string
          example: runai-job
        name:
          type: string
          example: very-important-job
        id:
          type: string
          format: uuid
        priority:
          type: integer
          format: int32
          example: 50
          nullable: true
        priorityClassName:
          type: string
          example: high-priority
        submittedBy:
          type: string
          example: researcher@run.ai
        clusterId:
          $ref: '#/components/schemas/ClusterId'
        projectName:
          type: string
          example: proj-1
        projectId:
          type: string
          example: '1'
        departmentName:
          type: string
          example: department-1
        departmentId:
          type: string
          example: '1'
        namespace:
          type: string
          example: runai-proj-1
        createdAt:
          type: string
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
        workloadRequestedResources:
          $ref: '#/components/schemas/WorkloadRequestResources'
        podsRequestedResources:
          $ref: '#/components/schemas/WorkloadRequestResources'
        allocatedResources:
          $ref: '#/components/schemas/WorkloadAllocatedResources'
        actionsSupport:
          $ref: '#/components/schemas/ActionsSupport'
        phase:
          $ref: '#/components/schemas/Phase'
        conditions:
          $ref: '#/components/schemas/Conditions'
        phaseMessage:
          type: string
          example: Not enough resources in the requested nodepool
        k8sPhase:
          type: string
          example: Pending
        requestedPods:
          $ref: '#/components/schemas/RequestedPods'
        requestedNodePools:
          type: array
          items:
            type: string
            example: default
        currentNodePools:
          type: array
          items:
            type: string
            example: default
        completedAt:
          type: string
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
          nullable: true
        images:
          type: array
          items:
            type: string
            example: alpine:latest
        childrenIds:
          type: array
          writeOnly: true
          items:
            type: object
            required:
              - id
            properties:
              id:
                type: string
                format: uuid
              type:
                type: string
        urls:
          type: array
          items:
            type: string
        datasources:
          type: array
          items:
            $ref: '#/components/schemas/Datasource'
        environments:
          type: array
          items:
            $ref: '#/components/schemas/Environment'
        externalConnections:
          type: array
          items:
            $ref: '#/components/schemas/Connection1'
        distributedFramework:
          type: string
          example: Pytorch
        additionalFields:
          type: object
          additionalProperties: true
        preemptible:
          type: boolean
          nullable: true
        environmentVariables:
          type: object
          additionalProperties:
            type: string
        command:
          type: string
          example: sleep
        arguments:
          type: string
          example: '1000'
        phaseReason:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PhaseReason'
    OrgType:
      type: string
      enum:
        - PROJECT
        - DEPARTMENT
    Container1:
      type: object
      required:
        - name
        - image
      properties:
        name:
          type: string
          example: alpine
        image:
          type: string
          example: alpine:latest
        startedAt:
          type: string
          nullable: true
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
    PodRequestResources:
      type: object
      nullable: true
      properties:
        gpuRequestType:
          $ref: '#/components/schemas/GpuRequestType'
        gpu:
          $ref: '#/components/schemas/RequestResourceCores'
        gpuMemory:
          $ref: '#/components/schemas/RequestResourceQuantity'
        cpu:
          $ref: '#/components/schemas/RequestResourceCores'
        cpuMemory:
          $ref: '#/components/schemas/RequestResourceQuantity'
        migProfile:
          $ref: '#/components/schemas/MigProfile'
        extendedResources:
          $ref: '#/components/schemas/WorkloadsExtendedResources'
    AllocatedResources:
      type: object
      nullable: true
      properties:
        gpu:
          type: number
          nullable: true
          format: double
          example: 1.5
          description: Required if and only if gpuRequestType is portion. States the number of GPUs allocated for the created workload. The default is no allocated GPUs.
        migProfile:
          $ref: '#/components/schemas/MigProfile'
        gpuMemory:
          type: string
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          nullable: true
          example: 200Mi
        cpu:
          type: number
          nullable: true
          format: double
          description: States the amount of CPU cores used by the workload running.
          example: 0.5
        cpuMemory:
          type: string
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          nullable: true
          example: 0B
        extendedResources:
          $ref: '#/components/schemas/WorkloadsExtendedResources'
    PodToleration:
      type: object
      properties:
        key:
          description: Key is the taint key that the toleration applies to. Empty means match all taint keys.
          type: string
          example: ''
        operator:
          type: string
          description: Operator represents a key's relationship to the value.
          example: Exists
        value:
          type: string
          description: Value is the taint value the toleration matches to.
          example: ''
        effect:
          type: string
          description: Effect indicates the taint effect to match. Empty means match all taint effects.
          example: NoExecute
        tolerationSeconds:
          description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint.
          type: integer
          nullable: true
          example: '10'
    PodTolerations:
      type: array
      items:
        $ref: '#/components/schemas/PodToleration'
      x-schema-name: Tolerations
    PodSyncFields:
      type: object
      required:
        - name
        - priorityClassName
        - id
        - workloadId
        - clusterId
        - createdAt
        - containers
        - k8sPhase
      properties:
        name:
          type: string
          example: pod-of-a-very-important-job
        priorityClassName:
          type: string
          example: high-priority
        id:
          type: string
          format: uuid
        workloadId:
          type: string
          format: uuid
        clusterId:
          $ref: '#/components/schemas/ClusterId'
        projectId:
          type: string
          example: '1'
        nodeName:
          type: string
          nullable: true
          example: gpu-node-1
        createdAt:
          type: string
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
        completedAt:
          type: string
          nullable: true
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
        containers:
          type: array
          items:
            $ref: '#/components/schemas/Container1'
        currentNodePool:
          type: string
          nullable: true
          example: default
        requestedNodePools:
          type: array
          items:
            type: string
            example: default
        requestedResources:
          $ref: '#/components/schemas/PodRequestResources'
        allocatedResources:
          $ref: '#/components/schemas/AllocatedResources'
        tolerations:
          $ref: '#/components/schemas/PodTolerations'
        k8sPhase:
          type: string
          example: Pending
        ip:
          type: string
          nullable: true
          example: 10.244.1.1
    Workloads:
      type: array
      items:
        $ref: '#/components/schemas/Workload'
      x-schema-name: Workloads
    PendingSchedulingMessage:
      type: object
      required:
        - nodePool
        - phaseReason
        - reason
      properties:
        nodePool:
          type: string
          example: default
        phaseReason:
          $ref: '#/components/schemas/PhaseReason'
        reason:
          type: string
          example: Non-preemptible over quota
        orgType:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/OrgType'
        userMessage:
          nullable: true
          type: string
          example: You have reached the limit of non-preemptible resources
    WorkloadDetailed:
      allOf:
        - $ref: '#/components/schemas/Workload'
        - type: object
          properties:
            pendingSchedulingMessages:
              nullable: true
              type: array
              items:
                $ref: '#/components/schemas/PendingSchedulingMessage'
    WorkloadTelemetryType:
      type: string
      description: Select a telemetry type.
      enum:
        - WORKLOADS_COUNT
        - GPU_ALLOCATION
    PodVerbosity:
      type: string
      enum:
        - brief
        - full
      default: brief
    PodComputedFields:
      type: object
      required:
        - tenantId
        - k8sPhaseUpdatedAt
        - updatedAt
      properties:
        tenantId:
          $ref: '#/components/schemas/TenantId'
        k8sPhaseUpdatedAt:
          type: string
          format: date-time
          example: '2022-06-08T11:28:24.131Z'
        updatedAt:
          type: string
          format: date-time
          example: '2022-06-08T11:28:24.131Z'
        deletedAt:
          type: string
          format: date-time
          example: '2022-08-12T19:28:24.131Z'
          nullable: true
    PodVerbosityFields:
      type: object
      properties:
        projectName:
          type: string
          example: my-project
        workloadName:
          type: string
          example: my-workload
    Pod1:
      allOf:
        - $ref: '#/components/schemas/PodSyncFields'
        - $ref: '#/components/schemas/PodComputedFields'
        - $ref: '#/components/schemas/PodVerbosityFields'
    Pods1:
      type: array
      items:
        $ref: '#/components/schemas/Pod1'
      x-schema-name: Pods
    PodMetricType:
      type: string
      description: Specify which data to request.
      enum:
        - GPU_UTILIZATION_PER_GPU
        - GPU_UTILIZATION
        - GPU_MEMORY_USAGE_BYTES_PER_GPU
        - GPU_MEMORY_USAGE_BYTES
        - CPU_USAGE_CORES
        - CPU_MEMORY_USAGE_BYTES
        - GPU_GRAPHICS_ENGINE_ACTIVITY_PER_GPU
        - GPU_SM_ACTIVITY_PER_GPU
        - GPU_SM_OCCUPANCY_PER_GPU
        - GPU_TENSOR_ACTIVITY_PER_GPU
        - GPU_FP64_ENGINE_ACTIVITY_PER_GPU
        - GPU_FP32_ENGINE_ACTIVITY_PER_GPU
        - GPU_FP16_ENGINE_ACTIVITY_PER_GPU
        - GPU_MEMORY_BANDWIDTH_UTILIZATION_PER_GPU
        - GPU_NVLINK_TRANSMITTED_BANDWIDTH_PER_GPU
        - GPU_NVLINK_RECEIVED_BANDWIDTH_PER_GPU
        - GPU_PCIE_TRANSMITTED_BANDWIDTH_PER_GPU
        - GPU_PCIE_RECEIVED_BANDWIDTH_PER_GPU
    InvolvedObject:
      type: object
      required:
        - uid
        - kind
        - name
        - namespace
      properties:
        uid:
          type: string
          format: uuid
        kind:
          type: string
          example: Pod
        name:
          type: string
          example: test-0-1
        namespace:
          type: string
          example: runai-test
    Event1:
      type: object
      nullable: true
      required:
        - createdAt
        - type
        - clusterId
        - message
      properties:
        createdAt:
          type: string
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
        id:
          type: string
          format: uuid
        type:
          type: string
          example: Normal
        clusterId:
          $ref: '#/components/schemas/ClusterId'
        message:
          type: string
          example: Started container z
        reason:
          type: string
          example: Started
        source:
          type: string
          example: kubelet
        involvedObject:
          $ref: '#/components/schemas/InvolvedObject'
    Events:
      type: array
      items:
        $ref: '#/components/schemas/Event1'
      x-schema-name: Events
    HistoryRecordType:
      type: string
      enum:
        - Event
        - PhaseUpdate
    HistoryRecordMeta:
      type: object
      required:
        - creationTimestamp
        - type
      properties:
        creationTimestamp:
          type: string
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
        type:
          $ref: '#/components/schemas/HistoryRecordType'
    PhaseUpdate:
      type: object
      nullable: true
      example: null
      required:
        - phase
        - phaseMessage
      properties:
        phase:
          $ref: '#/components/schemas/Phase'
        phaseMessage:
          type: string
          example: Not enough resources in the requested nodepool
    HistoryRecord:
      type: object
      required:
        - meta
        - spec
      properties:
        meta:
          $ref: '#/components/schemas/HistoryRecordMeta'
        spec:
          type: object
          properties:
            event:
              $ref: '#/components/schemas/Event1'
            phaseUpdate:
              $ref: '#/components/schemas/PhaseUpdate'
    HistoryRecords:
      type: array
      items:
        $ref: '#/components/schemas/HistoryRecord'
      x-schema-name: HistoryRecords
    WorkloadMetricType:
      type: string
      description: Specify which metric data to request.
      enum:
        - GPU_UTILIZATION
        - GPU_MEMORY_USAGE_BYTES
        - GPU_MEMORY_REQUEST_BYTES
        - CPU_USAGE_CORES
        - CPU_REQUEST_CORES
        - CPU_LIMIT_CORES
        - CPU_MEMORY_USAGE_BYTES
        - CPU_MEMORY_REQUEST_BYTES
        - CPU_MEMORY_LIMIT_BYTES
        - POD_COUNT
        - RUNNING_POD_COUNT
        - GPU_ALLOCATION
    ProjectId2:
      description: The id of the project.
      type: string
      example: 1
    WorkloadCreationMeta1:
      required:
        - name
        - projectId
        - clusterId
      properties:
        name:
          $ref: '#/components/schemas/WorkloadName'
        useGivenNameAsPrefix:
          description: When true, the requested name will be treated as a prefix. The final name of the workload will be composed of the name followed by a random set of characters.
          type: boolean
          example: true
          default: false
        projectId:
          $ref: '#/components/schemas/ProjectId2'
        clusterId:
          $ref: '#/components/schemas/ClusterId'
    EnvironmentVariable2:
      description: Details of an environment variable which is populated into the container.
      properties:
        name:
          description: The name of the environment variable. (mandatory)
          type: string
          minLength: 1
          example: HOME
          nullable: true
        value:
          description: The value of the environment variable. (mutually exclusive with secret)
          type: string
          example: /home/my-folder
          nullable: true
        secret:
          $ref: '#/components/schemas/EnvironmentVariableSecret'
        exclude:
          description: Use 'true' in case the environment variable is defined in defaults of the policy, and you wish to exclude it from the workload.
          type: boolean
          example: false
          nullable: true
      nullable: true
      type: object
    EnvironmentVariables2:
      description: Set of environment variables to populate into the container running the workspace.
      type: array
      items:
        $ref: '#/components/schemas/EnvironmentVariable2'
      nullable: true
    CommonItemizedFields:
      allOf:
        - $ref: '#/components/schemas/EnvironmentVariablesField'
        - $ref: '#/components/schemas/AdvancedItemizedFields'
      nullable: true
      type: object
    ConnectivityFields:
      properties:
        ports:
          $ref: '#/components/schemas/Ports'
        exposedUrls:
          $ref: '#/components/schemas/ExposedUrls'
        relatedUrls:
          $ref: '#/components/schemas/RelatedUrls'
      nullable: true
      type: object
    Compute:
      properties:
        compute:
          $ref: '#/components/schemas/ComputeFields'
      nullable: true
      type: object
    Secret5:
      allOf:
        - $ref: '#/components/schemas/SecretFieldsUpdatable'
        - $ref: '#/components/schemas/SecretFieldsNonUpdatable'
    SecretInstance1:
      allOf:
        - $ref: '#/components/schemas/StorageInstanceName'
        - $ref: '#/components/schemas/Secret5'
      nullable: true
      type: object
    CommonStorageFields:
      properties:
        dataVolume:
          $ref: '#/components/schemas/DataVolumeItems'
        pvc:
          $ref: '#/components/schemas/PvcItems'
        hostPath:
          $ref: '#/components/schemas/HostPathItems'
        nfs:
          $ref: '#/components/schemas/NfsItems'
        git:
          $ref: '#/components/schemas/GitItems'
        configMapVolume:
          $ref: '#/components/schemas/ConfigMapField'
        secretVolume:
          $ref: '#/components/schemas/SecretItems'
      nullable: true
      type: object
    NonInferenceStorageFields:
      properties:
        s3:
          $ref: '#/components/schemas/S3Items'
      nullable: true
      type: object
    StorageFields:
      allOf:
        - $ref: '#/components/schemas/CommonStorageFields'
        - $ref: '#/components/schemas/NonInferenceStorageFields'
      nullable: true
      type: object
    Storage:
      properties:
        storage:
          $ref: '#/components/schemas/StorageFields'
      nullable: true
      type: object
    WorkspaceSpec:
      description: The specifications of the workspace to be created.
      properties:
        spec:
          allOf:
            - $ref: '#/components/schemas/CommonFlatFields'
            - $ref: '#/components/schemas/NonInferenceFlatFields'
            - $ref: '#/components/schemas/CommonItemizedFields'
            - $ref: '#/components/schemas/AdvancedFlatFields'
            - $ref: '#/components/schemas/ConnectivityFields'
            - $ref: '#/components/schemas/PriorityClassFields'
            - $ref: '#/components/schemas/Compute'
            - $ref: '#/components/schemas/Storage'
            - $ref: '#/components/schemas/Security'
    WorkspaceCreationRequest:
      allOf:
        - $ref: '#/components/schemas/WorkloadCreationMeta1'
        - $ref: '#/components/schemas/WorkspaceSpec'
    WorkloadId2:
      description: A unique ID of the workload.
      type: string
      format: uuid
    DepartmentId2:
      description: The id of the department.
      type: string
      minLength: 1
      example: 2
    WorkloadMeta1:
      required:
        - name
        - requestedName
        - workloadId
        - projectId
        - clusterId
        - createdBy
        - createdAt
        - desiredPhase
      properties:
        name:
          $ref: '#/components/schemas/WorkloadName'
        requestedName:
          description: The name as was requested for the workload. If useGivenNameAsPrefix, in the creation request, is false, name and requestedName should be identical. Otherwise, name should be composed of requestedName followed by a suffix of random characters.
          type: string
        workloadId:
          $ref: '#/components/schemas/WorkloadId2'
        projectId:
          $ref: '#/components/schemas/ProjectId2'
        departmentId:
          $ref: '#/components/schemas/DepartmentId2'
        clusterId:
          $ref: '#/components/schemas/ClusterId'
        createdBy:
          description: The user who created the workload
          type: string
          example: test@lab.com
        createdAt:
          description: The creation time of the workload.
          type: string
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
        desiredPhase:
          $ref: '#/components/schemas/WorkloadDesiredPhase'
        actualPhase:
          $ref: '#/components/schemas/Phase'
    Workspace1:
      allOf:
        - $ref: '#/components/schemas/WorkloadMeta1'
        - $ref: '#/components/schemas/WorkspaceSpec'
    SupersetSpec:
      allOf:
        - $ref: '#/components/schemas/CommonFlatFields'
        - $ref: '#/components/schemas/NonInferenceFlatFields'
        - $ref: '#/components/schemas/CommonItemizedFields'
        - $ref: '#/components/schemas/AdvancedFlatFields'
        - $ref: '#/components/schemas/ConnectivityFields'
        - $ref: '#/components/schemas/PriorityClassFields'
        - $ref: '#/components/schemas/TrainingFields'
        - $ref: '#/components/schemas/DistributedFields'
        - $ref: '#/components/schemas/InferenceFlatFields'
        - $ref: '#/components/schemas/InferenceFields'
        - $ref: '#/components/schemas/Security'
        - $ref: '#/components/schemas/Compute'
        - $ref: '#/components/schemas/Storage'
    MasterSpecSameAsWorker:
      description: used for distributed workloads to indicate that the master spec should be the same as the worker spec. in this case, masterSpec should not be specified.
      type: boolean
      nullable: true
    MasterSpec:
      description: The spec of the master. Should be provided only if masterSpecSameAsWorker is false.
      allOf:
        - $ref: '#/components/schemas/CommonFlatFields'
        - $ref: '#/components/schemas/NonInferenceFlatFields'
        - $ref: '#/components/schemas/CommonItemizedFields'
        - $ref: '#/components/schemas/AdvancedFlatFields'
        - $ref: '#/components/schemas/ConnectivityFields'
        - $ref: '#/components/schemas/Compute'
        - $ref: '#/components/schemas/Storage'
        - $ref: '#/components/schemas/Security'
      nullable: true
      type: object
    SupersetWorkload:
      allOf:
        - $ref: '#/components/schemas/WorkloadMeta1'
        - type: object
          properties:
            spec:
              $ref: '#/components/schemas/SupersetSpec'
            masterSpecSameAsWorker:
              $ref: '#/components/schemas/MasterSpecSameAsWorker'
            masterSpec:
              $ref: '#/components/schemas/MasterSpec'
          nullable: true
    TrainingSpec:
      description: The specifications of the training to be created.
      properties:
        spec:
          allOf:
            - $ref: '#/components/schemas/CommonFlatFields'
            - $ref: '#/components/schemas/NonInferenceFlatFields'
            - $ref: '#/components/schemas/CommonItemizedFields'
            - $ref: '#/components/schemas/AdvancedFlatFields'
            - $ref: '#/components/schemas/ConnectivityFields'
            - $ref: '#/components/schemas/PriorityClassFields'
            - $ref: '#/components/schemas/TrainingFields'
            - $ref: '#/components/schemas/Compute'
            - $ref: '#/components/schemas/Storage'
            - $ref: '#/components/schemas/Security'
    TrainingCreationRequest:
      allOf:
        - $ref: '#/components/schemas/WorkloadCreationMeta1'
        - $ref: '#/components/schemas/TrainingSpec'
    Training1:
      allOf:
        - $ref: '#/components/schemas/WorkloadMeta1'
        - $ref: '#/components/schemas/TrainingSpec'
    DistributedSpec:
      description: The specifications of the training to be created.
      properties:
        spec:
          description: The spec of the worker(s).
          allOf:
            - $ref: '#/components/schemas/CommonFlatFields'
            - $ref: '#/components/schemas/NonInferenceFlatFields'
            - $ref: '#/components/schemas/CommonItemizedFields'
            - $ref: '#/components/schemas/AdvancedFlatFields'
            - $ref: '#/components/schemas/ConnectivityFields'
            - $ref: '#/components/schemas/DistributedFields'
            - $ref: '#/components/schemas/Compute'
            - $ref: '#/components/schemas/Storage'
            - $ref: '#/components/schemas/Security'
        masterSpecSameAsWorker:
          $ref: '#/components/schemas/MasterSpecSameAsWorker'
        masterSpec:
          $ref: '#/components/schemas/MasterSpec'
    DistributedCreationRequest:
      allOf:
        - $ref: '#/components/schemas/WorkloadCreationMeta1'
        - $ref: '#/components/schemas/DistributedSpec'
    DistributedWorkload:
      allOf:
        - $ref: '#/components/schemas/WorkloadMeta1'
        - $ref: '#/components/schemas/DistributedSpec'
    CommonStorage:
      properties:
        storage:
          $ref: '#/components/schemas/CommonStorageFields'
      nullable: true
      type: object
    InferenceSpec:
      description: The specifications of the inference to be created.
      properties:
        spec:
          allOf:
            - $ref: '#/components/schemas/CommonFlatFields'
            - $ref: '#/components/schemas/InferenceFlatFields'
            - $ref: '#/components/schemas/CommonItemizedFields'
            - $ref: '#/components/schemas/ConnectivityFields'
            - $ref: '#/components/schemas/Compute'
            - $ref: '#/components/schemas/CommonStorage'
            - $ref: '#/components/schemas/CommonSecurity'
            - $ref: '#/components/schemas/InferenceFields'
    InferenceCreationRequest:
      allOf:
        - $ref: '#/components/schemas/WorkloadCreationMeta1'
        - $ref: '#/components/schemas/InferenceSpec'
    Inference1:
      allOf:
        - $ref: '#/components/schemas/WorkloadMeta1'
        - $ref: '#/components/schemas/InferenceSpec'
    InferenceUpdateSpecAutoscaling:
      properties:
        autoscaling:
          $ref: '#/components/schemas/AutoScaling'
    InferenceUpdateSpec:
      description: The specifications of the inference to be updated.
      properties:
        spec:
          allOf:
            - $ref: '#/components/schemas/ContainerOverridable'
            - $ref: '#/components/schemas/ContainerNonOverridable'
            - $ref: '#/components/schemas/EnvironmentVariablesField'
            - $ref: '#/components/schemas/InferenceUpdateSpecAutoscaling'
    InferenceUpdateRequest:
      allOf:
        - $ref: '#/components/schemas/InferenceUpdateSpec'
    InferenceWorkloadMetricType:
      type: string
      description: Specify which data to request.
      enum:
        - THROUGHPUT
        - LATENCY
    InferencePodMetricType:
      type: string
      description: Specifies what data to request.
      enum:
        - THROUGHPUT
        - LATENCY
    IdsList:
      type: array
      description: List of ids to perform the action on.
      items:
        type: string
        format: uuid
        description: Id to perform the action on.
      minLength: 1
    Action1:
      type: string
      description: The action to perform on the list of ids.
      enum:
        - delete
    WorkloadBatch:
      type: object
      description: The ids and action to perform on a batch of workloads. The number of ids is limited to 100.
      required:
        - ids
        - action
      properties:
        ids:
          $ref: '#/components/schemas/IdsList'
        action:
          $ref: '#/components/schemas/Action1'
    BatchId:
      type: string
      format: uuid
      description: The ID of the batch operation.
    BatchResponseFailureItem:
      type: object
      required:
        - id
        - code
        - message
      properties:
        id:
          type: string
          format: uuid
        code:
          type: integer
          format: int32
          description: The error code.
        message:
          type: string
          description: The error message.
    BatchResponse:
      type: object
      required:
        - id
      properties:
        id:
          $ref: '#/components/schemas/BatchId'
        succeeded:
          $ref: '#/components/schemas/IdsList'
        failed:
          type: array
          description: The IDs that failed to update.
          items:
            $ref: '#/components/schemas/BatchResponseFailureItem'
    SupersetWorkloadSpec:
      $ref: '#/components/schemas/SupersetSpec'
    DatavolumeRequestType:
      type: string
      description: Which datavolumes to return in the GET datavolumes response. Originated - datavolumes that are originated in the permitted scopes of the caller. UsableInProject - datavolumes that can be used in a specific project; if you use this value, you must also provide the project ID in the "usableInProjectId" query param.
      example: Originated
      enum:
        - Originated
        - UsableInProject
    BaseFields:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
          example: 71f69d83-ba66-4822-adf5-55ce55efd210
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        createdBy:
          type: string
          example: user@run.ai
        updatedBy:
          type: string
          example: user@run.ai
    DatavolumeCreationFields:
      type: object
      required:
        - name
        - projectId
        - originPvcName
      properties:
        name:
          type: string
          maxLength: 63
          pattern: ^[a-z][-a-z0-9]{0,62}$
          example: datavolume-a
        description:
          type: string
          maxLength: 127
          example: Results of experiment X
        originPvcName:
          description: The name of the PVC that the datavolume is based on
          type: string
          example: pvc-a
        projectId:
          description: The ID of the project that in its namespace the origin pvc is located
          type: string
          example: '5'
        shouldDeleteOriginalVolume:
          description: If true, the original storage volume will be deleted together with the datavolume
          type: boolean
          default: false
          example: false
    EnrichmentDataFields1:
      type: object
      required:
        - projectName
      properties:
        projectName:
          type: string
          example: project-a
        departmentId:
          type: string
          example: department-a
        clusterId:
          $ref: '#/components/schemas/ClusterId'
    DatavolumeInnerFields:
      allOf:
        - $ref: '#/components/schemas/BaseFields'
        - $ref: '#/components/schemas/DatavolumeCreationFields'
        - $ref: '#/components/schemas/EnrichmentDataFields1'
    DatavolumePhase:
      type: string
      description: Phase of the Datavolume in the cluster
      example: Ready
      enum:
        - Ready
        - NotReady
        - Creating
        - Deleting
        - Unknown
    Condition2:
      type: object
      required:
        - type
        - status
      properties:
        type:
          description: The type of the condition, such as Failed or Available. See Types of domain status conditions.
          type: string
          example: PvcsCreated
        status:
          type: string
          description: The status of the condition, such as True, False or Unknown.
          example: 'False'
        message:
          type: string
          description: An optional, human-readable message providing more details about the condition.
          example: Failed to create pvc in namespace 'runai-proj1'
        reason:
          type: string
          description: The reason for the Failed condition. Not applicable to other types of condition.
          example: ErrorCreatingPvc
        lastTransitionTime:
          description: A timestamp of when the condition was created or the last time time the condition transitioned from one status to another.
          type: string
          nullable: true
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
    Conditions1:
      type: array
      items:
        $ref: '#/components/schemas/Condition2'
      x-schema-name: Conditions
    DatavolumeStatus:
      type: object
      required:
        - phase
      properties:
        phase:
          $ref: '#/components/schemas/DatavolumePhase'
        phaseMessage:
          type: string
          description: Message explaining the phase of the Datavolume in the cluster
          example: Failed to copy pvc to project 'project-a'
        conditions:
          $ref: '#/components/schemas/Conditions1'
        datavolumePvcName:
          type: string
          description: The name of the copied PVC that is created in the cluster in the project namespace
          example: datavolume-pvc-1
        datavolumePvName:
          type: string
          description: The name of the PV that is created in the cluster - copied from the one that was attached to the original pvc
          example: datavolume-pv-1
    DatavolumeNoSharedScopes:
      allOf:
        - $ref: '#/components/schemas/DatavolumeInnerFields'
        - type: object
          required:
            - status
          properties:
            status:
              $ref: '#/components/schemas/DatavolumeStatus'
    DatavolumesNoSharedScopes:
      type: array
      items:
        $ref: '#/components/schemas/DatavolumeNoSharedScopes'
      x-schema-name: DatavolumesNoSharedScopes
    ScopeType2:
      type: string
      enum:
        - cluster
        - department
        - project
    SharedScopeBase:
      type: object
      required:
        - scopeType
        - scopeId
      properties:
        scopeType:
          $ref: '#/components/schemas/ScopeType2'
        scopeId:
          type: string
          example: a418ed33-9399-48c0-a890-122cadd13bfd
    SharedScope:
      allOf:
        - $ref: '#/components/schemas/SharedScopeBase'
        - type: object
          required:
            - scopeName
          properties:
            scopeName:
              type: string
              description: The name of the scope
              example: project-a
            createdAt:
              type: string
              format: date-time
            createdBy:
              type: string
              example: user@run.ai
    Datavolume:
      allOf:
        - $ref: '#/components/schemas/DatavolumeInnerFields'
        - type: object
          required:
            - status
          properties:
            sharedScopes:
              description: Will be returned only if the user has the required permissions to view those scopes
              type: array
              items:
                $ref: '#/components/schemas/SharedScope'
            status:
              $ref: '#/components/schemas/DatavolumeStatus'
    DatavolumePatchFields:
      type: object
      properties:
        description:
          type: string
          maxLength: 127
          example: Results of experiment X
    SharedScopes:
      type: array
      items:
        $ref: '#/components/schemas/SharedScope'
      x-schema-name: SharedScopes
    SharedScopesPatchRequest:
      type: object
      properties:
        add:
          type: array
          items:
            $ref: '#/components/schemas/SharedScopeBase'
          maxLength: 50
        remove:
          type: array
          items:
            $ref: '#/components/schemas/SharedScopeBase'
          maxLength: 50
    DatavolumeStatusInternal:
      allOf:
        - $ref: '#/components/schemas/DatavolumeStatus'
        - type: object
          properties:
            isDeleted:
              type: boolean
              description: If true, the datavolume is deleted in the cluster and 'phase' field is irrelevant.
              example: false
              nullable: true
    DatavolumeInternal:
      allOf:
        - $ref: '#/components/schemas/DatavolumeInnerFields'
        - type: object
          properties:
            sharedScopes:
              description: Will be returned only if the user has the required permissions to view those scopes
              type: array
              items:
                $ref: '#/components/schemas/SharedScope'
            phase:
              $ref: '#/components/schemas/DatavolumePhase'
    DatavolumeStatusForSync:
      allOf:
        - $ref: '#/components/schemas/DatavolumeStatus'
        - type: object
          required:
            - datavolumeId
          properties:
            datavolumeId:
              type: string
              format: uuid
              description: The id of the datavolume
              example: 71f69d83-ba66-4822-adf5-55ce55efd210
    Filters:
      type: object
      additionalProperties:
        type: array
        items:
          type: string
    MetricInformationForReport:
      type: object
      required:
        - name
        - displayName
      properties:
        name:
          type: string
          example: gpu_allocation_hours
        displayName:
          type: string
          example: GPU allocation hours
        filters:
          $ref: '#/components/schemas/Filters'
    Label1:
      type: object
      required:
        - name
        - displayName
      properties:
        name:
          type: string
          example: nodepoolName
        displayName:
          type: string
          example: Node pool
    ReportRequestFields1:
      type: object
      required:
        - name
        - metrics
        - range
      properties:
        name:
          type: string
          example: 2023 GPU report
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/MetricInformationForReport'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label1'
        range:
          $ref: '#/components/schemas/Range'
        additionalFields:
          type: object
          additionalProperties: true
    Report1:
      allOf:
        - $ref: '#/components/schemas/ReportRequestFields1'
        - $ref: '#/components/schemas/ReportCalculatedFields'
    Command:
      type: object
      required:
        - command
      properties:
        command:
          type: string
          example: runai version
          description: The commands that can be used to install the Run:ai CLI.
    AuditLog:
      type: object
      required:
        - id
        - timestamp
        - tenant_id
        - subject
        - subject_type
        - source_ip
        - action
        - http_method
        - result
        - url
        - entity_type
        - entity_name
        - entity_id
        - http_status_code
        - reqeust_id
      properties:
        id:
          type: string
          format: uuid
          example: 0000-000000-00000-00000
        timestamp:
          type: string
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
        tenant_id:
          type: string
          description: the ID of the tenant
          example: 12345
        subject:
          type: string
          description: the user/app which triggered this API
          example: researcher@run.ai
        subject_type:
          type: string
          enum:
            - User
            - App
          default: User
        source_ip:
          type: string
          format: ipv4
        action:
          type: string
          enum:
            - create
            - update
            - delete
            - sign-in
            - sign-out
            - reset-password
        http_method:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
            - CREATE
        url:
          type: string
          format: uri
        entity_type:
          type: string
          example: project
        entity_name:
          type: string
          example: project-1
        entity_id:
          type: string
          example: '1234'
        result:
          type: string
          enum:
            - Succeeded
            - Failed
        http_status_code:
          type: integer
          example: 200
        cluster_name:
          type: string
          example: my favorite cluster
        cluster_id:
          type: string
          format: uuid
        request_id:
          type: string
          format: uuid
          example: bb0c4742-e52f-4d5e-bfee-2c4ff57c339c
    AuditLogs:
      type: array
      items:
        $ref: '#/components/schemas/AuditLog'
      x-schema-name: AuditLog
  responses:
    404NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 404
            message: Resource id not found.
    500InternalServerError:
      description: unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 500
            message: Something went wrong.
    503ServiceUnavailable:
      description: unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 503
            message: Please try again in few minutes.
    401Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 401
            message: Issuer is not familiar.
    403Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 403
            message: You do not have sufficient permissions.
    204NoContent:
      description: No Content.
    400BadRequest:
      description: Bad request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 400
            message: Required parameter is missing
    202Accepted:
      description: Accepted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HttpResponse'
          example:
            code: 202
            message: Request has been accepted.
    400BadSubmissionRequest:
      description: Bad submission request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SubmissionError'
          example:
            code: 400
            message: The workload request does not comply with the policy set by the administrator
    409Conflict:
      description: The specified resource already exists
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 409
            message: Resource with this name already exists
    412PreconditionFailed:
      description: The specified resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: 412
            message: Precondition failed
    413RequestEntityTooLarge:
      description: Request entity too large
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    415UnsupportedMediaType:
      description: Unsupported media type
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error1'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    serviceUnavailable:
      description: unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error1'
    Conflict:
      description: conflict error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    OK:
      description: OK
      content:
        application/json:
          schema:
            type: string
            format: text
    BadRequest1:
      description: Bad request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error1'
    CLIReleaseResponse:
      description: Get the CLI release.
      content:
        application/x-tar:
          schema:
            type: string
            format: binary
    ChecksumResponse:
      description: return an object with hashes of a file for validation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ChecksumResponse'
    V1StorageClassNames:
      description: Expected response to a valid request
      content:
        application/json:
          schema:
            type: object
            properties:
              storageClasses:
                type: array
                items:
                  type: string
                example:
                  - standard
            example:
              storageClasses:
                - standard
    V1Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1Error'
    V1NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1Error'
  parameters:
    ClusterUuid:
      name: clusterUuid
      in: path
      required: true
      description: The Universally Unique Identifier (UUID) of the cluster.
      schema:
        type: string
        format: uuid
        minLength: 1
        example: 9f55255e-11ed-47c7-acef-fc4054768dbc
    QueryNodeName:
      name: nodeName
      in: query
      description: The node name.
      schema:
        type: string
      required: false
    NodeName:
      name: nodeName
      in: path
      description: The node name.
      schema:
        type: string
      required: true
    QueryVerbosity:
      name: verbosity
      in: query
      required: false
      description: |
        response verbosity level.
      example: full
      schema:
        type: string
        enum:
          - metadata
          - full
        default: full
    QueryForceDelete:
      name: force
      in: query
      required: false
      description: |
        if true will force cluster instant deletion otherwise will start cluster graceful deletion process.
      example: true
      schema:
        type: boolean
        default: false
    StartRequired:
      name: start
      in: query
      description: Start date of time range to fetch data in ISO 8601 timestamp format.
      required: true
      schema:
        type: string
        format: date-time
        example: '2023-06-06T12:09:18.211Z'
    EndRequired:
      name: end
      in: query
      description: End date of time range to fetch data in ISO 8601 timestamp format.
      required: true
      schema:
        type: string
        format: date-time
        example: '2023-06-07T12:09:18.211Z'
    NumberOfSamples:
      name: numberOfSamples
      in: query
      description: The number of samples to take in the specified time range.
      required: false
      schema:
        type: integer
        example: 20
        maximum: 1000
        minimum: 0
        default: 20
    MetricsType:
      name: metricType
      in: query
      required: true
      description: specifies what data to request
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/MetricsType'
    NodepoolPath:
      in: path
      name: nodepoolName
      required: true
      description: The unique nodepool name.
      schema:
        type: string
        example: default
    NodepoolId:
      name: nodepoolId
      in: path
      required: true
      description: The unique id identifying the Node Pool.
      schema:
        type: string
        example: 17
    NodepoolsFilterBy:
      name: filterBy
      in: query
      required: false
      description: Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.
      schema:
        type: array
        items:
          type: string
          pattern: ^(name|clusterId|phase)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
        example:
          - name!=some-name
      explode: false
    NodepoolsSortBy:
      name: sortBy
      in: query
      required: false
      description: Sort results by a parameters.
      schema:
        $ref: '#/components/schemas/NodepoolSortFilterFields'
    SortOrder:
      name: sortOrder
      in: query
      required: false
      description: Sort results in descending or ascending order.
      schema:
        type: string
        enum:
          - asc
          - desc
        default: asc
    Offset:
      name: offset
      in: query
      required: false
      description: The offset of the first item returned in the collection.
      schema:
        type: integer
        format: int32
        example: 100
    Limit:
      name: limit
      in: query
      required: false
      description: The maximum number of entries to return.
      schema:
        type: integer
        format: int32
        default: 50
        minimum: 1
        maximum: 500
    ClusterVersion:
      name: version
      in: query
      required: true
      description: The cluster version to install
      schema:
        type: string
        example: 2.16
    ClusterRemoteURL:
      name: remoteClusterUrl
      in: query
      required: false
      description: The remote URL of the runai cluster
      schema:
        type: string
        example: https://cluster.runai
    FilterByCluster:
      name: clusterId
      in: query
      description: Filter using the Universally Unique Identifier (UUID) of the cluster.
      required: false
      schema:
        type: string
        format: uuid
        example: d73a738f-fab3-430a-8fa3-5241493d7128
    FilterByNodepoolName:
      name: nodepoolName
      in: query
      description: Filter using the nodepool.
      required: false
      schema:
        type: string
        example: default
    TelemetryGroupBy:
      name: groupBy
      in: query
      description: workload fields to group the data by
      explode: false
      required: false
      schema:
        type: array
        maxItems: 2
        items:
          type: string
          enum:
            - ClusterId
            - Nodepool
            - Node
    TelemetryType:
      name: telemetryType
      in: query
      required: true
      description: specifies what data to request
      schema:
        $ref: '#/components/schemas/NodeTelemetryType'
    NodeId:
      name: nodeId
      in: path
      description: The node UUID.
      schema:
        type: string
        format: uuid
        minLength: 1
        example: 9f55255e-11ed-47c7-acef-fc4054768dbc
      required: true
    NodeMetricTypes:
      name: metricType
      in: query
      required: true
      description: Specify which data to request.
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/NodeMetricType'
    nodeName:
      $ref: '#/components/parameters/NodeName'
    queryNodeName:
      $ref: '#/components/parameters/QueryNodeName'
    queryVerbosity:
      $ref: '#/components/parameters/QueryVerbosity'
    DepartmentId:
      name: departmentId
      in: path
      required: true
      description: The id of the department.
      schema:
        type: string
        example: '1'
    ProjectId:
      name: projectId
      in: path
      required: true
      description: The project id
      example: 575c19e8-c7c3-45b0-8290-2f47397a8383
      schema:
        type: string
    ReportId:
      name: reportId
      in: path
      required: true
      description: The report id
      example: 575c19e8-c7c3-45b0-8290-2f47397a8383
      schema:
        type: string
        format: uuid
    DepartmentsFilterBy:
      name: filterBy
      in: query
      required: false
      description: Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.
      schema:
        type: array
        items:
          type: string
          pattern: ^(name|clusterId|totalGpuQuota|gpuAllocated|createdAt|avgGpuAllocation24h|avgGpuUtilization24h|avgGpuAllocation7d|avgGpuUtilization7d|avgGpuAllocation30d|avgGpuUtilization30d)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
        example:
          - name!=some-name
      explode: false
    DepartmentsSortBy:
      name: sortBy
      in: query
      required: false
      description: Sort results by a parameters.
      schema:
        $ref: '#/components/schemas/DepartmentFilterSortFields'
    DepartmentsVerbosity:
      name: verbosity
      in: query
      required: false
      description: Departments verbosity. If it is set to "verbose", status will be returned. If it is not defined or set to "brief" only unit specific data will be returned.
      example: verbose
      schema:
        $ref: '#/components/schemas/Verbosity'
    FilterByDepartment:
      name: departmentId
      in: query
      description: Filter using the department id.
      required: false
      schema:
        type: string
        example: '1'
    ProjectsFilterBy:
      name: filterBy
      in: query
      required: false
      description: Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.
      schema:
        type: array
        items:
          type: string
          pattern: ^(name|clusterId|departmentId|parentId|parentName|phase|totalGpuQuota|gpuAllocated|createdAt|avgGpuAllocation24h|avgGpuUtilization24h|avgGpuAllocation7d|avgGpuUtilization7d|avgGpuAllocation30d|avgGpuUtilization30d)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
        example:
          - name!=some-name
      explode: false
    ProjectsSortBy:
      name: sortBy
      in: query
      required: false
      description: Sort results by a parameters.
      schema:
        $ref: '#/components/schemas/ProjectFilterSortFields'
    FilterByProject:
      name: projectId
      in: query
      description: project id to filter by
      required: false
      schema:
        type: string
        example: '1'
    NodeTypeId:
      name: nodeTypeId
      in: path
      required: true
      description: The node-type id
      example: 575c19e8-c7c3-45b0-8290-2f47397a8383
      schema:
        type: string
    Start:
      name: start
      in: query
      description: Start of time range to fetch data from in UTC format.
      required: false
      schema:
        type: string
        format: date-time
        example: '2023-06-06 12:09:18.211'
    End:
      name: end
      in: query
      description: End of time range to fetch data from in UTC format.
      required: false
      schema:
        type: string
        format: date-time
        example: '2023-06-07 12:09:18.211'
    projectId:
      $ref: '#/components/parameters/ProjectId'
    nodeTypeId:
      $ref: '#/components/parameters/NodeTypeId'
    uuid:
      in: path
      name: uuid
      description: Unique identifier of the cluster
      required: true
      schema:
        type: string
        format: uuid
    jobId:
      name: jobId
      in: path
      description: Unique identifier of the job (UUID)
      required: true
      schema:
        type: string
        format: uuid
    deploymentId:
      name: deploymentId
      in: path
      description: the unique Id of the deployment (UUID)
      required: true
      schema:
        type: string
    Roles:
      in: query
      required: false
      name: roles
      schema:
        type: array
        items:
          $ref: '#/components/schemas/Role'
      description: Filter the returned entities to only those with the required role
    CreatedByMe:
      in: query
      required: false
      name: onlyCreatedByMe
      schema:
        type: boolean
      description: Filter the returned entities to only those that created by the requesting subject
    UserType:
      in: query
      required: false
      name: usersType
      schema:
        type: string
        items:
          $ref: '#/components/schemas/UserType'
      description: Available only when SSO enabled
    GroupName:
      in: path
      name: groupName
      required: true
      schema:
        description: Unique identifier of the group
        type: string
        format: string
        example: group1
    NodepoolName:
      in: query
      name: nodepoolName
      schema:
        type: string
        example: default
      required: false
      description: Filter by unique nodepool name.
    ProjectId1:
      in: path
      name: projectId
      schema:
        type: string
      required: true
      description: The unique project-id of the project.
    version:
      in: path
      name: version
      description: run:ai version (semantic version)
      required: true
      schema:
        type: string
        pattern: ^(v(0|[1-9]\\d*))\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$
    os:
      in: path
      name: os
      description: The operating system
      required: true
      schema:
        type: string
        enum:
          - linux
          - darwin
    AssetNameFilter:
      name: name
      in: query
      required: false
      description: Filter results by name.
      schema:
        type: string
    AssetScopeFilter:
      name: scope
      in: query
      required: false
      description: Filter results by scope.
      schema:
        type: string
    AssetProjectFilter:
      name: projectId
      in: query
      required: false
      description: Filter results by project id. if scope filter is project, only assets from the specific project will be included in the response. otherwise, the response will include both project, department, cluster and tenant assets.
      schema:
        type: integer
        format: int32
    IncludeUsageInfo:
      name: usageInfo
      in: query
      required: false
      description: Whether the query should include asset usage information as part of the response.
      schema:
        type: boolean
    ComplyToProject:
      name: complyToProject
      in: query
      required: false
      description: Include workload creation compliance information of an asset, for a given project, as part of the response. To check compliance, you need to provide both project id and workload type.
      schema:
        type: integer
        format: int32
    ComplyToWorkloadType:
      name: complyToWorkloadType
      in: query
      required: false
      description: Include workload creation compliance information of an asset, for a given workload type, as part of the response. To check compliance, you need to provide both project id and workload type.
      schema:
        type: string
        enum:
          - Workspace
          - Training
          - Distributed
          - Inference
    ComplyToReplicaType:
      name: complyToReplicaType
      in: query
      required: false
      description: Include workload creation compliance information of an asset, for a given replica type, as part of the response. To check compliance, you need to provide both project id and workload type. For distributed, replica type should be provided as well.
      schema:
        type: string
        enum:
          - Worker
          - Master
    AssetId:
      name: AssetId
      in: path
      required: true
      description: Unique identifier of the asset.
      schema:
        type: string
        format: uuid
        minLength: 1
    IncludeStatus:
      name: statusInfo
      in: query
      required: false
      description: Whether the query should include asset status information as part of the response.
      schema:
        type: boolean
    SearchName:
      name: searchName
      in: query
      required: false
      description: Filter results that contains searchName.
      schema:
        type: string
      allowReserved: true
    DistributedFrameworkQuery:
      name: distributedFramework
      in: query
      required: false
      description: Filter results to workload of type distributed and distributedFramework.
      schema:
        type: string
      allowReserved: true
    IsDistributedQuery:
      name: isDistributed
      in: query
      required: false
      description: Filter results to workload of type distributed.
      schema:
        type: boolean
      allowReserved: true
    IsTrainingQuery:
      name: isTraining
      in: query
      required: false
      description: Filter results to workload of type training.
      schema:
        type: boolean
      allowReserved: true
    IsWorkspaceQuery:
      name: isWorkspace
      in: query
      required: false
      description: Filter results to workload of type workspace.
      schema:
        type: boolean
      allowReserved: true
    IsInferenceQuery:
      name: isInference
      in: query
      required: false
      description: Filter results to workload of type inference.
      schema:
        type: boolean
      allowReserved: true
    AssetIdsFilter:
      name: assetIds
      in: query
      required: false
      description: Filter results by the ids of the assets. Provided value should be a comma separated string of UUIDs.
      schema:
        type: string
        example: dbf4767e-2fa1-43b0-97a2-7c0cecda180b,550e8400-e29b-41d4-a716-44665544000a
        pattern: ^\b(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})(?:,(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))*\b$
    WorkloadId:
      name: workloadId
      in: path
      required: true
      description: The  Universally Unique Identifier (UUID) of the workload.
      schema:
        type: string
        format: uuid
    WorkloadType:
      name: workloadType
      in: query
      required: false
      description: Policy for a specific workload type.
      schema:
        type: string
        minLength: 1
        enum:
          - Workspace
          - Training
          - Distributed
          - Inference
    PolicyScope:
      name: scope
      in: query
      required: true
      description: The scope that the policy relates to.
      schema:
        type: string
        enum:
          - tenant
          - cluster
          - department
          - project
    ValidateOnly:
      name: validateOnly
      in: query
      required: false
      description: Validate the given policy payload without applying it
      schema:
        type: boolean
    ClusterIdRequired:
      name: clusterId
      in: query
      description: The id of the cluster
      required: true
      schema:
        type: string
        format: uuid
        example: d73a738f-fab3-430a-8fa3-5241493d7128
    scopeIdFilter:
      name: scopeId
      in: query
      description: filter by scope id
      schema:
        type: string
      required: false
    nameFilter:
      name: name
      in: query
      description: filter by name
      schema:
        type: string
      required: false
    originFilter:
      name: origin
      in: query
      description: filter by the origin of the resource. by default, we have to list only customer existing resources (to preserve backward compatibility) to list both existing pvc and assets related pvcs use 'all'.
      schema:
        type: string
        enum:
          - all
          - assets
          - existing
      required: false
    PVCName:
      name: pvcName
      in: path
      description: The pvc name.
      schema:
        type: string
      required: true
    Namespace:
      name: namespace
      in: path
      description: The namespace of the project.
      schema:
        type: string
      required: true
    secretTypeFilter:
      name: secretType
      in: query
      description: filter by secret type. supported values - password, access-key, docker-registry.
      schema:
        type: string
      required: false
    SecretName:
      name: secretName
      in: path
      description: The secret name.
      schema:
        type: string
      required: true
    V1Storage_class_name:
      in: path
      name: storage_class_name
      description: Unique identifier of the storageClass
      required: true
      schema:
        type: string
        format: string
    kotClusterUuid:
      $ref: '#/components/parameters/ClusterUuid'
    departmentId:
      $ref: '#/components/parameters/DepartmentId'
    namespace1:
      $ref: '#/components/parameters/Namespace'
    pvcName:
      $ref: '#/components/parameters/PVCName'
    secretName:
      $ref: '#/components/parameters/SecretName'
    name:
      $ref: '#/components/parameters/nameFilter'
    type:
      $ref: '#/components/parameters/secretTypeFilter'
    scopeId:
      $ref: '#/components/parameters/scopeIdFilter'
    origin:
      $ref: '#/components/parameters/originFilter'
    RoleIdPath:
      name: roleIdPath
      in: path
      required: true
      description: The id of the role to retrieve
      example: 32
      schema:
        type: integer
        format: int32
        minimum: 0
    SubjectTypeOptional:
      name: subjectType
      in: query
      required: false
      description: The type of resource we want to filter by.
      schema:
        type: string
        example: user
    SubjectIdOptional:
      name: subjectIdFilter
      in: query
      required: false
      description: Part of the subject id that we want to filter by.
      deprecated: true
      schema:
        type: string
        example: some.user
    SubjectIds:
      name: subjectIds
      in: query
      required: false
      description: The ids of the subjects to filter the response for.
      explode: false
      schema:
        type: array
        items:
          type: string
          example: some.user@run.ai
    LastUpdated:
      name: lastUpdated
      in: query
      required: false
      description: Filter by last update time.
      schema:
        type: string
        example: '2021-12-14T16:04:15.099Z'
    IncludeDeleted:
      name: includeDeleted
      in: query
      required: false
      description: True to include deleted objects in the result.
      schema:
        type: boolean
        example: false
        default: false
    ScopeTypeOptionalQueryDeprecated:
      name: scopeType
      in: query
      required: false
      description: The type of resource we want to filter by.
      deprecated: true
      schema:
        type: string
        example: project
    ScopeIdOptional:
      name: scopeId
      in: query
      required: false
      description: The scope resource id that we want to filter by.
      schema:
        type: string
        example: '2'
    RoleId:
      name: roleId
      in: query
      required: false
      description: The role id we want to filter by.
      deprecated: true
      schema:
        type: integer
        format: int32
        minimum: 1
    AccessRulesSort:
      name: sortBy
      in: query
      required: false
      description: Sort results by a parameter.
      schema:
        $ref: '#/components/schemas/AccessRulesSortFilterFields'
    AccessRulesFilter:
      name: filterBy
      in: query
      required: false
      description: Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.
      schema:
        type: array
        items:
          type: string
          pattern: ^(subjectId|subjectType|roleId|scopeId|scopeType|roleName|scopeName|createdAt|deletedAt|createdBy)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
      example:
        - name!=some-access-rule-name
        - createdAt>=2023-01-01T00:00:00Z
      explode: false
    AccessRuleId:
      name: accessRuleId
      in: path
      required: true
      description: The id of the access rule to retrieve
      example: 32
      schema:
        type: integer
        format: int32
        minimum: 0
    ScopeTypeQuery:
      $ref: '#/components/parameters/ScopeTypeOptionalQueryDeprecated'
    usersFilterBy:
      name: filterBy
      in: query
      required: false
      description: Filter results by a parameter. Use the format field-name operator value. Operators are <= Less than or equal, >= Greater than or equal, =@ contains. Dates are in ISO 8601 timestamp format and available for operators <= and >=.
      schema:
        type: array
        items:
          type: string
          pattern: ^(username|createdBy|lastLogin|creationTime|lastUpdated|isLocal)(==|<=|>=|=@).+$
        example:
          - username=@test,lastLogin>=2024-09-24T00:00:00.00Z,isLocal==false
      explode: false
    usersSortBy:
      name: sortBy
      in: query
      required: false
      description: Sort results by a parameters.
      schema:
        $ref: '#/components/schemas/UsersFilterSortFields'
    limit:
      name: limit
      in: query
      required: false
      description: The maximum number of entries to return.
      schema:
        type: integer
        format: int32
        default: 500
        minimum: 1
        maximum: 500
    userId:
      name: userId
      in: path
      required: true
      description: The id of the user
      schema:
        type: string
    appId:
      name: appId
      in: path
      required: true
      description: The application id to retrieve
      schema:
        type: string
    redirectUri:
      name: redirect_uri
      in: query
      required: true
      description: The redirect uri to redirect to after the authorization server completes the authorization flow
      schema:
        type: string
    exchangeCode:
      name: code
      in: query
      required: true
      description: The exchange code retrieved from the idp server
      schema:
        type: string
    refreshToken:
      name: refresh_token
      in: query
      required: true
      description: The refresh token retrieved from the idp server
      schema:
        type: string
    isHardDelete:
      name: isHardDelete
      in: query
      description: Boolean indicator for soft/hard delete
      schema:
        type: boolean
    appType:
      name: appType
      in: query
      required: true
      description: The type of application
      schema:
        type: string
        enum:
          - Agent
          - MimirWriter
    code:
      $ref: '#/components/parameters/exchangeCode'
    redirect_url:
      $ref: '#/components/parameters/redirectUri'
    refresh_token:
      $ref: '#/components/parameters/refreshToken'
    app_type:
      $ref: '#/components/parameters/appType'
    is_hard_delete:
      $ref: '#/components/parameters/isHardDelete'
    WorkloadsFilter:
      name: filterBy
      in: query
      required: false
      description: Filter results by a parameter. Use the format field-name operator value. Operators are `==` Equals, `!=` Not equals, `<=` Less than or equal, `>=` Greater than or equal, `=@` contains, `!@` Does not contain, `=^` Starts with and `=$` Ends with. Dates are in ISO 8601 timestamp format and available for operators `==`, `!=`, `<=` and `>=`.
      schema:
        type: array
        items:
          type: string
          pattern: ^(type|name|clusterId|projectId|projectName|departmentId|departmentName|createdAt|deletedAt|submittedBy|phase|completedAt|nodepool|distributedFramework|allocatedGPU|)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
        example:
          - name!=some-workload-name
          - allocatedGPU>=2
          - createdAt>=2021-01-01T00:00:00Z
      explode: false
    Deleted:
      name: deleted
      in: query
      description: Return only deleted resources when `true`.
      schema:
        type: boolean
    WorkloadsSort:
      name: sortBy
      in: query
      required: false
      description: Sort results by a parameter.
      schema:
        type: string
        enum:
          - type
          - name
          - clusterId
          - projectId
          - projectName
          - departmentId
          - departmentName
          - createdAt
          - deletedAt
          - submittedBy
          - phase
          - completedAt
          - nodepool
          - distributedFramework
          - allocatedGPU
    TelemetryGroupBy1:
      name: groupBy
      in: query
      description: Group workloads by field.
      explode: false
      required: false
      schema:
        type: array
        maxItems: 2
        items:
          type: string
          enum:
            - ClusterId
            - DepartmentId
            - ProjectId
            - Type
            - CurrentNodepools
            - Phase
    TelemetryType2:
      name: telemetryType
      in: query
      required: true
      description: Specifies the telemetry type.
      schema:
        $ref: '#/components/schemas/WorkloadTelemetryType'
    PodsSort:
      name: sortBy
      in: query
      required: false
      description: Sort results using a parameter.
      schema:
        type: string
        enum:
          - clusterId
          - nodeName
          - currentNodepool
          - createdAt
          - completedAt
          - deletedAt
    PodsFilter:
      name: filterBy
      in: query
      required: false
      description: Filter results using a parameter. Use the format field-name operator value. Operators are `==` Equals, `!=` Not equals, `<=` Less than or equal, `>=` Greater than or equal, `=@` contains, `!@` Does not contains, `=^` Starts with and `=$` Ends with. Dates are in ISO 8601 timestamp format and available for operators `==`, `!=`, `<=` and `>=`.
      schema:
        type: array
        items:
          type: string
          pattern: ^(clusterId|nodeName|currentNodepool|createdAt|completedAt|deletedAt)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
        example:
          - nodeName!=some-node-name
      explode: false
    PodsQueryVerbosity:
      name: verbosity
      in: query
      required: false
      description: |
        response verbosity level. if full, the response includes workloadName and projectName fields.
      example: full
      schema:
        $ref: '#/components/schemas/PodVerbosity'
    Completed:
      name: completed
      in: query
      description: Return only completed resources when 'true', return only non-completed resources when 'false'. By default, or when empty, returns all resources.
      schema:
        type: string
        default: all
    PodId:
      name: podId
      in: path
      description: The requested pod id.
      schema:
        type: string
        format: uuid
      required: true
    PodMetricTypes:
      name: metricType
      in: query
      required: true
      description: Specify which metric data to request. Advanced GPU metrics are only supported if the 'Advanced GPU Metrics' feature flag in the settings is enabled.
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/PodMetricType'
    WorkloadMetricTypes:
      name: metricType
      in: query
      required: true
      description: Specify which data to request.
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/WorkloadMetricType'
    InferenceWorkloadMetricTypes:
      name: metricType
      in: query
      required: true
      description: Specify which data to request.
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/InferenceWorkloadMetricType'
    InferencePodMetricTypes:
      name: metricType
      in: query
      required: true
      description: Specifies metrics data to request. Inference metrics are only available for inference workloads.
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/InferencePodMetricType'
    workloadId:
      $ref: '#/components/parameters/WorkloadId'
    podId:
      $ref: '#/components/parameters/PodId'
    DatavolumesRequestType:
      name: requestType
      in: query
      required: true
      description: Which datavolumes would be returned in the response. Originated - datavolumes that are originated in the permitted scopes of the caller. UsableInProject - datavolumes that can be used in a specific project; if you use this value, you must also provide the project ID in the "usableInProjectId" query param.
      schema:
        $ref: '#/components/schemas/DatavolumeRequestType'
    DatavolumesUsableInProjectId:
      name: usableInProjectId
      in: query
      required: false
      description: Only when using "UsableInProject" requestType; Filter results for only datavolumes that are shared with - or originated in - the project.
      schema:
        type: string
        example: '5'
    DatavolumesSortBy:
      name: sortBy
      in: query
      required: false
      description: Sort results by a parameters.
      schema:
        type: string
        enum:
          - name
          - projectId
          - clusterId
          - departmentId
          - projectName
          - createdAt
          - createdBy
          - phase
    DatavolumesFilter:
      name: filterBy
      in: query
      required: false
      description: Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.
      schema:
        type: array
        items:
          type: string
          pattern: ^(name|projectId|clusterId|departmentId|projectName|createdAt|createdBy|phase)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
        example:
          - name!=some-datavolume-name
      explode: false
    DatavolumeId:
      name: datavolumeId
      in: path
      required: true
      description: The id of the datavolume to retrieve
      example: 71f69d83-ba66-4822-adf5-55ce55efd210
      schema:
        type: string
        format: uuid
    OperatingSystem:
      name: operatingSystem
      in: path
      required: true
      description: The operating system name.
      schema:
        type: string
        enum:
          - linux
          - windows
          - darwin
        minLength: 4
        example: linux
    Architecture:
      name: architecture
      in: path
      required: true
      description: The architecture type.
      schema:
        type: string
        minLength: 4
        example: arm64
    DocumentName:
      name: documentName
      in: path
      required: true
      description: The manual document name.
      schema:
        type: string
        minLength: 4
        pattern: ^[A-Za-z0-9_]+\.md$
        example: runai.md
    AuditLogSort:
      name: sortBy
      in: query
      required: false
      description: Sort results by a parameters.
      schema:
        type: string
        enum:
          - timestamp
          - subject
          - subject_type
          - source_ip
          - action
          - http_method
          - result
          - url
          - entity_type
          - entity_name
          - entity_id
    AuditLogFilter:
      name: filterBy
      in: query
      required: false
      explode: false
      description: Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.
      schema:
        type: array
        items:
          type: string
          pattern: ^(timestamp|subject|subject_type|source_ip|action|result|url|entity_type|entity_name|cluster_name)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
        example:
          - cluster_name==my-cluster_name
          - entity_type==cluster,entity_name==test
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer authentication
x-tagGroups:
  - name: Organizations
    tags:
      - Clusters
      - Departments
      - Reports
      - NodePools
      - Nodes
      - Projects
      - Tenant
      - Logo
      - Researcher Command Line Interface
      - Administrator Command Line Interface
  - name: Authentication and Authorization
    tags:
      - Access rules
      - Permissions
      - Applications
      - Roles
      - Tokens
      - Users
  - name: Audit
    tags:
      - Audit-API
      - AuditLogs
  - name: Datavolumes
    tags:
      - Datavolumes-API
  - name: Workloads
    tags:
      - Deployments
      - Events
      - Jobs
      - Pods
      - Workloads-API
      - Workspaces
      - Trainings
      - Inferences
      - Distributed
      - Workloads batch
  - name: Workload assets
    tags:
      - Compute
      - Credentials
      - Datasources
      - Environment
      - Storage Classes
      - Git
      - HostPath
      - NFS
      - PVC
      - Registry
      - S3
      - ConfigMap
      - Secret
      - Template
  - name: Policies
    tags:
      - Policy