> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/switch-infrastructure/config-manager/llms.txt.

# Get password-users options for SitePasswordRotationWorkflow

GET /v1/workflow/site-password-rotation/form-options/password-users

Return password-users form options for SitePasswordRotationWorkflow.

Reference: https://docs.nvidia.com/switch-infrastructure/config-manager/services/temporal/temporal-api/workflow/get-workflow-form-options-site-password-rotation-password-users

## Authentication

- `Authorization` header (bearer token, required) — Bearer JWT used by CLI and machine clients on svc-* endpoints. Authentication is required by default, but deployments may disable it with [auth] required = false. Browser OIDC sessions, mTLS, SPIFFE identities, and trusted gateway identity headers may also satisfy authentication outside this generated client flow.

## Request

### Query parameters

- `location` (string, required) — Location containing the target devices
- `location_type` (string, optional, nullable) — DCIM location type for the location identifier
- `role` (list of string, optional, nullable)
- `status` (list of string, optional, nullable)
- `tenant` (string, optional, nullable)
- `managed_only` (boolean, optional, default: true) — Limit to NVIDIA Config Manager-managed devices

## Response

### 200

Successful Response

- `items` (list of OptionItem, required)
- `meta` (OptionSourceMeta, optional) — Optional metadata accompanying normalized form options.

## Errors

### 403 Forbidden Error

Forbidden

- `detail` (string, required)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 502 Bad Gateway Error

The option provider failed or returned invalid data.

- `detail` (string, required)

### 504 Gateway Timeout Error

The option provider timed out.

- `detail` (string, required)

## Types

### OptionItem

One normalized option rendered by a workflow form field.

- `label` (string, required)
- `value` (string, required)
- `description` (string, optional, nullable)
- `group` (string, optional, nullable)

### OptionSourceMeta

Optional metadata accompanying normalized form options.

- `matching_device_count` (integer, optional, nullable)
- `warnings` (list of string, optional)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `ctx` (ValidationErrorCtx, optional)
- `input` (any, optional)

### ValidationErrorLocItems

- string
- integer

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "items": [
    {
      "label": "string",
      "value": "string",
      "description": "string",
      "group": "string"
    }
  ],
  "meta": {
    "matching_device_count": 1,
    "warnings": [
      "string"
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/v1/workflow/site-password-rotation/form-options/password-users"

querystring = {"location":"location"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.example.com/v1/workflow/site-password-rotation/form-options/password-users?location=location';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/workflow/site-password-rotation/form-options/password-users?location=location"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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("https://api.example.com/v1/workflow/site-password-rotation/form-options/password-users?location=location")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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.get("https://api.example.com/v1/workflow/site-password-rotation/form-options/password-users?location=location")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/v1/workflow/site-password-rotation/form-options/password-users?location=location', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/v1/workflow/site-password-rotation/form-options/password-users?location=location");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/workflow/site-password-rotation/form-options/password-users?location=location")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```