> This page is for version 3.3.0 (default).
> For other versions, use one of these documentation indexes:
> - 3.3.0 (default): https://docs.nvidia.com/vss/3.3.0/llms.txt
> - Dev: https://docs.nvidia.com/vss/dev/llms.txt

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

# Get behavior locations

GET https://ai.nvidia.com/api/v3.3/analytics/tracker/behavior-locations

Retrieve behaviors and their corresponding locations over a time range, optionally filtered by behavior identifiers or global object identifier.

Reference: https://docs.nvidia.com/vss/system-components/middleware/api-gateway-mcp/video-analytics-api/video-analytics-api-reference/tracker/controller-tracker-get-behavior-locations

## Request

### Query parameters

- `fromTimestamp` (datetime, required)
- `toTimestamp` (datetime, required)
- `behaviorIds` (list of string, optional) — This parameter is incompatible with globalId. Only one of them can exist in the query.
- `globalId` (string, optional) — This parameter is incompatible with behaviorIds. Only one of them can exist in the query.

## Response

### 200

Successful Operation.

- `behaviors` (list of BehaviorLocationsBehaviorsItems, required)

## Errors

### 400 Bad Request Error

Bad Request. This response will be sent if any of the required params are not present or if extra params are passed. It will also be sent if parameter dependencies (mentioned in parameter descriptions) are not satisfied.

- `error` (string, required)

### 404 Not Found Error

Resource Not Found

- `error` (string, required)

### 422 Unprocessable Entity Error

Unprocessable Entity

- `error` (string, required)

### 500 Internal Server Error

Internal Server Error

- `error` (string, required)

## Types

### BehaviorLocationsBehaviorsItems

- `id` (string, required)
- `locations` (Locations, required)
- `smoothLocations` (Locations, required)
- `length` (long, required)
- `speedOverTime` (list of double, required)
- `speed` (double, required)
- `timeInterval` (float, required)
- `distance` (double, required)
- `bearing` (double, required)
- `timestamp` (datetime, required)
- `end` (datetime, required)
- `Id` (string, optional)

### Locations

- `type` (enum, required) — Type of Geoshape
  - Allowed values: `linestring`
- `coordinates` (list of list of double, required)

## Examples

**Response**

```json
{
  "behaviors": [
    {
      "id": "Cam1 #-# 11",
      "locations": {
        "type": "linestring",
        "coordinates": [
          [
            1
          ]
        ]
      },
      "smoothLocations": {
        "type": "linestring",
        "coordinates": [
          [
            1
          ]
        ]
      },
      "length": 1,
      "speedOverTime": [
        2.1,
        3.2
      ],
      "speed": 1.1,
      "timeInterval": 30,
      "distance": 1.1,
      "bearing": 1.1,
      "timestamp": "2022-08-25T00:00:00.000Z",
      "end": "2022-08-25T00:00:30.000Z",
      "Id": "logstash generated Id"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://ai.nvidia.com/api/v3.3/analytics/tracker/behavior-locations"

querystring = {"behaviorIds":"[\"Cam1 #-# 11\",\"Cam2 #-# 12\"]","fromTimestamp":"2022-08-24T00:00:10.000Z","globalId":"1","toTimestamp":"2022-08-24T00:01:10.000Z"}

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

print(response.json())
```

```javascript
const url = 'https://ai.nvidia.com/api/v3.3/analytics/tracker/behavior-locations?behaviorIds=%5B%22Cam1+%23-%23+11%22%2C%22Cam2+%23-%23+12%22%5D&fromTimestamp=2022-08-24T00%3A00%3A10.000Z&globalId=1&toTimestamp=2022-08-24T00%3A01%3A10.000Z';
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 := "https://ai.nvidia.com/api/v3.3/analytics/tracker/behavior-locations?behaviorIds=%5B%22Cam1+%23-%23+11%22%2C%22Cam2+%23-%23+12%22%5D&fromTimestamp=2022-08-24T00%3A00%3A10.000Z&globalId=1&toTimestamp=2022-08-24T00%3A01%3A10.000Z"

	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("https://ai.nvidia.com/api/v3.3/analytics/tracker/behavior-locations?behaviorIds=%5B%22Cam1+%23-%23+11%22%2C%22Cam2+%23-%23+12%22%5D&fromTimestamp=2022-08-24T00%3A00%3A10.000Z&globalId=1&toTimestamp=2022-08-24T00%3A01%3A10.000Z")

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

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("https://ai.nvidia.com/api/v3.3/analytics/tracker/behavior-locations?behaviorIds=%5B%22Cam1+%23-%23+11%22%2C%22Cam2+%23-%23+12%22%5D&fromTimestamp=2022-08-24T00%3A00%3A10.000Z&globalId=1&toTimestamp=2022-08-24T00%3A01%3A10.000Z")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://ai.nvidia.com/api/v3.3/analytics/tracker/behavior-locations?behaviorIds=%5B%22Cam1+%23-%23+11%22%2C%22Cam2+%23-%23+12%22%5D&fromTimestamp=2022-08-24T00%3A00%3A10.000Z&globalId=1&toTimestamp=2022-08-24T00%3A01%3A10.000Z');

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

```csharp
using RestSharp;

var client = new RestClient("https://ai.nvidia.com/api/v3.3/analytics/tracker/behavior-locations?behaviorIds=%5B%22Cam1+%23-%23+11%22%2C%22Cam2+%23-%23+12%22%5D&fromTimestamp=2022-08-24T00%3A00%3A10.000Z&globalId=1&toTimestamp=2022-08-24T00%3A01%3A10.000Z");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://ai.nvidia.com/api/v3.3/analytics/tracker/behavior-locations?behaviorIds=%5B%22Cam1+%23-%23+11%22%2C%22Cam2+%23-%23+12%22%5D&fromTimestamp=2022-08-24T00%3A00%3A10.000Z&globalId=1&toTimestamp=2022-08-24T00%3A01%3A10.000Z")! 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()
```