> 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 factory profile layout template

GET http://os-992244000006.local/api/v1/sensor/custom_profile/template/{udp_profile_lidar}

Returns the factory pixel assembler field layout for a built-in UDP lidar
profile via keeper command `get_active_asm_config {profile}`. Use this as a
starting template when authoring a custom profile. `CUSTOM` is not a valid
template. Returns a `CustomProfile` object or `null` when unavailable.
In mock/recovery mode returns `null`.

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

## Request

### Path parameters

- `udp_profile_lidar` (string, required) — Built-in UDP lidar profile name (alphanumeric and underscore only), e.g. `RNG15_RFL8_NIR8`.

## Response

### 200

Factory layout template for the requested profile, or null when unavailable

- `n_words` (integer, required) — Number of 32-bit output words in the custom profile.
- `fields` (list of CustomProfileField, required) — Placed fields within the custom profile word layout.

## Errors

### 400 Bad Request Error

Invalid or unsupported `udp_profile_lidar` path parameter

- `any`

### 500 Internal Server Error

Failed to read profile template from keeper

- `any`

## Types

### CustomProfileField

A single placed field in a custom profile. Allowed `view_id` and `variant_id` values are firmware-build-specific; use `GET /sensor/custom_profile/fields` for the authoritative list. `return_index` is required for multi-return data views.

- `view_id` (string, required)
- `offset` (integer, required) — Bit offset from the start of word 0.
- `variant_id` (string, optional)
- `return_index` (integer, optional)

## Examples

**Response**

```json
{
  "n_words": 2,
  "fields": [
    {
      "view_id": "range",
      "offset": 0,
      "variant_id": "eight_mm",
      "return_index": 0
    },
    {
      "view_id": "reflectivity",
      "offset": 16,
      "return_index": 0
    },
    {
      "view_id": "near_infrared",
      "offset": 32,
      "variant_id": "nir"
    }
  ]
}
```

**SDK Code**

```python
import requests

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

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'http://os-992244000006.local/api/v1/sensor/custom_profile/template/udp_profile_lidar';
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/template/udp_profile_lidar"

	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/template/udp_profile_lidar")

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/template/udp_profile_lidar")
  .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/template/udp_profile_lidar');

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

```csharp
using RestSharp;

var client = new RestClient("http://os-992244000006.local/api/v1/sensor/custom_profile/template/udp_profile_lidar");
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/template/udp_profile_lidar")! 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()
```