# Pods

Retrieve data about workload pods from your NVIDIA Run:ai platform.

## List pods.

> Retrieve a list of pods from a cluster.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.22"},"tags":[{"name":"Pods","description":"Retrieve data about workload pods from your NVIDIA Run:ai platform."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"Deleted":{"name":"deleted","in":"query","description":"Return only deleted resources when `true`.","schema":{"type":"boolean"}},"Offset":{"name":"offset","in":"query","required":false,"description":"The offset of the first item returned in the collection.","schema":{"type":"integer","format":"int32"}},"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}},"SortOrder":{"name":"sortOrder","in":"query","required":false,"description":"Sort results in descending or ascending order.","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},"PodsSort":{"name":"sortBy","in":"query","required":false,"description":"Sort results using a parameter.","schema":{"type":"string","enum":["clusterId","workloadId","revisionId","nodeName","currentNodepool","createdAt","completedAt","deletedAt"]}},"PodsFilter":{"name":"filterBy","in":"query","required":false,"description":"Filter results using a parameter. Use the format field-name operator value. Operators are `==` Equals, `!=` Not equals, `<=` Less than or equal, `>=` Greater than or equal, `=@` contains, `!@` Does not contains, `=^` Starts with and `=$` Ends with. Dates are in ISO 8601 timestamp format and available for operators `==`, `!=`, `<=` and `>=`.","schema":{"type":"array","items":{"type":"string","pattern":"^(clusterId|workloadId|revisionId|nodeName|currentNodepool|createdAt|completedAt|deletedAt)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false},"PodsQueryVerbosity":{"name":"verbosity","in":"query","required":false,"description":"response verbosity level. if full, the response includes workloadName and projectName fields.\n","schema":{"$ref":"#/components/schemas/PodVerbosity"}},"Completed":{"name":"completed","in":"query","description":"Return only completed resources when 'true', return only non-completed resources when 'false'. By default, or when empty, returns all resources.","schema":{"type":"string","default":"all"}},"Search":{"name":"search","in":"query","required":false,"description":"Filter results by a free text search.","schema":{"type":"string"}}},"schemas":{"PodVerbosity":{"type":"string","enum":["brief","full"],"default":"brief"},"Pods1":{"type":"array","items":{"$ref":"#/components/schemas/Pod1"}},"Pod1":{"allOf":[{"$ref":"#/components/schemas/PodSyncFields"},{"$ref":"#/components/schemas/PodComputedFields"},{"$ref":"#/components/schemas/PodVerbosityFields"}]},"PodSyncFields":{"type":"object","required":["name","priorityClassName","id","workloadId","clusterId","createdAt","containers","k8sPhase"],"properties":{"name":{"type":"string"},"priorityClassName":{"type":"string"},"id":{"type":"string","format":"uuid"},"workloadId":{"type":"string","format":"uuid"},"revisionId":{"type":"string","format":"uuid","nullable":true},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"projectId":{"type":"string"},"nodeName":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"containers":{"type":"array","items":{"$ref":"#/components/schemas/Container1"}},"currentNodePool":{"type":"string","nullable":true},"requestedNodePools":{"type":"array","items":{"type":"string"}},"requestedResources":{"$ref":"#/components/schemas/PodRequestResources"},"allocatedResources":{"$ref":"#/components/schemas/AllocatedResources"},"tolerations":{"$ref":"#/components/schemas/PodTolerations"},"k8sPhase":{"type":"string"},"ip":{"type":"string","nullable":true},"nodeAffinity":{"$ref":"#/components/schemas/PodNodeAffinity"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Container1":{"type":"object","required":["name","image"],"properties":{"name":{"type":"string"},"image":{"type":"string"},"startedAt":{"type":"string","nullable":true,"format":"date-time"}}},"PodRequestResources":{"type":"object","nullable":true,"properties":{"gpuRequestType":{"$ref":"#/components/schemas/GpuRequestType"},"gpu":{"$ref":"#/components/schemas/RequestResourceCores"},"gpuMemory":{"$ref":"#/components/schemas/RequestResourceQuantity"},"cpu":{"$ref":"#/components/schemas/RequestResourceCores"},"cpuMemory":{"$ref":"#/components/schemas/RequestResourceQuantity"},"migProfile":{"$ref":"#/components/schemas/MigProfile"},"extendedResources":{"$ref":"#/components/schemas/WorkloadsExtendedResources"}}},"GpuRequestType":{"description":"Sets the unit type for GPU resources requests. Stated in terms of portion, memory or  mig profile [deprecated]. Sets the unit type for other GPU request fields. If `gpuDevicesRequest > 1`, only `portion` is supported. If `gpuDeviceRequest = 1`, the request type can be stated as `portion`, `memory` or `migProfile` [deprecated].","type":"string","minLength":1,"enum":["portion","memory","migProfile"],"nullable":true},"RequestResourceCores":{"type":"object","properties":{"limit":{"type":"number","nullable":true,"format":"double"},"request":{"type":"number","nullable":true,"format":"double"}},"nullable":true},"RequestResourceQuantity":{"type":"object","properties":{"limit":{"type":"string","nullable":true,"pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"},"request":{"type":"string","nullable":true,"pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"}},"nullable":true},"MigProfile":{"description":"Required only if `gpuRequestType` is `migProfile`. This states the memory profile to be used for the workload running NVIDIA Multi-Instance GPU (MIG) technology.","type":"string","deprecated":true,"minLength":1,"enum":["1g.5gb","1g.10gb","2g.10gb","2g.20gb","3g.20gb","3g.40gb","4g.20gb","4g.40gb","7g.40gb","7g.80gb"],"nullable":true},"WorkloadsExtendedResources":{"description":"Set of extended resources with their quantity","type":"array","items":{"$ref":"#/components/schemas/WorkloadsExtendedResource"},"nullable":true},"WorkloadsExtendedResource":{"description":"Quantity of an extended resource.","type":"object","properties":{"resource":{"description":"The name of the extended resource (mandatory)","type":"string","minLength":1,"nullable":true},"quantity":{"description":"The requested quantity for the given resource.","type":"string","minLength":1,"nullable":true},"exclude":{"description":"Whether to exclude this extended resource from the workload. This is necessary in case the extended resource is inherited from the policy defaults and it is desired not to include it in this workload.","type":"boolean","nullable":true}},"nullable":true},"AllocatedResources":{"type":"object","nullable":true,"properties":{"gpu":{"type":"number","nullable":true,"format":"double","description":"Required if and only if gpuRequestType is portion. States the number of GPUs allocated for the created workload. The default is no allocated GPUs."},"migProfile":{"$ref":"#/components/schemas/MigProfile"},"gpuMemory":{"type":"string","pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$","nullable":true},"cpu":{"type":"number","nullable":true,"format":"double","description":"States the amount of CPU cores used by the workload running."},"cpuMemory":{"type":"string","pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$","nullable":true},"extendedResources":{"$ref":"#/components/schemas/WorkloadsExtendedResources"}}},"PodTolerations":{"type":"array","items":{"$ref":"#/components/schemas/PodToleration"}},"PodToleration":{"type":"object","properties":{"key":{"description":"Key is the taint key that the toleration applies to. Empty means match all taint keys.","type":"string"},"operator":{"type":"string","description":"Operator represents a key's relationship to the value."},"value":{"type":"string","description":"Value is the taint value the toleration matches to."},"effect":{"type":"string","description":"Effect indicates the taint effect to match. Empty means match all taint effects."},"tolerationSeconds":{"description":"TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint.","type":"integer","nullable":true}}},"PodNodeAffinity":{"type":"object","description":"group of node affinity scheduling rules.","properties":{"required":{"type":"object","description":"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.","properties":{"nodeSelectorTerms":{"description":"A list of node selector terms. The terms are ORed.","type":"array","items":{"$ref":"#/components/schemas/NodeSelectorTerm"}}},"nullable":true},"preferred":{"type":"object","description":"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.","properties":{"nodeSelectorTerms":{"description":"A list of node selector terms.","type":"array","items":{"$ref":"#/components/schemas/PodPreferredNodeSelectorTerm"}}},"nullable":true}}},"NodeSelectorTerm":{"type":"object","description":"A null or empty node selector term matches no objects. The requirements of them are ANDed.","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","type":"array","items":{"$ref":"#/components/schemas/MatchExpression"}}},"nullable":true},"MatchExpression":{"type":"object","description":"A selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to (mandatory).","type":"string"},"operator":{"$ref":"#/components/schemas/MatchExpressionOperator"},"values":{"description":"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer.","type":"array","items":{"type":"string"}}},"required":["key","operator"],"nullable":true},"MatchExpressionOperator":{"description":"Represents a key's relationship to a set of values (mandatory).","type":"string","enum":["In","NotIn","Exists","DoesNotExist","Gt","Lt"]},"PodPreferredNodeSelectorTerm":{"type":"object","description":"An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).","properties":{"weight":{"description":"Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.","type":"number"},"preference":{"$ref":"#/components/schemas/NodeSelectorTerm"}}},"PodComputedFields":{"type":"object","required":["tenantId","k8sPhaseUpdatedAt","updatedAt"],"properties":{"tenantId":{"$ref":"#/components/schemas/TenantId"},"k8sPhaseUpdatedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}}},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"PodVerbosityFields":{"type":"object","properties":{"projectName":{"type":"string"},"workloadName":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/workloads/pods":{"get":{"summary":"List pods.","description":"Retrieve a list of pods from a cluster.","operationId":"list_pods","tags":["Pods"],"parameters":[{"$ref":"#/components/parameters/Deleted"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/SortOrder"},{"$ref":"#/components/parameters/PodsSort"},{"$ref":"#/components/parameters/PodsFilter"},{"$ref":"#/components/parameters/PodsQueryVerbosity"},{"$ref":"#/components/parameters/Completed"},{"$ref":"#/components/parameters/Search"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["pods"],"properties":{"next":{"type":"integer"},"pods":{"$ref":"#/components/schemas/Pods1"}}}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get pod metrics data.

> Retrieve pod's metrics data for use in analysis applications.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.22"},"tags":[{"name":"Pods","description":"Retrieve data about workload pods from your NVIDIA Run:ai platform."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"WorkloadId":{"name":"workloadId","in":"path","required":true,"description":"The  Universally Unique Identifier (UUID) of the workload.","schema":{"type":"string","format":"uuid"}},"PodId":{"name":"podId","in":"path","description":"The requested pod id.","schema":{"type":"string","format":"uuid"},"required":true},"PodMetricTypes":{"name":"metricType","in":"query","required":true,"description":"Specify which metric data to request. Advanced GPU metrics are only supported if the 'Advanced GPU Metrics' feature flag in the settings is enabled.","explode":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/PodMetricType"}}},"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"}},"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"}},"NumberOfSamples":{"name":"numberOfSamples","in":"query","description":"The number of samples to take in the specified time range.","required":false,"schema":{"type":"integer","maximum":1000,"minimum":0,"default":20}}},"schemas":{"PodMetricType":{"type":"string","description":"Specify which data to request.","enum":["GPU_UTILIZATION_PER_GPU","GPU_UTILIZATION","GPU_MEMORY_USAGE_BYTES_PER_GPU","GPU_MEMORY_USAGE_BYTES","CPU_USAGE_CORES","CPU_MEMORY_USAGE_BYTES","GPU_GRAPHICS_ENGINE_ACTIVITY_PER_GPU","GPU_SM_ACTIVITY_PER_GPU","GPU_SM_OCCUPANCY_PER_GPU","GPU_TENSOR_ACTIVITY_PER_GPU","GPU_FP64_ENGINE_ACTIVITY_PER_GPU","GPU_FP32_ENGINE_ACTIVITY_PER_GPU","GPU_FP16_ENGINE_ACTIVITY_PER_GPU","GPU_MEMORY_BANDWIDTH_UTILIZATION_PER_GPU","GPU_NVLINK_TRANSMITTED_BANDWIDTH_PER_GPU","GPU_NVLINK_RECEIVED_BANDWIDTH_PER_GPU","GPU_PCIE_TRANSMITTED_BANDWIDTH_PER_GPU","GPU_PCIE_RECEIVED_BANDWIDTH_PER_GPU","GPU_SWAP_MEMORY_BYTES_PER_GPU"]},"MetricsResponse":{"type":"object","required":["measurements"],"properties":{"measurements":{"type":"array","items":{"$ref":"#/components/schemas/MeasurementResponse"}}}},"MeasurementResponse":{"type":"object","required":["type","values"],"properties":{"type":{"type":"string","description":"specifies what data returned"},"labels":{"type":"object","nullable":true,"description":"labels of the metric measurement","additionalProperties":{"type":"string"}},"values":{"type":"array","nullable":true,"items":{"type":"object","required":["value","timestamp"],"properties":{"value":{"type":"string"},"timestamp":{"type":"string","format":"date-time","nullable":true}}}}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/workloads/{workloadId}/pods/{podId}/metrics":{"get":{"summary":"Get pod metrics data.","description":"Retrieve pod's metrics data for use in analysis applications.","operationId":"get_workload_pod_metrics","tags":["Pods"],"parameters":[{"$ref":"#/components/parameters/WorkloadId"},{"$ref":"#/components/parameters/PodId"},{"$ref":"#/components/parameters/PodMetricTypes"},{"$ref":"#/components/parameters/StartRequired"},{"$ref":"#/components/parameters/EndRequired"},{"$ref":"#/components/parameters/NumberOfSamples"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"}},"text/csv":{}}},"207":{"description":"Partial success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get workload pods by id.

> Retrieve the details of workload pods by workload id.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.22"},"tags":[{"name":"Pods","description":"Retrieve data about workload pods from your NVIDIA Run:ai platform."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"WorkloadId":{"name":"workloadId","in":"path","required":true,"description":"The  Universally Unique Identifier (UUID) of the workload.","schema":{"type":"string","format":"uuid"}},"Deleted":{"name":"deleted","in":"query","description":"Return only deleted resources when `true`.","schema":{"type":"boolean"}},"Offset":{"name":"offset","in":"query","required":false,"description":"The offset of the first item returned in the collection.","schema":{"type":"integer","format":"int32"}},"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"}}},"schemas":{"Pods1":{"type":"array","items":{"$ref":"#/components/schemas/Pod1"}},"Pod1":{"allOf":[{"$ref":"#/components/schemas/PodSyncFields"},{"$ref":"#/components/schemas/PodComputedFields"},{"$ref":"#/components/schemas/PodVerbosityFields"}]},"PodSyncFields":{"type":"object","required":["name","priorityClassName","id","workloadId","clusterId","createdAt","containers","k8sPhase"],"properties":{"name":{"type":"string"},"priorityClassName":{"type":"string"},"id":{"type":"string","format":"uuid"},"workloadId":{"type":"string","format":"uuid"},"revisionId":{"type":"string","format":"uuid","nullable":true},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"projectId":{"type":"string"},"nodeName":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"containers":{"type":"array","items":{"$ref":"#/components/schemas/Container1"}},"currentNodePool":{"type":"string","nullable":true},"requestedNodePools":{"type":"array","items":{"type":"string"}},"requestedResources":{"$ref":"#/components/schemas/PodRequestResources"},"allocatedResources":{"$ref":"#/components/schemas/AllocatedResources"},"tolerations":{"$ref":"#/components/schemas/PodTolerations"},"k8sPhase":{"type":"string"},"ip":{"type":"string","nullable":true},"nodeAffinity":{"$ref":"#/components/schemas/PodNodeAffinity"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Container1":{"type":"object","required":["name","image"],"properties":{"name":{"type":"string"},"image":{"type":"string"},"startedAt":{"type":"string","nullable":true,"format":"date-time"}}},"PodRequestResources":{"type":"object","nullable":true,"properties":{"gpuRequestType":{"$ref":"#/components/schemas/GpuRequestType"},"gpu":{"$ref":"#/components/schemas/RequestResourceCores"},"gpuMemory":{"$ref":"#/components/schemas/RequestResourceQuantity"},"cpu":{"$ref":"#/components/schemas/RequestResourceCores"},"cpuMemory":{"$ref":"#/components/schemas/RequestResourceQuantity"},"migProfile":{"$ref":"#/components/schemas/MigProfile"},"extendedResources":{"$ref":"#/components/schemas/WorkloadsExtendedResources"}}},"GpuRequestType":{"description":"Sets the unit type for GPU resources requests. Stated in terms of portion, memory or  mig profile [deprecated]. Sets the unit type for other GPU request fields. If `gpuDevicesRequest > 1`, only `portion` is supported. If `gpuDeviceRequest = 1`, the request type can be stated as `portion`, `memory` or `migProfile` [deprecated].","type":"string","minLength":1,"enum":["portion","memory","migProfile"],"nullable":true},"RequestResourceCores":{"type":"object","properties":{"limit":{"type":"number","nullable":true,"format":"double"},"request":{"type":"number","nullable":true,"format":"double"}},"nullable":true},"RequestResourceQuantity":{"type":"object","properties":{"limit":{"type":"string","nullable":true,"pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"},"request":{"type":"string","nullable":true,"pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"}},"nullable":true},"MigProfile":{"description":"Required only if `gpuRequestType` is `migProfile`. This states the memory profile to be used for the workload running NVIDIA Multi-Instance GPU (MIG) technology.","type":"string","deprecated":true,"minLength":1,"enum":["1g.5gb","1g.10gb","2g.10gb","2g.20gb","3g.20gb","3g.40gb","4g.20gb","4g.40gb","7g.40gb","7g.80gb"],"nullable":true},"WorkloadsExtendedResources":{"description":"Set of extended resources with their quantity","type":"array","items":{"$ref":"#/components/schemas/WorkloadsExtendedResource"},"nullable":true},"WorkloadsExtendedResource":{"description":"Quantity of an extended resource.","type":"object","properties":{"resource":{"description":"The name of the extended resource (mandatory)","type":"string","minLength":1,"nullable":true},"quantity":{"description":"The requested quantity for the given resource.","type":"string","minLength":1,"nullable":true},"exclude":{"description":"Whether to exclude this extended resource from the workload. This is necessary in case the extended resource is inherited from the policy defaults and it is desired not to include it in this workload.","type":"boolean","nullable":true}},"nullable":true},"AllocatedResources":{"type":"object","nullable":true,"properties":{"gpu":{"type":"number","nullable":true,"format":"double","description":"Required if and only if gpuRequestType is portion. States the number of GPUs allocated for the created workload. The default is no allocated GPUs."},"migProfile":{"$ref":"#/components/schemas/MigProfile"},"gpuMemory":{"type":"string","pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$","nullable":true},"cpu":{"type":"number","nullable":true,"format":"double","description":"States the amount of CPU cores used by the workload running."},"cpuMemory":{"type":"string","pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$","nullable":true},"extendedResources":{"$ref":"#/components/schemas/WorkloadsExtendedResources"}}},"PodTolerations":{"type":"array","items":{"$ref":"#/components/schemas/PodToleration"}},"PodToleration":{"type":"object","properties":{"key":{"description":"Key is the taint key that the toleration applies to. Empty means match all taint keys.","type":"string"},"operator":{"type":"string","description":"Operator represents a key's relationship to the value."},"value":{"type":"string","description":"Value is the taint value the toleration matches to."},"effect":{"type":"string","description":"Effect indicates the taint effect to match. Empty means match all taint effects."},"tolerationSeconds":{"description":"TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint.","type":"integer","nullable":true}}},"PodNodeAffinity":{"type":"object","description":"group of node affinity scheduling rules.","properties":{"required":{"type":"object","description":"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.","properties":{"nodeSelectorTerms":{"description":"A list of node selector terms. The terms are ORed.","type":"array","items":{"$ref":"#/components/schemas/NodeSelectorTerm"}}},"nullable":true},"preferred":{"type":"object","description":"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.","properties":{"nodeSelectorTerms":{"description":"A list of node selector terms.","type":"array","items":{"$ref":"#/components/schemas/PodPreferredNodeSelectorTerm"}}},"nullable":true}}},"NodeSelectorTerm":{"type":"object","description":"A null or empty node selector term matches no objects. The requirements of them are ANDed.","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","type":"array","items":{"$ref":"#/components/schemas/MatchExpression"}}},"nullable":true},"MatchExpression":{"type":"object","description":"A selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to (mandatory).","type":"string"},"operator":{"$ref":"#/components/schemas/MatchExpressionOperator"},"values":{"description":"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer.","type":"array","items":{"type":"string"}}},"required":["key","operator"],"nullable":true},"MatchExpressionOperator":{"description":"Represents a key's relationship to a set of values (mandatory).","type":"string","enum":["In","NotIn","Exists","DoesNotExist","Gt","Lt"]},"PodPreferredNodeSelectorTerm":{"type":"object","description":"An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).","properties":{"weight":{"description":"Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.","type":"number"},"preference":{"$ref":"#/components/schemas/NodeSelectorTerm"}}},"PodComputedFields":{"type":"object","required":["tenantId","k8sPhaseUpdatedAt","updatedAt"],"properties":{"tenantId":{"$ref":"#/components/schemas/TenantId"},"k8sPhaseUpdatedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}}},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"PodVerbosityFields":{"type":"object","properties":{"projectName":{"type":"string"},"workloadName":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/workloads/{workloadId}/pods":{"get":{"summary":"Get workload pods by id.","description":"Retrieve the details of workload pods by workload id.","operationId":"get_workload_pods","tags":["Pods"],"parameters":[{"$ref":"#/components/parameters/WorkloadId"},{"$ref":"#/components/parameters/Deleted"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Search"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["pods"],"properties":{"next":{"type":"integer"},"pods":{"$ref":"#/components/schemas/Pods1"}}}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get pods count.

> Retrieve the number of pods from a cluster.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.22"},"tags":[{"name":"Pods","description":"Retrieve data about workload pods from your NVIDIA Run:ai platform."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"Deleted":{"name":"deleted","in":"query","description":"Return only deleted resources when `true`.","schema":{"type":"boolean"}},"PodsFilter":{"name":"filterBy","in":"query","required":false,"description":"Filter results using a parameter. Use the format field-name operator value. Operators are `==` Equals, `!=` Not equals, `<=` Less than or equal, `>=` Greater than or equal, `=@` contains, `!@` Does not contains, `=^` Starts with and `=$` Ends with. Dates are in ISO 8601 timestamp format and available for operators `==`, `!=`, `<=` and `>=`.","schema":{"type":"array","items":{"type":"string","pattern":"^(clusterId|workloadId|revisionId|nodeName|currentNodepool|createdAt|completedAt|deletedAt)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false},"Search":{"name":"search","in":"query","required":false,"description":"Filter results by a free text search.","schema":{"type":"string"}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/workloads/pods/count":{"get":{"summary":"Get pods count.","description":"Retrieve the number of pods from a cluster.","operationId":"count_pods","tags":["Pods"],"parameters":[{"$ref":"#/components/parameters/Deleted"},{"$ref":"#/components/parameters/PodsFilter"},{"$ref":"#/components/parameters/Search"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["count"],"properties":{"count":{"type":"integer","format":"int64"}}}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get revision pods by id. \[Experimental]

> Retrieve the details of revision pods by revision id. Supported for clusters v2.21+.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.22"},"tags":[{"name":"Pods","description":"Retrieve data about workload pods from your NVIDIA Run:ai platform."}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"RevisionId":{"name":"revisionId","in":"path","required":true,"description":"The  Universally Unique Identifier (UUID) of the revision.","schema":{"type":"string","format":"uuid"}},"Deleted":{"name":"deleted","in":"query","description":"Return only deleted resources when `true`.","schema":{"type":"boolean"}}},"schemas":{"Pods1":{"type":"array","items":{"$ref":"#/components/schemas/Pod1"}},"Pod1":{"allOf":[{"$ref":"#/components/schemas/PodSyncFields"},{"$ref":"#/components/schemas/PodComputedFields"},{"$ref":"#/components/schemas/PodVerbosityFields"}]},"PodSyncFields":{"type":"object","required":["name","priorityClassName","id","workloadId","clusterId","createdAt","containers","k8sPhase"],"properties":{"name":{"type":"string"},"priorityClassName":{"type":"string"},"id":{"type":"string","format":"uuid"},"workloadId":{"type":"string","format":"uuid"},"revisionId":{"type":"string","format":"uuid","nullable":true},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"projectId":{"type":"string"},"nodeName":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","nullable":true,"format":"date-time"},"containers":{"type":"array","items":{"$ref":"#/components/schemas/Container1"}},"currentNodePool":{"type":"string","nullable":true},"requestedNodePools":{"type":"array","items":{"type":"string"}},"requestedResources":{"$ref":"#/components/schemas/PodRequestResources"},"allocatedResources":{"$ref":"#/components/schemas/AllocatedResources"},"tolerations":{"$ref":"#/components/schemas/PodTolerations"},"k8sPhase":{"type":"string"},"ip":{"type":"string","nullable":true},"nodeAffinity":{"$ref":"#/components/schemas/PodNodeAffinity"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"Container1":{"type":"object","required":["name","image"],"properties":{"name":{"type":"string"},"image":{"type":"string"},"startedAt":{"type":"string","nullable":true,"format":"date-time"}}},"PodRequestResources":{"type":"object","nullable":true,"properties":{"gpuRequestType":{"$ref":"#/components/schemas/GpuRequestType"},"gpu":{"$ref":"#/components/schemas/RequestResourceCores"},"gpuMemory":{"$ref":"#/components/schemas/RequestResourceQuantity"},"cpu":{"$ref":"#/components/schemas/RequestResourceCores"},"cpuMemory":{"$ref":"#/components/schemas/RequestResourceQuantity"},"migProfile":{"$ref":"#/components/schemas/MigProfile"},"extendedResources":{"$ref":"#/components/schemas/WorkloadsExtendedResources"}}},"GpuRequestType":{"description":"Sets the unit type for GPU resources requests. Stated in terms of portion, memory or  mig profile [deprecated]. Sets the unit type for other GPU request fields. If `gpuDevicesRequest > 1`, only `portion` is supported. If `gpuDeviceRequest = 1`, the request type can be stated as `portion`, `memory` or `migProfile` [deprecated].","type":"string","minLength":1,"enum":["portion","memory","migProfile"],"nullable":true},"RequestResourceCores":{"type":"object","properties":{"limit":{"type":"number","nullable":true,"format":"double"},"request":{"type":"number","nullable":true,"format":"double"}},"nullable":true},"RequestResourceQuantity":{"type":"object","properties":{"limit":{"type":"string","nullable":true,"pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"},"request":{"type":"string","nullable":true,"pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"}},"nullable":true},"MigProfile":{"description":"Required only if `gpuRequestType` is `migProfile`. This states the memory profile to be used for the workload running NVIDIA Multi-Instance GPU (MIG) technology.","type":"string","deprecated":true,"minLength":1,"enum":["1g.5gb","1g.10gb","2g.10gb","2g.20gb","3g.20gb","3g.40gb","4g.20gb","4g.40gb","7g.40gb","7g.80gb"],"nullable":true},"WorkloadsExtendedResources":{"description":"Set of extended resources with their quantity","type":"array","items":{"$ref":"#/components/schemas/WorkloadsExtendedResource"},"nullable":true},"WorkloadsExtendedResource":{"description":"Quantity of an extended resource.","type":"object","properties":{"resource":{"description":"The name of the extended resource (mandatory)","type":"string","minLength":1,"nullable":true},"quantity":{"description":"The requested quantity for the given resource.","type":"string","minLength":1,"nullable":true},"exclude":{"description":"Whether to exclude this extended resource from the workload. This is necessary in case the extended resource is inherited from the policy defaults and it is desired not to include it in this workload.","type":"boolean","nullable":true}},"nullable":true},"AllocatedResources":{"type":"object","nullable":true,"properties":{"gpu":{"type":"number","nullable":true,"format":"double","description":"Required if and only if gpuRequestType is portion. States the number of GPUs allocated for the created workload. The default is no allocated GPUs."},"migProfile":{"$ref":"#/components/schemas/MigProfile"},"gpuMemory":{"type":"string","pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$","nullable":true},"cpu":{"type":"number","nullable":true,"format":"double","description":"States the amount of CPU cores used by the workload running."},"cpuMemory":{"type":"string","pattern":"^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$","nullable":true},"extendedResources":{"$ref":"#/components/schemas/WorkloadsExtendedResources"}}},"PodTolerations":{"type":"array","items":{"$ref":"#/components/schemas/PodToleration"}},"PodToleration":{"type":"object","properties":{"key":{"description":"Key is the taint key that the toleration applies to. Empty means match all taint keys.","type":"string"},"operator":{"type":"string","description":"Operator represents a key's relationship to the value."},"value":{"type":"string","description":"Value is the taint value the toleration matches to."},"effect":{"type":"string","description":"Effect indicates the taint effect to match. Empty means match all taint effects."},"tolerationSeconds":{"description":"TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint.","type":"integer","nullable":true}}},"PodNodeAffinity":{"type":"object","description":"group of node affinity scheduling rules.","properties":{"required":{"type":"object","description":"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.","properties":{"nodeSelectorTerms":{"description":"A list of node selector terms. The terms are ORed.","type":"array","items":{"$ref":"#/components/schemas/NodeSelectorTerm"}}},"nullable":true},"preferred":{"type":"object","description":"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.","properties":{"nodeSelectorTerms":{"description":"A list of node selector terms.","type":"array","items":{"$ref":"#/components/schemas/PodPreferredNodeSelectorTerm"}}},"nullable":true}}},"NodeSelectorTerm":{"type":"object","description":"A null or empty node selector term matches no objects. The requirements of them are ANDed.","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","type":"array","items":{"$ref":"#/components/schemas/MatchExpression"}}},"nullable":true},"MatchExpression":{"type":"object","description":"A selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to (mandatory).","type":"string"},"operator":{"$ref":"#/components/schemas/MatchExpressionOperator"},"values":{"description":"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer.","type":"array","items":{"type":"string"}}},"required":["key","operator"],"nullable":true},"MatchExpressionOperator":{"description":"Represents a key's relationship to a set of values (mandatory).","type":"string","enum":["In","NotIn","Exists","DoesNotExist","Gt","Lt"]},"PodPreferredNodeSelectorTerm":{"type":"object","description":"An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).","properties":{"weight":{"description":"Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.","type":"number"},"preference":{"$ref":"#/components/schemas/NodeSelectorTerm"}}},"PodComputedFields":{"type":"object","required":["tenantId","k8sPhaseUpdatedAt","updatedAt"],"properties":{"tenantId":{"$ref":"#/components/schemas/TenantId"},"k8sPhaseUpdatedAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time","nullable":true}}},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"PodVerbosityFields":{"type":"object","properties":{"projectName":{"type":"string"},"workloadName":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/workloads/inferences/revisions/{revisionId}/pods":{"get":{"summary":"Get revision pods by id. [Experimental]","description":"Retrieve the details of revision pods by revision id. Supported for clusters v2.21+.","operationId":"get_revision_pods","tags":["Pods"],"parameters":[{"$ref":"#/components/parameters/RevisionId"},{"$ref":"#/components/parameters/Deleted"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["pods"],"properties":{"pods":{"$ref":"#/components/schemas/Pods1"}}}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```
