# Departments

## Get departments

> list departments

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentsFilterBy":{"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 contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.","schema":{"type":"array","maxItems":10,"items":{"type":"string","pattern":"^(name|clusterId|totalGpuQuota|gpuAllocated|createdAt|avgGpuAllocation24h|avgGpuUtilization24h|avgGpuMemoryUtilization24h|avgGpuAllocation7d|avgGpuUtilization7d|avgGpuMemoryUtilization7d|avgGpuAllocation30d|avgGpuUtilization30d|avgGpuMemoryUtilization30d)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false},"DepartmentsSortBy":{"name":"sortBy","in":"query","required":false,"description":"Sort results by a parameters.","schema":{"$ref":"#/components/schemas/DepartmentFilterSortFields"}},"DepartmentsVerbosity":{"name":"verbosity","in":"query","required":false,"description":"Departments verbosity. If it is set to \"verbose\", status will be returned. If it is not defined or set to \"brief\" only unit specific data will be returned.","schema":{"$ref":"#/components/schemas/Verbosity"}},"SortOrder":{"name":"sortOrder","in":"query","required":false,"description":"Sort results in descending or ascending order.","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},"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}}},"schemas":{"DepartmentFilterSortFields":{"type":"string","enum":["name","clusterId","totalGpuQuota","gpuAllocated","createdAt","avgGpuAllocation24h","avgGpuUtilization24h","avgGpuMemoryUtilization24h","avgGpuAllocation7d","avgGpuUtilization7d","avgGpuMemoryUtilization7d","avgGpuAllocation30d","avgGpuUtilization30d","avgGpuMemoryUtilization30d"]},"Verbosity":{"type":"string","enum":["meta","brief","verbose"]},"DepartmentForList":{"allOf":[{"$ref":"#/components/schemas/DataDepartmentFields"},{"type":"object","required":["id","createdAt","updatedAt","totalResources"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"children":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/DepartmentProjectChild"}},"status":{"type":"object","nullable":true,"properties":{"quotaStatus":{"$ref":"#/components/schemas/QuotaStatus"}}},"totalResources":{"$ref":"#/components/schemas/TotalResources","nullable":true},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Organization per Node Pool"}}}]},"DataDepartmentFields":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableDepartmentFields"},{"type":"object","required":["name","clusterId"],"properties":{"name":{"description":"The unique name of the department within the cluster. Must be a valid Kubernetes name (lowercase, alphanumeric, hyphens allowed).","type":"string","maxLength":63},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"overtimeData":{"$ref":"#/components/schemas/OvertimeData"}}}]},"DataUpdatableDepartmentFields":{"type":"object","description":"Updatable fields","required":["resources"],"properties":{"description":{"type":"string","description":"The description of the department."},"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"An ordered list of node pools that defines the default scheduling preference for workloads in this department. The Scheduler will attempt to schedule workloads on node pools in this order. This setting is enforced if no node pool list is defined in the workload policy.","type":"array","maxItems":20,"nullable":true,"items":{"type":"string"}},"nodeTypes":{"$ref":"#/components/schemas/NodeTypesPerWorkload"}}},"SchedulingRules":{"type":"object","nullable":true,"description":"Scheduling rules that define time limits and idle GPU timeouts for workloads in this org-unit. These rules help manage resource utilization by automatically terminating or preempting idle or long-running workloads.","properties":{"interactiveJobTimeLimitSeconds":{"type":"integer","description":"interactive job time limit in seconds","nullable":true,"minimum":1},"interactiveJobMaxIdleDurationSeconds":{"type":"integer","description":"interactive job max idle duration in seconds","nullable":true,"minimum":1},"interactiveJobPreemptIdleDurationSeconds":{"type":"integer","description":"interactive job preempt idle duration in seconds","nullable":true,"minimum":1},"trainingJobMaxIdleDurationSeconds":{"type":"integer","description":"training job max idle duration in seconds","nullable":true,"minimum":1},"trainingJobTimeLimitSeconds":{"type":"integer","description":"training job time limit in seconds","nullable":true,"minimum":1}}},"NodeTypesPerWorkload":{"description":"Node type configurations for different workload types (training, workspace). Specifies which node types are allowed for each workload type. Enforced when no node type is configured in the workload policy.","properties":{"training":{"type":"array","maxItems":20,"description":"ids of the node types for training workloads","items":{"type":"string"}},"workspace":{"type":"array","maxItems":20,"description":"ids of the node types for workspace workloads","items":{"type":"string"}},"names":{"nullable":true,"type":"object","maxProperties":20,"additionalProperties":{"type":"string"},"description":"mapping of ids to names"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"OvertimeData":{"type":"object","properties":{"range24hData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range7dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range30dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]}}},"OvertimeRangeData":{"type":"object","description":"Average data for the specified time range, or for the lifetime of the project/department if it exists for less than the time range.","properties":{"averageGpuAllocation":{"type":"number","format":"double","description":"The average gpu devices allocation of the project/department."},"averageGpuUtilization":{"type":"number","format":"double","description":"The average gpu utilization percentage of the project/department."},"averageGpuMemoryUtilization":{"type":"number","format":"double","description":"The average gpu memory utilization percentage of the project/department. Only available for cluster versions >= 2.22.","nullable":true},"updatedAt":{"type":"string","format":"date-time"}}},"DepartmentProjectChild":{"type":"object","description":"Department or project child","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentProjectChild"}}}},"QuotaStatus":{"type":"object","description":"Sum of all quota statuses of all the node pools","properties":{"allocated":{"$ref":"#/components/schemas/QuotaStatusResource"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResource"},"requested":{"$ref":"#/components/schemas/QuotaStatusResource"}}},"QuotaStatusResource":{"type":"object","properties":{"gpu":{"type":"number","format":"double","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","format":"double","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","format":"double","description":"Memory in MB (allocated/requested/...)."}}},"TotalResources":{"type":"object","properties":{"gpuQuota":{"type":"number","format":"double","description":"Total gpu quota of the org unit","nullable":true},"cpuQuota":{"type":"number","format":"double","description":"Total cpu quota of the org unit in Millicores","nullable":true},"memoryQuota":{"type":"number","format":"double","description":"Total memory quota of the org unit in MB","nullable":true}}},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"required":["deserved"],"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","nullable":true}}},"NonNullResource":{"properties":{"deserved":{"type":"number","format":"double","description":"The GPU quota assigned to this org-unit.","default":0},"limit":{"type":"number","format":"double","description":"The maximum GPU device allocation the org-unit can get from this node pool, representing the maximum sum of assigned quota and over-quota GPUs. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","format":"double","description":"The resource quota assigned to this org-unit.","nullable":true},"limit":{"type":"number","format":"double","description":"The maximum resource allocation for this org-unit. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"units":{"type":"string","description":"The unit of measurement for CPU memory values.","enum":["Mib","MB","GB"]},"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"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/departments":{"get":{"summary":"Get departments","operationId":"get_departments","description":"list departments","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentsFilterBy"},{"$ref":"#/components/parameters/DepartmentsSortBy"},{"$ref":"#/components/parameters/DepartmentsVerbosity"},{"$ref":"#/components/parameters/SortOrder"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","required":["departments"],"properties":{"departments":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentForList"}},"next":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Create department

> Create Department

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"DepartmentCreationRequest":{"allOf":[{"$ref":"#/components/schemas/DataDepartmentFields"},{"properties":{"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourcesNullable"},"description":"An array of resource configurations for the department. Each entry defines GPU, CPU, and CPU memory assigned to a specific node pool."}}}]},"DataDepartmentFields":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableDepartmentFields"},{"type":"object","required":["name","clusterId"],"properties":{"name":{"description":"The unique name of the department within the cluster. Must be a valid Kubernetes name (lowercase, alphanumeric, hyphens allowed).","type":"string","maxLength":63},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"overtimeData":{"$ref":"#/components/schemas/OvertimeData"}}}]},"DataUpdatableDepartmentFields":{"type":"object","description":"Updatable fields","required":["resources"],"properties":{"description":{"type":"string","description":"The description of the department."},"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"An ordered list of node pools that defines the default scheduling preference for workloads in this department. The Scheduler will attempt to schedule workloads on node pools in this order. This setting is enforced if no node pool list is defined in the workload policy.","type":"array","maxItems":20,"nullable":true,"items":{"type":"string"}},"nodeTypes":{"$ref":"#/components/schemas/NodeTypesPerWorkload"}}},"SchedulingRules":{"type":"object","nullable":true,"description":"Scheduling rules that define time limits and idle GPU timeouts for workloads in this org-unit. These rules help manage resource utilization by automatically terminating or preempting idle or long-running workloads.","properties":{"interactiveJobTimeLimitSeconds":{"type":"integer","description":"interactive job time limit in seconds","nullable":true,"minimum":1},"interactiveJobMaxIdleDurationSeconds":{"type":"integer","description":"interactive job max idle duration in seconds","nullable":true,"minimum":1},"interactiveJobPreemptIdleDurationSeconds":{"type":"integer","description":"interactive job preempt idle duration in seconds","nullable":true,"minimum":1},"trainingJobMaxIdleDurationSeconds":{"type":"integer","description":"training job max idle duration in seconds","nullable":true,"minimum":1},"trainingJobTimeLimitSeconds":{"type":"integer","description":"training job time limit in seconds","nullable":true,"minimum":1}}},"NodeTypesPerWorkload":{"description":"Node type configurations for different workload types (training, workspace). Specifies which node types are allowed for each workload type. Enforced when no node type is configured in the workload policy.","properties":{"training":{"type":"array","maxItems":20,"description":"ids of the node types for training workloads","items":{"type":"string"}},"workspace":{"type":"array","maxItems":20,"description":"ids of the node types for workspace workloads","items":{"type":"string"}},"names":{"nullable":true,"type":"object","maxProperties":20,"additionalProperties":{"type":"string"},"description":"mapping of ids to names"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"OvertimeData":{"type":"object","properties":{"range24hData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range7dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range30dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]}}},"OvertimeRangeData":{"type":"object","description":"Average data for the specified time range, or for the lifetime of the project/department if it exists for less than the time range.","properties":{"averageGpuAllocation":{"type":"number","format":"double","description":"The average gpu devices allocation of the project/department."},"averageGpuUtilization":{"type":"number","format":"double","description":"The average gpu utilization percentage of the project/department."},"averageGpuMemoryUtilization":{"type":"number","format":"double","description":"The average gpu memory utilization percentage of the project/department. Only available for cluster versions >= 2.22.","nullable":true},"updatedAt":{"type":"string","format":"date-time"}}},"ResourcesNullable":{"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","nullable":true}}},"NonNullResource":{"properties":{"deserved":{"type":"number","format":"double","description":"The GPU quota assigned to this org-unit.","default":0},"limit":{"type":"number","format":"double","description":"The maximum GPU device allocation the org-unit can get from this node pool, representing the maximum sum of assigned quota and over-quota GPUs. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","format":"double","description":"The resource quota assigned to this org-unit.","nullable":true},"limit":{"type":"number","format":"double","description":"The maximum resource allocation for this org-unit. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"units":{"type":"string","description":"The unit of measurement for CPU memory values.","enum":["Mib","MB","GB"]},"Department":{"allOf":[{"$ref":"#/components/schemas/DataDepartmentFields"},{"type":"object","required":["id","name","description","createdAt","updatedAt","totalResources"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"children":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/DepartmentProjectChild"}},"projectsAggregatedResources":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/AggregatedResources"}},"status":{"type":"object","properties":{"nodePoolQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/QuotaStatusNodePool"}},"quotaStatus":{"$ref":"#/components/schemas/QuotaStatus"}}},"totalResources":{"$ref":"#/components/schemas/TotalResources"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Organization per Node Pool"}}}]},"DepartmentProjectChild":{"type":"object","description":"Department or project child","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentProjectChild"}}}},"AggregatedResources":{"type":"object","description":"Sum of all resources assigned to the projects under this department per Node Pool","required":["nodePool"],"properties":{"nodePool":{"type":"object","description":"the node pool which the resources refer to","required":["id","name"],"properties":{"id":{"type":"string","description":"node pool id"},"name":{"type":"string","description":"node pool name"}}},"gpu":{"$ref":"#/components/schemas/DeservedResource"},"cpu":{"$ref":"#/components/schemas/DeservedResource"},"memory":{"allOf":[{"$ref":"#/components/schemas/DeservedResource"},{"type":"object","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"DeservedResource":{"properties":{"deserved":{"type":"number","format":"double","description":"The project resource allocation that it is deserved to get in case the cluster has those resources","nullable":true}}},"QuotaStatusNodePool":{"allOf":[{"$ref":"#/components/schemas/QuotaStatus"},{"type":"object","required":["nodePoolName","nodePoolId"],"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to"},"nodePoolId":{"type":"string","description":"The node pool id which the current quota status refers to"}}}]},"QuotaStatus":{"type":"object","description":"Sum of all quota statuses of all the node pools","properties":{"allocated":{"$ref":"#/components/schemas/QuotaStatusResource"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResource"},"requested":{"$ref":"#/components/schemas/QuotaStatusResource"}}},"QuotaStatusResource":{"type":"object","properties":{"gpu":{"type":"number","format":"double","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","format":"double","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","format":"double","description":"Memory in MB (allocated/requested/...)."}}},"TotalResources":{"type":"object","properties":{"gpuQuota":{"type":"number","format":"double","description":"Total gpu quota of the org unit","nullable":true},"cpuQuota":{"type":"number","format":"double","description":"Total cpu quota of the org unit in Millicores","nullable":true},"memoryQuota":{"type":"number","format":"double","description":"Total memory quota of the org unit in MB","nullable":true}}},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"required":["deserved"],"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","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"}}}},"409Conflict":{"description":"The specified resource already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/departments":{"post":{"summary":"Create department","operationId":"create_department","description":"Create Department","tags":["Departments"],"requestBody":{"description":"Department to create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentCreationRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Department"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"409":{"$ref":"#/components/responses/409Conflict"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get department

> Get department by Id

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentId":{"name":"departmentId","in":"path","required":true,"description":"The id of the department.","schema":{"type":"string","pattern":".*"}}},"schemas":{"Department":{"allOf":[{"$ref":"#/components/schemas/DataDepartmentFields"},{"type":"object","required":["id","name","description","createdAt","updatedAt","totalResources"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"children":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/DepartmentProjectChild"}},"projectsAggregatedResources":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/AggregatedResources"}},"status":{"type":"object","properties":{"nodePoolQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/QuotaStatusNodePool"}},"quotaStatus":{"$ref":"#/components/schemas/QuotaStatus"}}},"totalResources":{"$ref":"#/components/schemas/TotalResources"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Organization per Node Pool"}}}]},"DataDepartmentFields":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableDepartmentFields"},{"type":"object","required":["name","clusterId"],"properties":{"name":{"description":"The unique name of the department within the cluster. Must be a valid Kubernetes name (lowercase, alphanumeric, hyphens allowed).","type":"string","maxLength":63},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"overtimeData":{"$ref":"#/components/schemas/OvertimeData"}}}]},"DataUpdatableDepartmentFields":{"type":"object","description":"Updatable fields","required":["resources"],"properties":{"description":{"type":"string","description":"The description of the department."},"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"An ordered list of node pools that defines the default scheduling preference for workloads in this department. The Scheduler will attempt to schedule workloads on node pools in this order. This setting is enforced if no node pool list is defined in the workload policy.","type":"array","maxItems":20,"nullable":true,"items":{"type":"string"}},"nodeTypes":{"$ref":"#/components/schemas/NodeTypesPerWorkload"}}},"SchedulingRules":{"type":"object","nullable":true,"description":"Scheduling rules that define time limits and idle GPU timeouts for workloads in this org-unit. These rules help manage resource utilization by automatically terminating or preempting idle or long-running workloads.","properties":{"interactiveJobTimeLimitSeconds":{"type":"integer","description":"interactive job time limit in seconds","nullable":true,"minimum":1},"interactiveJobMaxIdleDurationSeconds":{"type":"integer","description":"interactive job max idle duration in seconds","nullable":true,"minimum":1},"interactiveJobPreemptIdleDurationSeconds":{"type":"integer","description":"interactive job preempt idle duration in seconds","nullable":true,"minimum":1},"trainingJobMaxIdleDurationSeconds":{"type":"integer","description":"training job max idle duration in seconds","nullable":true,"minimum":1},"trainingJobTimeLimitSeconds":{"type":"integer","description":"training job time limit in seconds","nullable":true,"minimum":1}}},"NodeTypesPerWorkload":{"description":"Node type configurations for different workload types (training, workspace). Specifies which node types are allowed for each workload type. Enforced when no node type is configured in the workload policy.","properties":{"training":{"type":"array","maxItems":20,"description":"ids of the node types for training workloads","items":{"type":"string"}},"workspace":{"type":"array","maxItems":20,"description":"ids of the node types for workspace workloads","items":{"type":"string"}},"names":{"nullable":true,"type":"object","maxProperties":20,"additionalProperties":{"type":"string"},"description":"mapping of ids to names"}}},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"OvertimeData":{"type":"object","properties":{"range24hData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range7dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range30dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]}}},"OvertimeRangeData":{"type":"object","description":"Average data for the specified time range, or for the lifetime of the project/department if it exists for less than the time range.","properties":{"averageGpuAllocation":{"type":"number","format":"double","description":"The average gpu devices allocation of the project/department."},"averageGpuUtilization":{"type":"number","format":"double","description":"The average gpu utilization percentage of the project/department."},"averageGpuMemoryUtilization":{"type":"number","format":"double","description":"The average gpu memory utilization percentage of the project/department. Only available for cluster versions >= 2.22.","nullable":true},"updatedAt":{"type":"string","format":"date-time"}}},"DepartmentProjectChild":{"type":"object","description":"Department or project child","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentProjectChild"}}}},"AggregatedResources":{"type":"object","description":"Sum of all resources assigned to the projects under this department per Node Pool","required":["nodePool"],"properties":{"nodePool":{"type":"object","description":"the node pool which the resources refer to","required":["id","name"],"properties":{"id":{"type":"string","description":"node pool id"},"name":{"type":"string","description":"node pool name"}}},"gpu":{"$ref":"#/components/schemas/DeservedResource"},"cpu":{"$ref":"#/components/schemas/DeservedResource"},"memory":{"allOf":[{"$ref":"#/components/schemas/DeservedResource"},{"type":"object","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"DeservedResource":{"properties":{"deserved":{"type":"number","format":"double","description":"The project resource allocation that it is deserved to get in case the cluster has those resources","nullable":true}}},"units":{"type":"string","description":"The unit of measurement for CPU memory values.","enum":["Mib","MB","GB"]},"QuotaStatusNodePool":{"allOf":[{"$ref":"#/components/schemas/QuotaStatus"},{"type":"object","required":["nodePoolName","nodePoolId"],"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to"},"nodePoolId":{"type":"string","description":"The node pool id which the current quota status refers to"}}}]},"QuotaStatus":{"type":"object","description":"Sum of all quota statuses of all the node pools","properties":{"allocated":{"$ref":"#/components/schemas/QuotaStatusResource"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResource"},"requested":{"$ref":"#/components/schemas/QuotaStatusResource"}}},"QuotaStatusResource":{"type":"object","properties":{"gpu":{"type":"number","format":"double","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","format":"double","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","format":"double","description":"Memory in MB (allocated/requested/...)."}}},"TotalResources":{"type":"object","properties":{"gpuQuota":{"type":"number","format":"double","description":"Total gpu quota of the org unit","nullable":true},"cpuQuota":{"type":"number","format":"double","description":"Total cpu quota of the org unit in Millicores","nullable":true},"memoryQuota":{"type":"number","format":"double","description":"Total memory quota of the org unit in MB","nullable":true}}},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"required":["deserved"],"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","nullable":true}}},"NonNullResource":{"properties":{"deserved":{"type":"number","format":"double","description":"The GPU quota assigned to this org-unit.","default":0},"limit":{"type":"number","format":"double","description":"The maximum GPU device allocation the org-unit can get from this node pool, representing the maximum sum of assigned quota and over-quota GPUs. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","format":"double","description":"The resource quota assigned to this org-unit.","nullable":true},"limit":{"type":"number","format":"double","description":"The maximum resource allocation for this org-unit. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"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"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/departments/{departmentId}":{"get":{"summary":"Get department","operationId":"get_department","description":"Get department by Id","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentId"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Department"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Update department

> Update department by Id

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentId":{"name":"departmentId","in":"path","required":true,"description":"The id of the department.","schema":{"type":"string","pattern":".*"}}},"schemas":{"DepartmentUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableDepartmentFields"},{"properties":{"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourcesNullable"},"description":"Resources assigned to this Organization per Node Pool"}}}]},"DataUpdatableDepartmentFields":{"type":"object","description":"Updatable fields","required":["resources"],"properties":{"description":{"type":"string","description":"The description of the department."},"schedulingRules":{"$ref":"#/components/schemas/SchedulingRules"},"defaultNodePools":{"description":"An ordered list of node pools that defines the default scheduling preference for workloads in this department. The Scheduler will attempt to schedule workloads on node pools in this order. This setting is enforced if no node pool list is defined in the workload policy.","type":"array","maxItems":20,"nullable":true,"items":{"type":"string"}},"nodeTypes":{"$ref":"#/components/schemas/NodeTypesPerWorkload"}}},"SchedulingRules":{"type":"object","nullable":true,"description":"Scheduling rules that define time limits and idle GPU timeouts for workloads in this org-unit. These rules help manage resource utilization by automatically terminating or preempting idle or long-running workloads.","properties":{"interactiveJobTimeLimitSeconds":{"type":"integer","description":"interactive job time limit in seconds","nullable":true,"minimum":1},"interactiveJobMaxIdleDurationSeconds":{"type":"integer","description":"interactive job max idle duration in seconds","nullable":true,"minimum":1},"interactiveJobPreemptIdleDurationSeconds":{"type":"integer","description":"interactive job preempt idle duration in seconds","nullable":true,"minimum":1},"trainingJobMaxIdleDurationSeconds":{"type":"integer","description":"training job max idle duration in seconds","nullable":true,"minimum":1},"trainingJobTimeLimitSeconds":{"type":"integer","description":"training job time limit in seconds","nullable":true,"minimum":1}}},"NodeTypesPerWorkload":{"description":"Node type configurations for different workload types (training, workspace). Specifies which node types are allowed for each workload type. Enforced when no node type is configured in the workload policy.","properties":{"training":{"type":"array","maxItems":20,"description":"ids of the node types for training workloads","items":{"type":"string"}},"workspace":{"type":"array","maxItems":20,"description":"ids of the node types for workspace workloads","items":{"type":"string"}},"names":{"nullable":true,"type":"object","maxProperties":20,"additionalProperties":{"type":"string"},"description":"mapping of ids to names"}}},"ResourcesNullable":{"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","nullable":true}}},"NonNullResource":{"properties":{"deserved":{"type":"number","format":"double","description":"The GPU quota assigned to this org-unit.","default":0},"limit":{"type":"number","format":"double","description":"The maximum GPU device allocation the org-unit can get from this node pool, representing the maximum sum of assigned quota and over-quota GPUs. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","format":"double","description":"The resource quota assigned to this org-unit.","nullable":true},"limit":{"type":"number","format":"double","description":"The maximum resource allocation for this org-unit. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"units":{"type":"string","description":"The unit of measurement for CPU memory values.","enum":["Mib","MB","GB"]},"Department":{"allOf":[{"$ref":"#/components/schemas/DataDepartmentFields"},{"type":"object","required":["id","name","description","createdAt","updatedAt","totalResources"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"children":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/DepartmentProjectChild"}},"projectsAggregatedResources":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/AggregatedResources"}},"status":{"type":"object","properties":{"nodePoolQuotaStatuses":{"type":"array","items":{"$ref":"#/components/schemas/QuotaStatusNodePool"}},"quotaStatus":{"$ref":"#/components/schemas/QuotaStatus"}}},"totalResources":{"$ref":"#/components/schemas/TotalResources"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/Resources"},"description":"Resources assigned to this Organization per Node Pool"}}}]},"DataDepartmentFields":{"allOf":[{"$ref":"#/components/schemas/DataUpdatableDepartmentFields"},{"type":"object","required":["name","clusterId"],"properties":{"name":{"description":"The unique name of the department within the cluster. Must be a valid Kubernetes name (lowercase, alphanumeric, hyphens allowed).","type":"string","maxLength":63},"clusterId":{"$ref":"#/components/schemas/ClusterId"},"overtimeData":{"$ref":"#/components/schemas/OvertimeData"}}}]},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"OvertimeData":{"type":"object","properties":{"range24hData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range7dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]},"range30dData":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/OvertimeRangeData"}]}}},"OvertimeRangeData":{"type":"object","description":"Average data for the specified time range, or for the lifetime of the project/department if it exists for less than the time range.","properties":{"averageGpuAllocation":{"type":"number","format":"double","description":"The average gpu devices allocation of the project/department."},"averageGpuUtilization":{"type":"number","format":"double","description":"The average gpu utilization percentage of the project/department."},"averageGpuMemoryUtilization":{"type":"number","format":"double","description":"The average gpu memory utilization percentage of the project/department. Only available for cluster versions >= 2.22.","nullable":true},"updatedAt":{"type":"string","format":"date-time"}}},"DepartmentProjectChild":{"type":"object","description":"Department or project child","required":["id","name"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentProjectChild"}}}},"AggregatedResources":{"type":"object","description":"Sum of all resources assigned to the projects under this department per Node Pool","required":["nodePool"],"properties":{"nodePool":{"type":"object","description":"the node pool which the resources refer to","required":["id","name"],"properties":{"id":{"type":"string","description":"node pool id"},"name":{"type":"string","description":"node pool name"}}},"gpu":{"$ref":"#/components/schemas/DeservedResource"},"cpu":{"$ref":"#/components/schemas/DeservedResource"},"memory":{"allOf":[{"$ref":"#/components/schemas/DeservedResource"},{"type":"object","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"DeservedResource":{"properties":{"deserved":{"type":"number","format":"double","description":"The project resource allocation that it is deserved to get in case the cluster has those resources","nullable":true}}},"QuotaStatusNodePool":{"allOf":[{"$ref":"#/components/schemas/QuotaStatus"},{"type":"object","required":["nodePoolName","nodePoolId"],"properties":{"nodePoolName":{"type":"string","description":"The node pool name which the current quota status refers to"},"nodePoolId":{"type":"string","description":"The node pool id which the current quota status refers to"}}}]},"QuotaStatus":{"type":"object","description":"Sum of all quota statuses of all the node pools","properties":{"allocated":{"$ref":"#/components/schemas/QuotaStatusResource"},"allocatedNonPreemptible":{"$ref":"#/components/schemas/QuotaStatusResource"},"requested":{"$ref":"#/components/schemas/QuotaStatusResource"}}},"QuotaStatusResource":{"type":"object","properties":{"gpu":{"type":"number","format":"double","description":"The number of GPUs (allocated/requested/...)."},"cpu":{"type":"number","format":"double","description":"CPU in Millicores (allocated/requested/...)."},"memory":{"type":"number","format":"double","description":"Memory in MB (allocated/requested/...)."}}},"TotalResources":{"type":"object","properties":{"gpuQuota":{"type":"number","format":"double","description":"Total gpu quota of the org unit","nullable":true},"cpuQuota":{"type":"number","format":"double","description":"Total cpu quota of the org unit in Millicores","nullable":true},"memoryQuota":{"type":"number","format":"double","description":"Total memory quota of the org unit in MB","nullable":true}}},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"required":["deserved"],"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","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"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/departments/{departmentId}":{"put":{"summary":"Update department","operationId":"update_department","description":"Update department by Id","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentId"}],"requestBody":{"description":"Department to update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentUpdateRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Department"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Delete department

> Delete department by Id

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentId":{"name":"departmentId","in":"path","required":true,"description":"The id of the department.","schema":{"type":"string","pattern":".*"}}},"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"}}}},"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/org-unit/departments/{departmentId}":{"delete":{"summary":"Delete department","operationId":"delete_department","description":"Delete department by Id","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentId"}],"responses":{"204":{"description":"Deleted"},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Update department resources

> Update department resources by Id

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentId":{"name":"departmentId","in":"path","required":true,"description":"The id of the department.","schema":{"type":"string","pattern":".*"}}},"schemas":{"ResourcesUpdateRequest":{"type":"array","items":{"$ref":"#/components/schemas/ResourcesNullable"},"description":"Resources assigned to this Project per Node Pool"},"ResourcesNullable":{"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","nullable":true}}},"NonNullResource":{"properties":{"deserved":{"type":"number","format":"double","description":"The GPU quota assigned to this org-unit.","default":0},"limit":{"type":"number","format":"double","description":"The maximum GPU device allocation the org-unit can get from this node pool, representing the maximum sum of assigned quota and over-quota GPUs. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","format":"double","description":"The resource quota assigned to this org-unit.","nullable":true},"limit":{"type":"number","format":"double","description":"The maximum resource allocation for this org-unit. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"units":{"type":"string","description":"The unit of measurement for CPU memory values.","enum":["Mib","MB","GB"]},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"required":["deserved"],"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","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/org-unit/departments/{departmentId}/resources":{"put":{"summary":"Update department resources","operationId":"update_department_resources","description":"Update department resources by Id","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentId"}],"requestBody":{"description":"Department resources to update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourcesUpdateRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Resources"}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Patch department resources

> Partial updates to specific items in the list. Should be used for update one or more attributes of an item without modifying the entire resource.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentId":{"name":"departmentId","in":"path","required":true,"description":"The id of the department.","schema":{"type":"string","pattern":".*"}}},"schemas":{"ResourcesUpdateRequest":{"type":"array","items":{"$ref":"#/components/schemas/ResourcesNullable"},"description":"Resources assigned to this Project per Node Pool"},"ResourcesNullable":{"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","nullable":true}}},"NonNullResource":{"properties":{"deserved":{"type":"number","format":"double","description":"The GPU quota assigned to this org-unit.","default":0},"limit":{"type":"number","format":"double","description":"The maximum GPU device allocation the org-unit can get from this node pool, representing the maximum sum of assigned quota and over-quota GPUs. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"Resource":{"properties":{"deserved":{"type":"number","format":"double","description":"The resource quota assigned to this org-unit.","nullable":true},"limit":{"type":"number","format":"double","description":"The maximum resource allocation for this org-unit. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"units":{"type":"string","description":"The unit of measurement for CPU memory values.","enum":["Mib","MB","GB"]},"Resources":{"required":["gpu"],"properties":{"nodePool":{"required":["id"],"properties":{"id":{"type":"string","description":"The ID of the node pool."},"name":{"type":"string","description":"The name of the node pool."}},"description":"The node pool to which this resource configuration applies.","type":"object","nullable":true},"gpu":{"required":["deserved"],"allOf":[{"$ref":"#/components/schemas/NonNullResource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]},"rank":{"type":"string","nullable":true,"description":"The scheduling rank of this org-unit within the node pool. Determines the scheduling order of workloads between org-units. Workloads in higher-ranked org-units are scheduled before workloads in lower-ranked org-units. For example, all workloads in rank \"High\" will be scheduled before all workloads in rank \"Medium\".","default":"MediumLow"},"priority":{"deprecated":true,"description":"Deprecated. Use rank instead. The scheduling priority for workloads in this node pool.","type":"string","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/org-unit/departments/{departmentId}/resources":{"patch":{"summary":"Patch department resources","operationId":"patch_department_resources","description":"Partial updates to specific items in the list. Should be used for update one or more attributes of an item without modifying the entire resource.","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentId"}],"requestBody":{"description":"Department resources to update.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourcesUpdateRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Resources"}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get department metrics data.

> Retrieves department data metrics from the metrics database. Use in reporting and analysis tools.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentId":{"name":"departmentId","in":"path","required":true,"description":"The id of the department.","schema":{"type":"string","pattern":".*"}},"OrgUnitMetricTypes":{"name":"metricType","in":"query","required":true,"description":"Specify which data to request.","explode":false,"schema":{"type":"array","maxItems":10,"items":{"$ref":"#/components/schemas/OrgUnitMetricType"}}},"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}},"FilterByNodepoolName":{"name":"nodepoolName","in":"query","description":"Filter using the nodepool.","required":false,"schema":{"type":"string"}}},"schemas":{"OrgUnitMetricType":{"type":"string","description":"Specify which metric data to request.","enum":["GPU_QUOTA","CPU_QUOTA_MILLICORES","CPU_MEMORY_QUOTA_MB","GPU_ALLOCATION","CPU_ALLOCATION_MILLICORES","CPU_MEMORY_ALLOCATION_MB","GPU_MEMORY_UTILIZATION","GPU_UTILIZATION","CPU_UTILIZATION","CPU_MEMORY_UTILIZATION","WORKLOADS_COUNT"]},"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/org-unit/departments/{departmentId}/metrics":{"get":{"summary":"Get department metrics data.","operationId":"get_department_metrics","description":"Retrieves department data metrics from the metrics database. Use in reporting and analysis tools.","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentId"},{"$ref":"#/components/parameters/OrgUnitMetricTypes"},{"$ref":"#/components/parameters/StartRequired"},{"$ref":"#/components/parameters/EndRequired"},{"$ref":"#/components/parameters/NumberOfSamples"},{"$ref":"#/components/parameters/FilterByNodepoolName"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"}},"text/csv":{}}},"207":{"description":"Partial success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"404":{"$ref":"#/components/responses/404NotFound"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## GET /api/v1/org-unit/departments/telemetry

> Get departments telemetry

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"FilterByCluster":{"name":"clusterId","in":"query","description":"Filter using the Universally Unique Identifier (UUID) of the cluster.","required":false,"schema":{"type":"string","format":"uuid"}},"FilterByNodepoolName":{"name":"nodepoolName","in":"query","description":"Filter using the nodepool.","required":false,"schema":{"type":"string"}},"FilterByDepartment":{"name":"departmentId","in":"query","description":"Filter using the department id.","required":false,"schema":{"type":"string"}},"TelemetryGroupByDepartment":{"name":"groupBy","in":"query","description":"department fields to group the data by","explode":false,"required":false,"schema":{"type":"array","maxItems":2,"items":{"type":"string","enum":["CLUSTER_ID"]}}},"TelemetryType1":{"name":"telemetryType","in":"query","required":true,"description":"specifies what data to request","schema":{"$ref":"#/components/schemas/OrgUnitTelemetryType"}}},"schemas":{"OrgUnitTelemetryType":{"type":"string","description":"Select a telemetry type.","enum":["GPU_QUOTA","CPU_QUOTA","MEMORY_QUOTA","GPU_ALLOCATION","CPU_ALLOCATION","MEMORY_ALLOCATION","GPU_ALLOCATION_NON_PREEMPTIBLE","CPU_ALLOCATION_NON_PREEMPTIBLE","MEMORY_ALLOCATION_NON_PREEMPTIBLE"]},"TelemetryResponse":{"type":"object","required":["type","timestamp","values"],"properties":{"type":{"type":"string","description":"specifies what data returned"},"timestamp":{"type":"string","format":"date-time"},"values":{"type":"array","items":{"type":"object","required":["value"],"properties":{"value":{"type":"string"},"groups":{"type":"array","description":"columns the data is grouped by","maxItems":2,"items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"}}}}}}}}},"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"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/departments/telemetry":{"get":{"summary":"Get departments telemetry","operationId":"get_departments_telemetry","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/FilterByCluster"},{"$ref":"#/components/parameters/FilterByNodepoolName"},{"$ref":"#/components/parameters/FilterByDepartment"},{"$ref":"#/components/parameters/TelemetryGroupByDepartment"},{"$ref":"#/components/parameters/TelemetryType1"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Count departments

