NVIDIA Run:ai Departments API

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://run-ai-docs.nvidia.com/saas/platform-management/aiinitiatives/organization/departments).

OpenAPI Specification

runai-departments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: latest
  description: '# Introduction


    The NVIDIA Run:ai Control-Plane API reference is a guide that provides an easy-to-use programming interface for adding various tasks to your application, including workload submission, resource management, and administrative operations.


    NVIDIA Run:ai APIs are accessed using *bearer tokens*. To obtain a token, you need to create a **Service account** through the NVIDIA Run:ai user interface.

    To create a service account, in your UI, go to Access → Service Accounts (for organization-level service accounts) or User settings → Access Keys (for user access keys), and create a new one.


    After you have created a new service account, you will need to assign it access rules.

    To assign access rules to the service account, see [Create access rules](https://run-ai-docs.nvidia.com/saas/infrastructure-setup/authentication/accessrules#create-or-delete-rules).

    Make sure you assign the correct rules to your service account. Use the [Roles](https://run-ai-docs.nvidia.com/saas/infrastructure-setup/authentication/roles) to assign the correct access rules.


    To get your access token, follow the instructions in [Request a token](https://run-ai-docs.nvidia.com/saas/reference/api/rest-auth/#request-an-api-token).

    '
  title: NVIDIA Run:ai Access Keys Departments API
  x-logo:
    url: https://api.redocly.com/registry/raw/runai-xq8/saas/latest/public/runai-logo-api.png
    altText: NVIDIA Run:ai
    href: https://run.ai
  license:
    name: NVIDIA Run:ai
    url: https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-software-license-agreement/
servers:
- url: https://app.run.ai
security:
- bearerAuth: []
tags:
- name: Departments
  description: "Departments, in the hierarchy of resource allocation, are above Projects. A Department can contain multiple Projects, and has its own quotas. \nA Department's quota supersedes the total of the Project quotas in the Department, so tt is recommended \nthat a Department's quota be the total, or more than of all the Project quotas in the Department. \nFor further information see, [Working with Departments](https://run-ai-docs.nvidia.com/saas/platform-management/aiinitiatives/organization/departments).\n"
paths:
  /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'
        '409':
          $ref: '#/components/responses/409Conflict'
        '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/{departmentId}/metrics:
    get:
      summary: Get department metrics data.
      operationId: get_department_metrics
      description: Retrieves department data metrics from the metrics database. Use in reporting and analysis tools.
      tags:
      - Departments
      parameters:
      - $ref: '#/components/parameters/DepartmentId'
      - $ref: '#/components/parameters/OrgUnitMetricTypes'
      - $ref: '#/components/parameters/StartRequired'
      - $ref: '#/components/parameters/EndRequired'
      - $ref: '#/components/parameters/NumberOfSamples'
      - $ref: '#/components/parameters/FilterByNodepoolName'
      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/departments/telemetry:
    get:
      summary: Get departments telemetry
      operationId: get_departments_telemetry
      tags:
      - Departments
      parameters:
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/FilterByNodepoolName'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/TelemetryGroupByDepartment'
      - $ref: '#/components/parameters/TelemetryType1'
      responses:
        '200':
          description: Executed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelemetryResponse'
        '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/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:
                $ref: '#/components/schemas/CountResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '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). \nIf you use a `start` date, an `end` date is required.\n"
      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. \nUse a time range to return historical data (optional). If you use a `start` date, an `end` date is required.\n"
      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/{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'
  /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
components:
  schemas:
    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'
    MetricsResponse:
      type: object
      required:
      - measurements
      properties:
        measurements:
          type: array
          items:
            $ref: '#/components/schemas/MeasurementResponse'
    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
    NodePoolResources:
      required:
      - id
      properties:
        id:
          type: number
          description: Node pool id.
          example: 3
        name:
          type: string
          description: Node pool name.
          example: default
    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
          format: double
          example: 10
          description: The average gpu devices allocation of the project/department.
        averageGpuUtilization:
          type: number
          format: double
          example: 95
          description: The average gpu utilization percentage of the project/department.
        averageGpuMemoryUtilization:
          type:
          - number
          - 'null'
          format: double
          example: 95
          description: The average gpu memory utilization percentage of the project/department. Only available for cluster versions >= 2.22.
        updatedAt:
          type: string
          format: date-time
          example: '2021-08-01T00:00:00Z'
    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'
    OrgUnitMetricType:
      type: string
      description: Specify which metric data to request.
      enum:
      - GPU_QUOTA
      - CPU_QUOTA_MILLICORES
      - CPU_MEMORY_QUOTA_MB
      - GPU_ALLOCATION
      - CPU_ALLOCATION_MILLICORES
      - CPU_MEMORY_ALLOCATION_MB
      - GPU_MEMORY_UTILIZATION
    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.
    ClusterName:
      type: string
      example: cluster-a
    units:
      type: string
      enum:
      - Mib
      - MB
      - GB
    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'
    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'
    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.
    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'
    MeasurementResponse:
      type: object
      required:
      - type
      - values
      properties:
        type:
          type: string
          description: specifies what data returned
          example: ALLOCATED_GPU
        labels:
          type:
          - object
          - 'null'
          description: labels of the metric measurement
          example: '{''gpu'': ''3''}'
          additionalProperties:
            type: string
        values:
          type:
          - array
          - 'null'
          items:
            type: object
            required:
            - value
            - timestamp
            properties:
              value:
                type: string
                example: '85'
              timestamp:
                type:
                - string
                - 'null'
                format: date-time
                example: '2023-06-06 12:09:18.211'
    NodepoolName:
      type: string
      example: nodepoola
    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
    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'
    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.
    DepartmentUpdateRequest:
      allOf:
      - $ref: '#/components/schemas/DataUpdatableDepartmentFields'
      - properties:
          resources:
            type: array
            items:
              $ref: '#/components/schemas/ResourcesNullable'
            description: Resources assigned to this Organization per Node Pool
    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
    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
            - 'null'
            items:
              $ref: '#/components/schemas/DepartmentProjectChild'
          status:
            type:
            - object
            - 'null'
            properties:
              quotaStatus:
                $ref: '#/components/schemas/QuotaStatus'
          totalResources:
            $ref: '#/components/schemas/TotalResources'
          resources:
            type: array
            items:
              $ref: '#/components/schemas/Resources'
            description: Resources assigned to this Organization per Node Pool
    ResourcesNullable:
      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
          - 'null'
        gpu:
          allOf:
          - $ref: '#/components/schemas/NonNullResource'
          - description: GPU number to the project in the node pool. Default

# --- truncated at 32 KB (65 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/runai/refs/heads/main/openapi/runai-departments-api-openapi.yml