Skip to content
You're viewing documentation for v2026.11.10-beta. It may be out of date.Go to latest
TimescaleDB Enterprise
Esc
↑↓navigate↵open⌘Jpreview

Get the time sync state

The console serves the clock of its host to the servers over the mesh (UDP port 123), and chrony on each server prefers it. The console reads the clock and the chrony source of each server every 5 minutes. The response has the readings of the last measurement.

GET/api/v1/console/time-sync
Authorization
tse_sessionAPI key · cookierequired
Responses
200

OK

clockConsoleClockResponserequired
Show properties
checked_atstring<date-time>

The time of the last measurement

limit_secondsinteger<int64>required

The largest offset for which the status is ok

offset_secondsnumber<double>

The time to add to the console clock to get the reference time. Absent when the status is unknown

referencestring

The NTP server that answered, or the number of servers

sourcestring

The reference: an NTP server, or the clocks of the servers

Allowed:ntpservers
statusstringrequired

ok: the clock is within limit_seconds of the reference. wrong: it is not. unknown: no NTP server answered, and fewer than two servers have clocks that agree

Allowed:okwrongunknown
ntp_serviceNtpServiceResponserequired
Show properties
addressstring

The mesh address and the UDP port of the NTP service

clock_syncedbooleanrequired

The answers say that the console clock is synced. false: pool.ntp.org, or without its answer the kernel of the console host, says that the clock is not synced, and chrony on the servers does not use the console

errorstring

Why the console does not serve NTP

last_errorstring

The last read error of the NTP service, also when it serves again

last_error_atstring<date-time>

The time of last_error

servingbooleanrequired

The console answers NTP requests on its mesh address

serversTimeSyncServerResponse[]required

The readings of the enrolled servers at clock.checked_at, in the order of the servers

Show properties
Array of TimeSyncServerResponse
console_selectedbooleanrequired

chrony on the server selected the console as its source

demobooleanrequired

A demo server uses the clock of the Docker host and runs no chrony

errorstring

Why the console could not read the clock of the server

offset_secondsnumber<double>

The server clock minus the console clock, in seconds. Absent when the console could not read the clock

selected_sourcestring

The address of the source that chrony on the server selected. Absent when chrony selected no source or does not run

server_idstringrequired
server_namestringrequired
default

Error

codestring

Stable code of the refusal, when the route has codes

detailsstring[]

Additional detail, e.g. per-field validation failures

errorstringrequired

Human-readable error message

Request
curl -X GET 'https://console.example.com/api/v1/console/time-sync' \
  -H 'Cookie: tse_session=YOUR_API_KEY' \
  -H 'Accept: application/json'
Response
{
  "clock": {
    "checked_at": "2019-08-24T14:15:22Z",
    "limit_seconds": 0,
    "offset_seconds": 0.1,
    "reference": "string",
    "source": "ntp",
    "status": "ok"
  },
  "ntp_service": {
    "address": "string",
    "clock_synced": true,
    "error": "string",
    "last_error": "string",
    "last_error_at": "2019-08-24T14:15:22Z",
    "serving": true
  },
  "servers": [
    {
      "console_selected": true,
      "demo": true,
      "error": "string",
      "offset_seconds": 0.1,
      "selected_source": "string",
      "server_id": "string",
      "server_name": "string"
    }
  ]
}