NVIDIA Run:ai Workloads API

Workloads are both native platform workloads, Workspaces, Training and Inference, as well as workloads that originate from third-party ML frameworks, tools, or the broader Kubernetes ecosystems. For more details on the supported workloads, see [Introduction to workloads](https://run-ai-docs.nvidia.com/saas/workloads-in-nvidia-run-ai/introduction-to-workloads). Workloads endpoints allow you to list, retrieve, count, and view telemetry or metrics data for all workload types in your environment.

OpenAPI Specification

runai-workloads-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 Workloads 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: Workloads
  description: 'Workloads are both native platform workloads, Workspaces, Training and Inference, as well as workloads that originate from third-party ML frameworks, tools, or the broader Kubernetes ecosystems. For more details on the supported workloads, see [Introduction to workloads](https://run-ai-docs.nvidia.com/saas/workloads-in-nvidia-run-ai/introduction-to-workloads). Workloads endpoints allow you to list, retrieve, count, and view telemetry or metrics data for all workload types in your environment.

    '
paths:
  /api/v1/workloads:
    get:
      summary: List workloads.
      description: Retrieve a list of active workloads with details.
      operationId: get_workloads
      tags:
      - Workloads
      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'
      - $ref: '#/components/parameters/Search'
      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
      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
      parameters:
      - $ref: '#/components/parameters/Deleted'
      - $ref: '#/components/parameters/WorkloadsFilter'
      - $ref: '#/components/parameters/Search'
      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.
      operationId: get_workloads_telemetry
      description: "Retrieves workload data by telemetry type. Optionally filter by specific workload phases.\n\nTelemetry Types:\n- WORKLOADS_COUNT: Count of workloads\n- GPU_ALLOCATION: GPU allocation metrics\n- PENDING_TIME_DISTRIBUTION: Distribution of workloads by current pending time (time since entering Pending phase).\n\n\n\n\n\n\n  For this type, results are automatically grouped by 4 time buckets and any additional groupBy parameters.\n"
      tags:
      - Workloads
      parameters:
      - $ref: '#/components/parameters/FilterByCluster'
      - $ref: '#/components/parameters/FilterByNodepoolName'
      - $ref: '#/components/parameters/FilterByDepartment'
      - $ref: '#/components/parameters/TelemetryGroupBy1'
      - $ref: '#/components/parameters/TelemetryType2'
      - $ref: '#/components/parameters/FilterByPhases'
      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/{workloadId}/metrics:
    get:
      summary: Get workload metrics data.
      operationId: get_workload_metrics
      description: Retrieves workloads data metrics from the metrics database. Use in reporting and analysis tools.
      tags:
      - Workloads
      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/MetricsCompositeResponse'
            text/csv: {}
        '207':
          description: Partial success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsCompositeResponse'
        '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'
components:
  schemas:
    WorkloadsExtendedResource:
      description: Quantity of an extended resource.
      type:
      - object
      - 'null'
      properties:
        resource:
          description: The name of the extended resource (mandatory)
          type:
          - string
          - 'null'
          example: hardware-vendor.example/foo
          minLength: 1
        quantity:
          description: The requested quantity for the given resource.
          type:
          - string
          - 'null'
          example: 2
          minLength: 1
        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
          - 'null'
          example: false
    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'
    WorkloadRequestResources:
      type:
      - object
      - 'null'
      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'
        extendedResources:
          $ref: '#/components/schemas/WorkloadsExtendedResources'
    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'
    WorkloadAllocatedResources:
      type:
      - object
      - 'null'
      properties:
        gpu:
          type:
          - number
          - 'null'
          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.
        gpuMemory:
          type:
          - string
          - 'null'
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 200Mi
        cpu:
          type:
          - number
          - 'null'
          format: double
          description: States the amount of CPU cores used by the workload running.
          example: 0.5
        cpuMemory:
          type:
          - string
          - 'null'
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          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
    PhaseReason:
      type: string
      enum:
      - NonPreemptibleOverQuota
      - OverLimit
    MetricsCompositeResponse:
      type: object
      required:
      - measurements
      properties:
        measurements:
          type: array
          items:
            $ref: '#/components/schemas/MeasurementResponse'
        histogram:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/HistogramSeries'
      example:
        measurements:
        - type: ALLOCATED_GPU
          labels:
            gpu: '0'
          values:
          - value: '85'
            timestamp: '2024-12-20T14:30:00Z'
          - value: '92'
            timestamp: '2024-12-20T14:30:30Z'
          - value: '78'
            timestamp: '2024-12-20T14:37:00Z'
        histogram:
        - type: NIM_TIME_TO_FIRST_TOKEN_SECONDS
          values:
          - timestamp: '2024-12-20T14:30:00Z'
            data:
              '0.001': '45'
              '0.005': '178'
              '0.01': '312'
              '0.05': '624'
              '0.1': '812'
              '0.5': '980'
              '1.0': '1004'
              '2.0': '1015'
              +Inf: '1024'
          - timestamp: '2024-12-20T14:30:30Z'
            data:
              '0.001': '32'
              '0.005': '152'
              '0.01': '288'
              '0.05': '576'
              '0.1': '756'
              '0.5': '908'
              '1.0': '932'
              '2.0': '943'
              +Inf: '960'
        - type: NIM_TIME_TO_FIRST_TOKEN_SECONDS_PERCENTILES
          values:
          - timestamp: '2024-12-20T14:30:00Z'
            data:
              p50: '0.0734'
              p90: '0.1892'
              p99: '0.2847'
          - timestamp: '2024-12-20T14:30:30Z'
            data:
              p50: '0.0823'
              p90: '0.2134'
              p99: '0.3156'
    SourceApi:
      type:
      - string
      - 'null'
      enum:
      - WorkloadsV2
    WorkloadsExtendedResources:
      description: Set of extended resources with their quantity
      type:
      - array
      - 'null'
      items:
        $ref: '#/components/schemas/WorkloadsExtendedResource'
    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
    Source:
      type: string
      enum:
      - CLI
      - Control-plane
      - Other
    HistogramValue:
      type: object
      required:
      - timestamp
      - data
      properties:
        timestamp:
          type:
          - string
          - 'null'
          format: date-time
        data:
          type: object
          additionalProperties:
            type: string
    RequestResourceQuantity:
      type:
      - object
      - 'null'
      properties:
        limit:
          type:
          - string
          - 'null'
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 2G
        request:
          type:
          - string
          - 'null'
          pattern: ^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$
          example: 200M
    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
      - NIM_NUM_REQUESTS_RUNNING
      - NIM_NUM_REQUESTS_WAITING
      - NIM_NUM_REQUEST_MAX
      - NIM_REQUEST_SUCCESS_TOTAL
      - NIM_REQUEST_FAILURE_TOTAL
      - NIM_GPU_CACHE_USAGE_PERC
      - NIM_TIME_TO_FIRST_TOKEN_SECONDS
      - NIM_E2E_REQUEST_LATENCY_SECONDS
      - NIM_TIME_TO_FIRST_TOKEN_SECONDS_PERCENTILES
      - NIM_E2E_REQUEST_LATENCY_SECONDS_PERCENTILES
      - NVLINK_BANDWIDTH_TOTAL
    RequestedPods:
      type: object
      properties:
        number:
          type:
          - integer
          - 'null'
          format: int32
          example: 1
        min:
          type:
          - integer
          - 'null'
          format: int32
          example: 2
        max:
          type:
          - integer
          - 'null'
          format: int32
          example: 5
        parallelism:
          type:
          - integer
          - 'null'
          format: int32
          description: specifies how many Pods can run in parallel
          example: 3
        completions:
          type:
          - integer
          - 'null'
          description: specifies how many Pods should terminate successfully before the Workload is completed
          format: int32
          example: 5
    HistogramSeries:
      type: object
      required:
      - type
      - values
      properties:
        type:
          type: string
          description: specifies what data returned
          example: NIM_TIME_TO_FIRST_TOKEN_SECONDS
        values:
          type: array
          items:
            $ref: '#/components/schemas/HistogramValue'
    Phase:
      type: string
      enum:
      - Creating
      - Initializing
      - Resuming
      - Pending
      - Deleting
      - Running
      - Updating
      - Stopped
      - Stopping
      - Degraded
      - Failed
      - Completed
      - Terminating
      - Unknown
    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
        authorizationType:
          type: string
          description: 'Specifies who can access the connection URL:

            - `authenticatedUsers`: Any authenticated user or service account can access the URL; the authorizedUsers and authorizedGroups fields are ignored.

            - `authorizedUsers`: Only users listed in the authorizedUsers field are allowed to access the URL; the authorizedGroups field is ignored.

            - `authorizedGroups`: Only members of user groups listed in the authorizedGroups field are allowed to access the URL; the authorizedUsers field is ignored.

            If not specified, authorization is determined by whether authorizedUsers or authorizedGroups is present. If both fields are set, this results in an error. If neither is set, any authenticatedUser can access.

            '
          enum:
          - public
          - authenticatedUsers
          - authorizedUsersOrGroups
        authorizedUsers:
          type: array
          description: List of users or service accounts that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
          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
    OrgType:
      type: string
      enum:
      - PROJECT
      - DEPARTMENT
    Conditions:
      type: array
      items:
        $ref: '#/components/schemas/Condition1'
      x-schema-name: Conditions
    ReplicaType:
      type:
      - string
      - 'null'
      enum:
      - Master
      - Worker
      - Leader
    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:
          - string
          - 'null'
          allOf:
          - $ref: '#/components/schemas/OrgType'
        userMessage:
          type:
          - string
          - 'null'
          example: You have reached the limit of non-preemptible resources
    TenantId:
      description: The id of the tenant.
      type: integer
      format: int32
      example: 1001
    ClusterId:
      description: The id of the cluster.
      type: string
      format: uuid
      example: 71f69d83-ba66-4822-adf5-55ce55efd210
    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
      - category
      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
          - 'null'
          format: date-time
          example: '2022-08-12T19:28:24.131Z'
        type:
          type: string
          example: runai-job
        name:
          type: string
          example: very-important-job
        id:
          type: string
          format: uuid
        priority:
          type:
          - integer
          - 'null'
          format: int32
          example: 50
        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
          - 'null'
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
        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
          - 'null'
        environmentVariables:
          type: object
          additionalProperties:
            type: string
        command:
          type: string
          example: sleep
        arguments:
          type: string
          example: '1000'
        phaseReason:
          type:
          - string
          - 'null'
          allOf:
          - $ref: '#/components/schemas/PhaseReason'
        idleGpus:
          deprecated: true
          type:
          - integer
          - 'null'
          example: 3
          description: deprecated. use idleAllocatedGpus instead
        idleAllocatedGpus:
          type:
          - number
          - 'null'
          description: sum of idle allocated gpus in the workload
          example: 1
        totalPendingTimeSeconds:
          type:
          - integer
          - 'null'
          description: The total cumulative time, in seconds, that the workload has spent in the Pending phase since submission.
          example: 60
        totalRunningTimeSeconds:
          type:
          - integer
          - 'null'
          description: The total cumulative time, in seconds, that the workload has spent in the Running phase since submission.
          example: 60
        category:
          type: string
          example: Train
          description: Category Description
        guaranteedRuntimeEndsAt:
          type:
          - string
          - 'null'
          format: date-time
          example: '2025-08-01T03:49:52.531Z'
          description: A timestamp indicating when the workload will reach its minimum guaranteed runtime, as defined by minGuaranteedRuntime. Until this time, the workload is considered non-preemptible and cannot be interrupted by higher-priority workloads.
        aiApplicationId:
          type: string
        aiApplicationName:
          type: string
        sourceApi:
          $ref: '#/components/schemas/SourceApi'
        topology:
          type:
          - object
          - 'null'
          properties:
            name:
              type: string
            preferredPlacement:
              type: string
            requiredPlacement:
              type: string
    WorkloadDetailed:
      allOf:
      - $ref: '#/components/schemas/Workload'
      - type: object
        properties:
          pendingSchedulingMessages:
            type:
            - array
            - 'null'
            items:
              $ref: '#/components/schemas/PendingSchedulingMessage'
    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
    Workloads:
      type: array
      items:
        $ref: '#/components/schemas/Workload'
      x-schema-name: Workloads
    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 the condition transitioned from one status to another.
          type:
          - string
          - 'null'
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
    GpuRequestType:
      description: Sets the unit type for GPU resources requests. Stated in terms of portion or memory. 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` or `memory`.
      type:
      - string
      - 'null'
      minLength: 1
      enum:
      - portion
      - memory
    RequestResourceCores:
      type:
      - object
      - 'null'
      properties:
        limit:
          type:
          - number
          - 'null'
          format: double
          example: 1.5
        request:
          type:
          - number
          - 'null'
          format: double
          example: 1
    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
    WorkloadTelemetryType:
      type: string
      description: Select a telemetry type.
      enum:
      - WORKLOADS_COUNT
      - GPU_ALLOCATION
      - PENDING_TIME_DISTRIBUTION
  responses:
    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
           

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