Date and time API 1.6.0
Controller date, time and time synchronization operations.
Base path: https://{controller_ip}/api/v1.
API description version: 1.6.0.
Examples use placeholder values for passwords, tokens, UUIDs, addresses and secrets. Replace them with values from your controller before sending requests.
Section methods
| Method | Path |
|---|---|
GET | /date_time |
GET | /date_time/timezones |
POST | /date_time |
GET /date_time
Section: Date and time.
Returns data for the date and time endpoint /date_time.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/date_time" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/date_time" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"ntp": false,
"ntp_server": "pool.ntp.org",
"timestamp": 1646087033016,
"timezone": "Europe/Moscow"
}
GET /date_time/timezones
Section: Date and time.
Returns data for the date and time endpoint /date_time/timezones.
Request example
curl -k -X GET "https://{controller_ip}/api/v1/date_time/timezones" \
-H "Authorization: Bearer <token>"
Response command example
curl -k -sS -X GET "https://{controller_ip}/api/v1/date_time/timezones" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"data": [],
"meta": {
"api_version": "1.6.0",
"path": "/date_time/timezones"
}
}
POST /date_time
Section: Date and time.
Creates a record or starts an operation for the date and time endpoint /date_time.
Request example
curl -k -X POST "https://{controller_ip}/api/v1/date_time" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"ntp": false,
"timestamp": 1646087033016,
"timezone": "Europe/Moscow"
}'
Request body example
{
"ntp": false,
"timestamp": 1646087033016,
"timezone": "Europe/Moscow"
}
Response command example
curl -k -sS -X POST "https://{controller_ip}/api/v1/date_time" \
-H "Authorization: Bearer <token>" | jq .
Response example
{
"status": "success"
}