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. Workloads endpoints allow you to list, retrieve, count, and view telemetry or metrics data for all workload types in your environment.
Retrieve a list of active workloads with details.
Executed successfully.
Unauthorized
Forbidden
unexpected error
unexpected error
{- "next": 1,
- "workloads": [
- {
- "tenantId": 1001,
- "runningPods": 1,
- "phaseUpdatedAt": "2022-06-08T11:28:24.131Z",
- "k8sPhaseUpdatedAt": "2022-06-08T11:28:24.131Z",
- "updatedAt": "2022-06-08T11:28:24.131Z",
- "source": "CLI",
- "deletedAt": "2022-08-12T19:28:24.131Z",
- "type": "runai-job",
- "name": "very-important-job",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "priority": 50,
- "priorityClassName": "high-priority",
- "submittedBy": "researcher@run.ai",
- "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
- "projectName": "proj-1",
- "projectId": "1",
- "departmentName": "department-1",
- "departmentId": "1",
- "namespace": "runai-proj-1",
- "createdAt": "2022-01-01T03:49:52.531Z",
- "workloadRequestedResources": {
- "gpuRequestType": "portion",
- "gpu": {
- "limit": 1.5,
- "request": 1
}, - "gpuMemory": {
- "limit": "2G",
- "request": "200M"
}, - "cpu": {
- "limit": 1.5,
- "request": 1
}, - "cpuMemory": {
- "limit": "2G",
- "request": "200M"
}, - "migProfile": [
- "1g.5gb"
], - "extendedResources": [
- {
- "resource": "hardware-vendor.example/foo",
- "quantity": 2,
- "exclude": false
}
]
}, - "podsRequestedResources": {
- "gpuRequestType": "portion",
- "gpu": {
- "limit": 1.5,
- "request": 1
}, - "gpuMemory": {
- "limit": "2G",
- "request": "200M"
}, - "cpu": {
- "limit": 1.5,
- "request": 1
}, - "cpuMemory": {
- "limit": "2G",
- "request": "200M"
}, - "migProfile": [
- "1g.5gb"
], - "extendedResources": [
- {
- "resource": "hardware-vendor.example/foo",
- "quantity": 2,
- "exclude": false
}
]
}, - "allocatedResources": {
- "gpu": 1.5,
- "migProfile": [
- "1g.5gb"
], - "gpuMemory": "200Mi",
- "cpu": 0.5,
- "cpuMemory": "0B",
- "extendedResources": [
- {
- "resource": "hardware-vendor.example/foo",
- "quantity": 2,
- "exclude": false
}
]
}, - "actionsSupport": {
- "delete": true,
- "suspend": true
}, - "phase": "Creating",
- "conditions": [
- {
- "type": "Ready",
- "status": "False",
- "message": "Resource validation failed: ...",
- "reason": "ErrorConfig",
- "lastTransitionTime": "2022-01-01T03:49:52.531Z"
}
], - "phaseMessage": "Not enough resources in the requested nodepool",
- "k8sPhase": "Pending",
- "requestedPods": {
- "number": 1,
- "min": 2,
- "max": 5,
- "parallelism": 3,
- "completions": 5
}, - "requestedNodePools": [
- "default"
], - "currentNodePools": [
- "default"
], - "completedAt": "2022-01-01T03:49:52.531Z",
- "images": [
- "alpine:latest"
], - "urls": [
- "string"
], - "datasources": [
- {
- "type": "pvc",
- "name": "my-pvc-datasource-1",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
], - "environments": [
- {
- "connections": [
- {
- "name": "my-pytorch-env",
- "toolType": "pytorch",
- "connectionType": "ExternalUrl",
- "authorizationType": "public",
- "authorizedUsers": [
- "user@company.ai",
- "another@company.ai"
], - "authorizedGroups": [
- "group-a",
- "group-b"
], - "containerPort": 8080
}
], - "name": "pytorch",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "replicaType": "Master"
}
], - "externalConnections": [
- {
- "name": "my-pytorch-env",
- "toolType": "pytorch",
- "connectionType": "ExternalUrl",
- "authorizationType": "public",
- "authorizedUsers": [
- "user@company.ai",
- "another@company.ai"
], - "authorizedGroups": [
- "group-a",
- "group-b"
], - "containerPort": 8080
}
], - "distributedFramework": "Pytorch",
- "additionalFields": { },
- "preemptible": true,
- "environmentVariables": {
- "property1": "string",
- "property2": "string"
}, - "command": "sleep",
- "arguments": "1000",
- "phaseReason": "NonPreemptibleOverQuota",
- "idleGpus": 3,
- "idleAllocatedGpus": 1,
- "totalPendingTimeSeconds": 60,
- "totalRunningTimeSeconds": 60,
- "category": "Train",
- "guaranteedRuntimeEndsAt": "2025-08-01T03:49:52.531Z",
- "aiApplicationId": "string",
- "aiApplicationName": "string",
- "sourceApi": "WorkloadsV2"
}
]
}
Retrieve workload data using a workloadId
.
Executed successfully.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
unexpected error
{- "tenantId": 1001,
- "runningPods": 1,
- "phaseUpdatedAt": "2022-06-08T11:28:24.131Z",
- "k8sPhaseUpdatedAt": "2022-06-08T11:28:24.131Z",
- "updatedAt": "2022-06-08T11:28:24.131Z",
- "source": "CLI",
- "deletedAt": "2022-08-12T19:28:24.131Z",
- "type": "runai-job",
- "name": "very-important-job",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "priority": 50,
- "priorityClassName": "high-priority",
- "submittedBy": "researcher@run.ai",
- "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
- "projectName": "proj-1",
- "projectId": "1",
- "departmentName": "department-1",
- "departmentId": "1",
- "namespace": "runai-proj-1",
- "createdAt": "2022-01-01T03:49:52.531Z",
- "workloadRequestedResources": {
- "gpuRequestType": "portion",
- "gpu": {
- "limit": 1.5,
- "request": 1
}, - "gpuMemory": {
- "limit": "2G",
- "request": "200M"
}, - "cpu": {
- "limit": 1.5,
- "request": 1
}, - "cpuMemory": {
- "limit": "2G",
- "request": "200M"
}, - "migProfile": [
- "1g.5gb"
], - "extendedResources": [
- {
- "resource": "hardware-vendor.example/foo",
- "quantity": 2,
- "exclude": false
}
]
}, - "podsRequestedResources": {
- "gpuRequestType": "portion",
- "gpu": {
- "limit": 1.5,
- "request": 1
}, - "gpuMemory": {
- "limit": "2G",
- "request": "200M"
}, - "cpu": {
- "limit": 1.5,
- "request": 1
}, - "cpuMemory": {
- "limit": "2G",
- "request": "200M"
}, - "migProfile": [
- "1g.5gb"
], - "extendedResources": [
- {
- "resource": "hardware-vendor.example/foo",
- "quantity": 2,
- "exclude": false
}
]
}, - "allocatedResources": {
- "gpu": 1.5,
- "migProfile": [
- "1g.5gb"
], - "gpuMemory": "200Mi",
- "cpu": 0.5,
- "cpuMemory": "0B",
- "extendedResources": [
- {
- "resource": "hardware-vendor.example/foo",
- "quantity": 2,
- "exclude": false
}
]
}, - "actionsSupport": {
- "delete": true,
- "suspend": true
}, - "phase": "Creating",
- "conditions": [
- {
- "type": "Ready",
- "status": "False",
- "message": "Resource validation failed: ...",
- "reason": "ErrorConfig",
- "lastTransitionTime": "2022-01-01T03:49:52.531Z"
}
], - "phaseMessage": "Not enough resources in the requested nodepool",
- "k8sPhase": "Pending",
- "requestedPods": {
- "number": 1,
- "min": 2,
- "max": 5,
- "parallelism": 3,
- "completions": 5
}, - "requestedNodePools": [
- "default"
], - "currentNodePools": [
- "default"
], - "completedAt": "2022-01-01T03:49:52.531Z",
- "images": [
- "alpine:latest"
], - "urls": [
- "string"
], - "datasources": [
- {
- "type": "pvc",
- "name": "my-pvc-datasource-1",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
], - "environments": [
- {
- "connections": [
- {
- "name": "my-pytorch-env",
- "toolType": "pytorch",
- "connectionType": "ExternalUrl",
- "authorizationType": "public",
- "authorizedUsers": [
- "user@company.ai",
- "another@company.ai"
], - "authorizedGroups": [
- "group-a",
- "group-b"
], - "containerPort": 8080
}
], - "name": "pytorch",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "replicaType": "Master"
}
], - "externalConnections": [
- {
- "name": "my-pytorch-env",
- "toolType": "pytorch",
- "connectionType": "ExternalUrl",
- "authorizationType": "public",
- "authorizedUsers": [
- "user@company.ai",
- "another@company.ai"
], - "authorizedGroups": [
- "group-a",
- "group-b"
], - "containerPort": 8080
}
], - "distributedFramework": "Pytorch",
- "additionalFields": { },
- "preemptible": true,
- "environmentVariables": {
- "property1": "string",
- "property2": "string"
}, - "command": "sleep",
- "arguments": "1000",
- "phaseReason": "NonPreemptibleOverQuota",
- "idleGpus": 3,
- "idleAllocatedGpus": 1,
- "totalPendingTimeSeconds": 60,
- "totalRunningTimeSeconds": 60,
- "category": "Train",
- "guaranteedRuntimeEndsAt": "2025-08-01T03:49:52.531Z",
- "aiApplicationId": "string",
- "aiApplicationName": "string",
- "sourceApi": "WorkloadsV2",
- "pendingSchedulingMessages": [
- {
- "nodePool": "default",
- "phaseReason": "NonPreemptibleOverQuota",
- "reason": "Non-preemptible over quota",
- "orgType": "PROJECT",
- "userMessage": "You have reached the limit of non-preemptible resources"
}
]
}
Retrieve the number of workloads.
Executed successfully.
Unauthorized
Forbidden
unexpected error
unexpected error
{- "count": 1
}
Retrieves workload data by telemetry type.
Executed successfully.
Bad request.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
unexpected error
{- "type": "ALLOCATION_RATIO",
- "timestamp": "2023-06-06 12:09:18.211",
- "values": [
- {
- "value": "85",
- "groups": [
- {
- "key": "department",
- "value": "1",
- "name": "department-A"
}
]
}
]
}
Retrieves workloads data metrics from the metrics database. Use in reporting and analysis tools.
Executed successfully.
Partial success.
Bad request.
Unauthorized
Forbidden
The specified resource was not found
unexpected error
unexpected error
{- "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"
}
}
]
}
]
}