> This page is for Firmware, version 4.0 (default).
> For other versions, use one of these documentation indexes:
> - 4.0 (default): https://docs.ouster.com/sensor-docs/firmware/4.0/llms.txt
> - 3.2: https://docs.ouster.com/sensor-docs/firmware/3.2/llms.txt

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

# Get custom profile field metadata

GET http://os-992244000006.local/api/v1/sensor/custom_profile/fields

Returns pixel assembler field metadata generated from `pixel_assembler_fields.json`
for building custom UDP lidar profiles (`udp_profile_lidar: CUSTOM`). Use this
endpoint to discover available data views, variants, bit widths, and slot assignments.

### Recommended workflow

1. `GET /sensor/custom_profile/fields` — load field metadata
2. `GET /sensor/custom_profile/templates` — list built-in UDP lidar profile names
3. `GET /sensor/custom_profile/template/{udp_profile_lidar}` — load factory field layout for a built-in profile
4. `GET /sensor/custom_profile?source=staged` — read staged custom profile
5. `POST /sensor/custom_profile/validation` — validate before staging
6. `POST /sensor/config` with `target=staged` — stage `{ udp_profile_lidar: "CUSTOM", udp_profile_lidar_custom: <cfg> }`
7. `POST /sensor/config?target=active` — apply staged config and reinitialize

Reference: https://docs.ouster.com/sensor-docs/firmware/api-reference/ouster-http-api/sensor-metadata/get-custom-profile-fields

## Response

### 200

Pixel assembler field metadata

- `n_fields` (integer, required)
- `max_words` (integer, required)
- `word_width` (integer, required)
- `max_fields_per_word` (integer, required)
- `fields` (list of CustomProfileFieldMeta, required)
- `data_views` (list of CustomProfileDataView, required)

## Errors

### 500 Internal Server Error

Pixel assembler field metadata not available

- `any`

## Types

### CustomProfileFieldMeta

- `name` (string, required)
- `width` (integer, required)
- `index` (integer, required)
- `slot` (integer, required)

### CustomProfileDataView

- `view_id` (string, required)
- `display_id` (string, required)
- `display_description` (string, required)
- `sdk_ids` (list of string, required)
- `array_length` (integer, required)
- `variants` (list of CustomProfileDataViewVariant, required)

### CustomProfileDataViewVariant

- `variant_id` (string, required)
- `display_id` (string, required)
- `units` (string, required)
- `multiplier` (double, required)
- `field_indices` (list of integer, required)
- `field_names` (list of string, required)
- `widths` (list of integer, required)
- `returns` (list of CustomProfileDataViewReturn, required)
- `computed_note` (string, optional, nullable)

### CustomProfileDataViewReturn

- `name` (string, required)
- `hardware_field` (string, required)
- `index` (integer, required)
- `width` (integer, required)
- `slot` (integer, required)
- `sdk_id` (string, optional, nullable)

## Examples

**Response**

```json
{
  "n_fields": 1,
  "max_words": 1,
  "word_width": 32,
  "max_fields_per_word": 1,
  "fields": [
    {
      "name": "string",
      "width": 1,
      "index": 1,
      "slot": 1
    }
  ],
  "data_views": [
    {
      "view_id": "string",
      "display_id": "string",
      "display_description": "string",
      "sdk_ids": [
        "string"
      ],
      "array_length": 1,
      "variants": [
        {
          "variant_id": "string",
          "display_id": "string",
          "units": "string",
          "multiplier": 1.1,
          "field_indices": [
            1
          ],
          "field_names": [
            "string"
          ],
          "widths": [
            1
          ],
          "returns": [
            {
              "name": "string",
              "hardware_field": "string",
              "index": 1,
              "width": 1,
              "slot": 1,
              "sdk_id": "string"
            }
          ],
          "computed_note": "string"
        }
      ]
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "http://os-992244000006.local/api/v1/sensor/custom_profile/fields"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'http://os-992244000006.local/api/v1/sensor/custom_profile/fields';
const options = {method: 'GET'};

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 := "http://os-992244000006.local/api/v1/sensor/custom_profile/fields"

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

	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://os-992244000006.local/api/v1/sensor/custom_profile/fields")

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

request = Net::HTTP::Get.new(url)

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("http://os-992244000006.local/api/v1/sensor/custom_profile/fields")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://os-992244000006.local/api/v1/sensor/custom_profile/fields');

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

```csharp
using RestSharp;

var client = new RestClient("http://os-992244000006.local/api/v1/sensor/custom_profile/fields");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://os-992244000006.local/api/v1/sensor/custom_profile/fields")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

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