> 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 the status of the PTP daemon

GET http://os-992244000006.local/api/v1/time/ptp

Get the status of the PTP time synchronization daemon

__Note:__ See the [IEEE 1588-2008 standard for more details](https://ieeexplore.ieee.org/document/4579760) on the standard management messages.

Reference: https://docs.ouster.com/sensor-docs/firmware/api-reference/ouster-http-api/time/get-time-ptp

## Response

### 200

Sensor time information

- `current_data_set` (TimePtpCurrentDataSet, optional) — Result of the PMC `GET CURRENT_DATA_SET` command.
- `parent_data_set` (TimePtpParentDataSet, optional) — Result of the PMC `GET PARENT_DATA_SET` command.
- `port_data_set` (TimePtpPortDataSet, optional) — Result of the PMC `GET PORT_DATA_SET` command.
- `profile` (string, optional)
- `time_properties_data_set` (TimePtpTimePropertiesDataSet, optional) — Result of the PMC `GET TIME_PROPERTIES_DATA_SET` command.
- `time_status_np` (TimePtpTimeStatusNp, optional) — Result of the PMC `GET TIME_STATUS_NP` command. This is a linuxptp non-portable command. The [Red Hat manual](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-using_the_ptp_management_client) provides some more information on these fields.

## Types

### TimePtpCurrentDataSet

Result of the PMC `GET CURRENT_DATA_SET` command.

- `mean_path_delay` (double, optional)
- `offset_from_master` (double, optional) — Offset from master time source in nanoseconds as calculated during the last update from master.
- `steps_removed` (double, optional)

### TimePtpParentDataSet

Result of the PMC `GET PARENT_DATA_SET` command.

- `gm_clock_accuracy` (double, optional)
- `gm_clock_class` (double, optional)
- `gm_offset_scaled_log_variance` (double, optional)
- `grandmaster_identity` (string, optional) — This should match the local grandmaster clock. If this displays the sensor's clock identity (derived from Ethernet hardware address) then this indicates the sensor is not properly synchronized to a grandmaster.
- `grandmaster_priority1` (double, optional)
- `grandmaster_priority2` (double, optional)
- `observed_parent_clock_phase_change_rate` (double, optional)
- `observed_parent_offset_scaled_log_variance` (double, optional)
- `parent_port_identity` (string, optional)
- `parent_stats` (double, optional)

### TimePtpPortDataSet

Result of the PMC `GET PORT_DATA_SET` command.

- `announce_receipt_timeout` (double, optional)
- `delay_mechanism` (double, optional)
- `log_announce_interval` (double, optional)
- `log_min_delay_req_interval` (double, optional)
- `log_min_pdelay_req_interval` (double, optional)
- `log_sync_interval` (double, optional)
- `peer_mean_path_delay` (double, optional)
- `port_identity` (string, optional)
- `port_state` (string, optional) — This value will be `SLAVE` when a remote master clock is selected. See `parent_data_set` for selected master clock.
- `version_number` (double, optional)

### TimePtpTimePropertiesDataSet

Result of the PMC `GET TIME_PROPERTIES_DATA_SET` command.

- `current_utc_offset` (double, optional)
- `current_utc_offset_valid` (double, optional)
- `frequency_traceable` (double, optional)
- `leap59` (double, optional)
- `leap61` (double, optional)
- `ptp_timescale` (double, optional)
- `time_source` (double, optional)
- `time_traceable` (double, optional)

### TimePtpTimeStatusNp

Result of the PMC `GET TIME_STATUS_NP` command. This is a linuxptp non-portable command. The [Red Hat manual](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-using_the_ptp_management_client) provides some more information on these fields.

- `cumulative_scaled_rate_offset` (double, optional)
- `gm_identity` (string, optional) — Selected grandmaster clock identity.
- `gm_present` (boolean, optional) — True when grandmaster has been detected. This may stay true even if grandmaster goes off-line. Use `port_data_set.port_state` to determine up-to-date synchronization status. When this is false then the local clock is selected.
- `gm_time_base_indicator` (double, optional)
- `ingress_time` (double, optional) — Indicates when the last PTP message was received. Units are in nanoseconds.
- `last_gm_phase_change` (string, optional)
- `master_offset` (double, optional)
- `scaled_last_gm_phase_change` (double, optional)

## Examples

**Response**

```json
{
  "current_data_set": {
    "mean_path_delay": 250.75,
    "offset_from_master": -1200.5,
    "steps_removed": 2
  },
  "parent_data_set": {
    "gm_clock_accuracy": 25,
    "gm_clock_class": 248,
    "gm_offset_scaled_log_variance": 0.0001,
    "grandmaster_identity": "bc0fa7.fffe.00546b",
    "grandmaster_priority1": 128,
    "grandmaster_priority2": 128,
    "observed_parent_clock_phase_change_rate": 0.00005,
    "observed_parent_offset_scaled_log_variance": 0.0002,
    "parent_port_identity": "bc0fa7.fffe.00546b-0",
    "parent_stats": 15
  },
  "port_data_set": {
    "announce_receipt_timeout": 3,
    "delay_mechanism": 1,
    "log_announce_interval": 1,
    "log_min_delay_req_interval": 0,
    "log_min_pdelay_req_interval": 0,
    "log_sync_interval": 0,
    "peer_mean_path_delay": 260.5,
    "port_identity": "bc0fa7.fffe.00546b-1",
    "port_state": "SLAVE",
    "version_number": 2
  },
  "profile": "default",
  "time_properties_data_set": {
    "current_utc_offset": 37,
    "current_utc_offset_valid": 1,
    "frequency_traceable": 1,
    "leap59": 0,
    "leap61": 0,
    "ptp_timescale": 1,
    "time_source": 160,
    "time_traceable": 1
  },
  "time_status_np": {
    "cumulative_scaled_rate_offset": 0.0000035,
    "gm_identity": "bc0fa7.fffe.003aa6",
    "gm_present": true,
    "gm_time_base_indicator": 0,
    "ingress_time": 1580000000000,
    "last_gm_phase_change": "0x0000'0000000000001234.5678",
    "master_offset": -1150.25,
    "scaled_last_gm_phase_change": 0.000045
  }
}
```

**SDK Code**

```python
import requests

url = "http://os-992244000006.local/api/v1/time/ptp"

response = requests.get(url)

print(response.json())
```

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

	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/time/ptp")

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/time/ptp")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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