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.0.3
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:
  parameters:
    FilterByPhases:
      name: filterByPhases
      in: query
      required: false
      description: Filter workloads by specific phases. If not specified, all phases are included.
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/Phase'
        example:
        - Running
        - Failed
    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
          - Category
    FilterByNodepoolName:
      name: nodepoolName
      in: query
      description: Filter using the nodepool.
      required: false
      schema:
        type: string
        example: default
    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'
    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
    FilterByDepartment:
      name: departmentId
      in: query
      description: Filter using the department id.
      required: false
      schema:
        type: string
        example: '1'
    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|idleGpus|idleAllocatedGpus|phaseUpdatedAt|category|totalPendingTimeSeconds|totalRunningTimeSeconds|priority|priorityClassName|guaranteedRuntimeEndsAt|aiApplicationId|aiApplicationName)(==|!=|<=|>=|=@|!@|=\^|=\$).+$
        example:
        - name!=some-workload-name
        - allocatedGPU>=2
        - createdAt>=2021-01-01T00:00:00Z
      explode: false
    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'
    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
    Search:
      name: search
      in: query
      required: false
      description: Filter results by a free text search.
      schema:
        type: string
        example: test project
    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
    TelemetryType2:
      name: telemetryType
      in: query
      required: true
      description: Specifies the telemetry type.
      schema:
        $ref: '#/components/schemas/WorkloadTelemetryType'
    Deleted:
      name: deleted
      in: query
      description: Return only deleted resources when `true`.
      schema:
        type: boolean
    SortOrder:
      name: sortOrder
      in: query
      required: false
      description: Sort results in descending or ascending order.
      schema:
        type: string
        enum:
        - asc
        - desc
        default: asc
    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
        - idleGpus
        - idleAllocatedGpus
        - phaseUpdatedAt
        - category
        - priority
        - totalPendingTimeSeconds
        - totalRunningTimeSeconds
        - priorityClassName
        - guaranteedRuntimeEndsAt
        - aiApplicationId
        - aiApplicationName
    WorkloadMetricTypes:
      name: metricType
      in: query
      required: true
      description: Specify which data to request.
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/WorkloadMetricType'
    WorkloadId:
      name: workloadId
      in: path
      required: true
      description: The  Universally Unique Identifier (UUID) of the workload.
      schema:
        type: string
        format: uuid
    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
  schemas:
    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
    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
      minLength: 1
      enum:
      - portion
      - memory
      nullable: true
    WorkloadTelemetryType:
      type: string
      description: Select a telemetry type.
      enum:
      - WORKLOADS_COUNT
      - GPU_ALLOCATION
      - PENDING_TIME_DISTRIBUTION
    Workloads:
      type: array
      items:
        $ref: '#/components/schemas/Workload'
      x-schema-name: Workloads
    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
    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.
        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'
    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'
    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'
    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
    HistogramValue:
      type: object
      required:
      - timestamp
      - data
      properties:
        timestamp:
          type: string
          format: date-time
          nullable: true
        data:
          type: object
          additionalProperties:
            type: string
    TenantId:
      description: The id of the tenant.
      type: integer
      format: int32
      example: 1001
    Conditions:
      type: array
      items:
        $ref: '#/components/schemas/Condition1'
      x-schema-name: Conditions
    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
    ClusterId:
      description: The id of the cluster.
      type: string
      format: uuid
      example: 71f69d83-ba66-4822-adf5-55ce55efd210
    Phase:
      type: string
      enum:
      - Creating
      - Initializing
      - Resuming
      - Pending
      - Deleting
      - Running
      - Updating
      - Stopped
      - Stopping
      - Degraded
      - Failed
      - Completed
      - Terminating
      - Unknown
    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
          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'
    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
          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: string
          nullable: true
          allOf:
          - $ref: '#/components/schemas/PhaseReason'
        idleGpus:
          deprecated: true
          type: integer
          nullable: true
          example: 3
          description: deprecated. use idleAllocatedGpus instead
        idleAllocatedGpus:
          type: number
          description: sum of idle allocated gpus in the workload
          nullable: true
          example: 1
        totalPendingTimeSeconds:
          type: integer
          description: The total cumulative time, in seconds, that the workload has spent in the Pending phase since submission.
          nullable: true
          example: 60
        totalRunningTimeSeconds:
          type: integer
          description: The total cumulative time, in seconds, that the workload has spent in the Running phase since submission.
          nullable: true
          example: 60
        category:
          type: string
          example: Train
          description: Category Description
        guaranteedRuntimeEndsAt:
          type: string
          format: date-time
          example: '2025-08-01T03:49:52.531Z'
          nullable: true
          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
          nullable: true
          properties:
            name:
              type: string
            preferredPlacement:
              type: string
            requiredPlacement:
              type: string
    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
    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
    WorkloadsExtendedResources:
      description: Set of extended resources with their quantity
      type: array
      items:
        $ref: '#/components/schemas/WorkloadsExtendedResource'
      nullable: 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 the condition transitioned from one status to another.
          type: string
          nullable: true
          format: date-time
          example: '2022-01-01T03:49:52.531Z'
    MetricsCompositeResponse:
      type: object
      required:
      - measurements
      properties:
        measurements:
          type: array
          items:
            $ref: '#/components/schemas/MeasurementResponse'
        histogram:
          type: array
          nullable: true
          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'
       

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