> count departments

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentsFilterBy":{"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 contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.","schema":{"type":"array","maxItems":10,"items":{"type":"string","pattern":"^(name|clusterId|totalGpuQuota|gpuAllocated|createdAt|avgGpuAllocation24h|avgGpuUtilization24h|avgGpuMemoryUtilization24h|avgGpuAllocation7d|avgGpuUtilization7d|avgGpuMemoryUtilization7d|avgGpuAllocation30d|avgGpuUtilization30d|avgGpuMemoryUtilization30d)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false}},"schemas":{"CountResponse":{"type":"object","required":["count"],"properties":{"count":{"type":"integer","format":"int64"}}},"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"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/departments/count":{"get":{"summary":"Count departments","operationId":"count_departments","description":"count departments","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentsFilterBy"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Get departments node pool resources

> List departments node pool resources

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentNodePoolResourcesFilterBy":{"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 contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.","schema":{"type":"array","maxItems":10,"items":{"type":"string","pattern":"^(nodePoolName|nodePoolId|orgUnitId|orgUnitName|rank|clusterId)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false},"DepartmentNodePoolResourcesSortBy":{"name":"sortBy","in":"query","required":false,"description":"Sort results by a parameters.","schema":{"$ref":"#/components/schemas/DepartmentNodePoolResourcesFilterSortFields"}},"SortOrder":{"name":"sortOrder","in":"query","required":false,"description":"Sort results in descending or ascending order.","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},"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":{"DepartmentNodePoolResourcesFilterSortFields":{"type":"string","enum":["nodePoolName","nodePoolId","orgUnitId","orgUnitName","clusterId","gpuDeserved","gpuOverQuotaWeight"]},"DepartmentNodePoolResources":{"type":"object","required":["id","orgUnitId","orgUnitName","nodePoolId","nodePoolName","rank","resources","clusterId"],"properties":{"id":{"description":"The unique ID of the resources.","type":"string"},"orgUnitId":{"description":"The project/department ID.","type":"string"},"orgUnitName":{"description":"The project/department name.","type":"string"},"clusterId":{"type":"string"},"nodePoolId":{"type":"string"},"nodePoolName":{"type":"string"},"rank":{"type":"string"},"resources":{"$ref":"#/components/schemas/ResourcesPerNodePool"}}},"ResourcesPerNodePool":{"type":"object","properties":{"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"Resource":{"properties":{"deserved":{"type":"number","format":"double","description":"The resource quota assigned to this org-unit.","nullable":true},"limit":{"type":"number","format":"double","description":"The maximum resource allocation for this org-unit. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"units":{"type":"string","description":"The unit of measurement for CPU memory values.","enum":["Mib","MB","GB"]},"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"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/departments/node-pool-resources":{"get":{"summary":"Get departments node pool resources","operationId":"get_department_node_pool_resources","description":"List departments node pool resources","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentNodePoolResourcesFilterBy"},{"$ref":"#/components/parameters/DepartmentNodePoolResourcesSortBy"},{"$ref":"#/components/parameters/SortOrder"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Search"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","required":["nodePoolResources"],"properties":{"nodePoolResources":{"type":"array","items":{"$ref":"#/components/schemas/DepartmentNodePoolResources"}},"next":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Count departments node pool resources

> Count departments node pool resources

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"DepartmentNodePoolResourcesFilterBy":{"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 contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.","schema":{"type":"array","maxItems":10,"items":{"type":"string","pattern":"^(nodePoolName|nodePoolId|orgUnitId|orgUnitName|rank|clusterId)(==|!=|<=|>=|=@|!@|=\\^|=\\$).+$"}},"explode":false},"Search":{"name":"search","in":"query","required":false,"description":"Filter results by a free text search.","schema":{"type":"string"}}},"schemas":{"CountResponse":{"type":"object","required":["count"],"properties":{"count":{"type":"integer","format":"int64"}}},"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"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/org-unit/departments/node-pool-resources/count":{"get":{"summary":"Count departments node pool resources","operationId":"count_department_node_pool_resources","description":"Count departments node pool resources","tags":["Departments"],"parameters":[{"$ref":"#/components/parameters/DepartmentNodePoolResourcesFilterBy"},{"$ref":"#/components/parameters/Search"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Patch multiple departments node pool resources in batch.

> Partially updates node pool resource quotas for multiple departments in a single request.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.25"},"tags":[{"name":"Departments","description":""}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"BatchPatchNodePoolResourcesRequest":{"type":"object","description":"Batch of node pool resources patch requests.","required":["patchRequests"],"properties":{"patchRequests":{"type":"array","minItems":1,"maxItems":100,"description":"Array of node pool resources patch requests.","items":{"$ref":"#/components/schemas/NodePoolResourcesPatchRequest"}}}},"NodePoolResourcesPatchRequest":{"type":"object","required":["orgUnitId","nodePoolId"],"properties":{"orgUnitId":{"description":"The project/department ID.","type":"string"},"nodePoolId":{"type":"string"},"rank":{"nullable":true,"type":"string"},"resources":{"$ref":"#/components/schemas/ResourcesPerNodePoolNullable"}}},"ResourcesPerNodePoolNullable":{"type":"object","nullable":true,"properties":{"gpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"Resource":{"properties":{"deserved":{"type":"number","format":"double","description":"The resource quota assigned to this org-unit.","nullable":true},"limit":{"type":"number","format":"double","description":"The maximum resource allocation for this org-unit. Set to null for unlimited.","nullable":true},"overQuotaWeight":{"type":"number","format":"double","description":"The weight assigned to determine the org-unit's share of over-quota resources within its rank. When multiple org-units share the same rank in a node pool, resources are distributed proportionally based on their weights. Valid values: 1–20. Requires over-quota weight to be enabled. When enabled, the default is 2. See [GPU over quota](https://run-ai-docs.nvidia.com/self-hosted/2.25/platform-management/aiinitiatives/organization/projects#gpu-over-quota) for more details.\n","nullable":true}}},"units":{"type":"string","description":"The unit of measurement for CPU memory values.","enum":["Mib","MB","GB"]},"BatchPatchDepartmentResourcesResponse":{"type":"object","required":["id","totalRequested","totalSuccessful","totalFailed"],"properties":{"id":{"type":"string","format":"uuid","description":"The unique ID of the batch operation."},"succeeded":{"type":"array","description":"Successfully patched department node pool resources results.","items":{"$ref":"#/components/schemas/DepartmentNodePoolResources"}},"failed":{"type":"array","description":"Failed patch operations with the original payload and error details.","items":{"$ref":"#/components/schemas/FailedNodePoolResourcesPatchRequest"}},"totalRequested":{"type":"integer","description":"Total number of items requested in the batch."},"totalSuccessful":{"type":"integer","description":"Number of items successfully processed."},"totalFailed":{"type":"integer","description":"Number of items that failed."}}},"DepartmentNodePoolResources":{"type":"object","required":["id","orgUnitId","orgUnitName","nodePoolId","nodePoolName","rank","resources","clusterId"],"properties":{"id":{"description":"The unique ID of the resources.","type":"string"},"orgUnitId":{"description":"The project/department ID.","type":"string"},"orgUnitName":{"description":"The project/department name.","type":"string"},"clusterId":{"type":"string"},"nodePoolId":{"type":"string"},"nodePoolName":{"type":"string"},"rank":{"type":"string"},"resources":{"$ref":"#/components/schemas/ResourcesPerNodePool"}}},"ResourcesPerNodePool":{"type":"object","properties":{"gpu":{"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources."}]},"cpu":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"description":"Defines the CPU quota assignment in millicores (1000 millicores = 1 CPU core), maximum CPU allocation, and weight."}]},"memory":{"type":"object","nullable":true,"allOf":[{"$ref":"#/components/schemas/Resource"},{"type":"object","description":"Defines the CPU memory quota assignment, maximum allocation, and weight.","required":["units"],"properties":{"units":{"$ref":"#/components/schemas/units"}}}]}}},"FailedNodePoolResourcesPatchRequest":{"type":"object","properties":{"payload":{"$ref":"#/components/schemas/NodePoolResourcesPatchRequest"},"code":{"type":"integer","description":"HTTP error code."},"message":{"type":"string","description":"Error message."}}},"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"}}}},"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/org-unit/departments/node-pool-resources/batch-patch":{"post":{"summary":"Patch multiple departments node pool resources in batch.","operationId":"batch_patch_department_node_pool_resources","description":"Partially updates node pool resource quotas for multiple departments in a single request.","tags":["Departments"],"requestBody":{"description":"Batch of department resources patch requests.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchPatchNodePoolResourcesRequest"}}}},"responses":{"200":{"description":"Batch patch processed. Returns succeeded and failed items with totals and a batch id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchPatchDepartmentResourcesResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"401":{"$ref":"#/components/responses/401Unauthorized"},"403":{"$ref":"#/components/responses/403Forbidden"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://run-ai-docs.nvidia.com/api/2.25/organizations/departments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
