Skip to content

Get Server Time

Returns server's current time as an UTC timestamp.

Note

This request doesn't require authentication.

Request

HTTP Request

GET /node/api/time

Path parameters

No parameters required.

Request body

The request body is empty.

Response

The response body contains one string representing a current server's time as an UTC timestamp.

Example

Request

saymon_hostname=<...>
url=https://$saymon_hostname/node/api/time

curl -X GET $url
let saymonHostname = <...>
let path = "/node/api/time";

let requestOptions = {
    method: "GET"
};

fetch(saymonHostname + path, requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log("error", error));
const http = require("http");

let saymonHostname = <...>
let path = "/node/api/time";

let options = {
    "method": "GET",
    "hostname": saymonHostname,
    "path": path
};

let req = http.request(options, function (res) {
    let chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        let body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

saymon_hostname = <...>
url = "https://" + saymon_hostname + "/node/api/time"

response = requests.request("GET", url)
print(response.text)