> This page is for Self-Hosted, version v3.0 (default).
> For other versions, use one of these documentation indexes:
> - v3.0 (default): https://docs.nvidia.com/run-ai/self-hosted/v3.0/llms.txt
> - v2.26: https://docs.nvidia.com/run-ai/self-hosted/v2.26/llms.txt
> - v2.25: https://docs.nvidia.com/run-ai/self-hosted/v2.25/llms.txt
> - v2.24: https://docs.nvidia.com/run-ai/self-hosted/v2.24/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/run-ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/run-ai/_mcp/server.

# Patch department resources

PATCH http://localhost:8080/api/v1/org-unit/departments/{departmentId}/resources
Content-Type: application/json

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.

Reference: https://docs.nvidia.com/run-ai/self-hosted/reference/rest-api/endpoints/organizations/departments/patch-department-resources

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication

## Request

### Path parameters

- `departmentId` (string, required) — The id of the department.

### Body (application/json)

This endpoint expects a list of ResourcesNullable.

- `list of ResourcesNullable`

## Response

### 200

Updated

- `list of Resources`

## Errors

### 400 Bad Request Error

Bad request.

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 401 Unauthorized Error

Unauthorized

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 403 Forbidden Error

Forbidden

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 404 Not Found Error

The specified resource was not found

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 500 Internal Server Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 503 Service Unavailable Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

## Types

### ResourcesNullable

- `nodePool` (ResourcesNullableNodePool, optional, nullable) — The node pool to which this resource configuration applies.
- `gpu` (ResourcesNullableGpu, optional) — Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources.
- `cpu` (ResourcesNullableCpu, optional, nullable)
- `memory` (ResourcesNullableMemory, optional, nullable)
- `rank` (string, optional, nullable, default: MediumLow) — 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".

### Resources

- `gpu` (ResourcesGpu, required)
- `nodePool` (ResourcesNodePool, optional, nullable) — The node pool to which this resource configuration applies.
- `cpu` (ResourcesCpu, optional, nullable)
- `memory` (ResourcesMemory, optional, nullable)
- `rank` (string, optional, nullable, default: MediumLow) — 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".

### ResourcesNullableNodePool

The node pool to which this resource configuration applies.

- `id` (string, required) — The ID of the node pool.
- `name` (string, optional) — The name of the node pool.

### ResourcesNullableGpu

Defines the GPU quota assignment, maximum GPU device allocation, and weight assigned that determines the fairshare of over-quota resources.

- `deserved` (double, optional, default: 0) — The GPU quota assigned to this org-unit.
- `limit` (double, optional, nullable) — 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.
- `overQuotaWeight` (double, optional, nullable) — 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](/run-ai/self-hosted/documentation/platform-management/manage-ai-initiatives/organization/projects) for more details.

### ResourcesNullableCpu

- `deserved` (double, optional, nullable) — The resource quota assigned to this org-unit.
- `limit` (double, optional, nullable) — The maximum resource allocation for this org-unit. Set to null for unlimited.
- `overQuotaWeight` (double, optional, nullable) — 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](/run-ai/self-hosted/documentation/platform-management/manage-ai-initiatives/organization/projects) for more details.

### ResourcesNullableMemory

- `units` (enum, required) — The unit of measurement for CPU memory values.
  - Allowed values: `Mib`, `MB`, `GB`
- `deserved` (double, optional, nullable) — The resource quota assigned to this org-unit.
- `limit` (double, optional, nullable) — The maximum resource allocation for this org-unit. Set to null for unlimited.
- `overQuotaWeight` (double, optional, nullable) — 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](/run-ai/self-hosted/documentation/platform-management/manage-ai-initiatives/organization/projects) for more details.

### ResourcesGpu

- `deserved` (double, required, default: 0) — The GPU quota assigned to this org-unit.
- `limit` (double, optional, nullable) — 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.
- `overQuotaWeight` (double, optional, nullable) — 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](/run-ai/self-hosted/documentation/platform-management/manage-ai-initiatives/organization/projects) for more details.

### ResourcesNodePool

The node pool to which this resource configuration applies.

- `id` (string, required) — The ID of the node pool.
- `name` (string, optional) — The name of the node pool.

### ResourcesCpu

- `deserved` (double, optional, nullable) — The resource quota assigned to this org-unit.
- `limit` (double, optional, nullable) — The maximum resource allocation for this org-unit. Set to null for unlimited.
- `overQuotaWeight` (double, optional, nullable) — 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](/run-ai/self-hosted/documentation/platform-management/manage-ai-initiatives/organization/projects) for more details.

### ResourcesMemory

- `units` (enum, required) — The unit of measurement for CPU memory values.
  - Allowed values: `Mib`, `MB`, `GB`
- `deserved` (double, optional, nullable) — The resource quota assigned to this org-unit.
- `limit` (double, optional, nullable) — The maximum resource allocation for this org-unit. Set to null for unlimited.
- `overQuotaWeight` (double, optional, nullable) — 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](/run-ai/self-hosted/documentation/platform-management/manage-ai-initiatives/organization/projects) for more details.

## Examples

**Request**

```json
[
  {}
]
```

**Response**

```json
[
  {
    "gpu": {
      "deserved": 1000,
      "limit": 0,
      "overQuotaWeight": 2
    },
    "nodePool": {
      "id": "22",
      "name": "default"
    },
    "cpu": {
      "deserved": 1000,
      "limit": 0,
      "overQuotaWeight": 2
    },
    "memory": {
      "units": "Mib",
      "deserved": 1000,
      "limit": 0,
      "overQuotaWeight": 2
    },
    "rank": "High"
  }
]
```

**SDK Code**

```python
import requests

url = "http://localhost:8080/api/v1/org-unit/departments/1/resources"

payload = [{}]
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8080/api/v1/org-unit/departments/1/resources';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '[{}]'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/org-unit/departments/1/resources"

	payload := strings.NewReader("[\n  {}\n]")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/org-unit/departments/1/resources")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n  {}\n]"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("http://localhost:8080/api/v1/org-unit/departments/1/resources")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("[\n  {}\n]")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'http://localhost:8080/api/v1/org-unit/departments/1/resources', [
  'body' => '[
  {}
]',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/org-unit/departments/1/resources");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "[\n  {}\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [[]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/org-unit/departments/1/resources")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```