import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.traffic.get({
filterServer: "sv_A05EdQ50dvKYQ",
filterDateGte: "2025-12-14T15:57:10Z",
filterDateLte: "2026-01-14T15:57:10Z",
});
console.log(result);
}
run();{
"data": {
"id": "",
"type": "traffic",
"attributes": {
"from_date": 1765727830,
"to_date": 1768406230,
"total_inbound_gb": 102,
"total_outbound_gb": 241,
"total_inbound_95th_percentile_mbps": 1832.91,
"total_outbound_95th_percentile_mbps": 1819.99,
"regions": [
{
"region_slug": "brazil",
"total_inbound_gb": 102,
"total_outbound_gb": 241,
"total_inbound_95th_percentile_mbps": 1832.91,
"total_outbound_95th_percentile_mbps": 1819.99,
"data": [
{
"date": "2021-07-01T00:00:00.000+00:00",
"inbound_gb": 10,
"outbound_gb": 102,
"avg_outbound_speed_mbps": 1.19,
"avg_inbound_speed_mbps": 0.13
},
{
"date": "2021-07-02T00:00:00.000+00:00",
"inbound_gb": 2,
"outbound_gb": 6,
"avg_outbound_speed_mbps": 0.08,
"avg_inbound_speed_mbps": 0.02
},
{
"date": "2021-07-03T00:00:00.000+00:00",
"inbound_gb": 5,
"outbound_gb": 15,
"avg_outbound_speed_mbps": 0.18,
"avg_inbound_speed_mbps": 0.06
},
{
"date": "2021-07-04T00:00:00.000+00:00",
"inbound_gb": 57,
"outbound_gb": 32,
"avg_outbound_speed_mbps": 0.38,
"avg_inbound_speed_mbps": 0.66
},
{
"date": "2021-07-05T00:00:00.000+00:00",
"inbound_gb": 11,
"outbound_gb": 59,
"avg_outbound_speed_mbps": 0.69,
"avg_inbound_speed_mbps": 0.13
},
{
"date": "2021-07-06T00:00:00.000+00:00",
"inbound_gb": 17,
"outbound_gb": 27,
"avg_outbound_speed_mbps": 0.32,
"avg_inbound_speed_mbps": 0.2
}
]
}
]
}
},
"meta": {}
}import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.traffic.get({
filterServer: "sv_A05EdQ50dvKYQ",
filterDateGte: "2025-12-14T15:57:10Z",
filterDateLte: "2026-01-14T15:57:10Z",
});
console.log(result);
}
run();{
"data": {
"id": "",
"type": "traffic",
"attributes": {
"from_date": 1765727830,
"to_date": 1768406230,
"total_inbound_gb": 102,
"total_outbound_gb": 241,
"total_inbound_95th_percentile_mbps": 1832.91,
"total_outbound_95th_percentile_mbps": 1819.99,
"regions": [
{
"region_slug": "brazil",
"total_inbound_gb": 102,
"total_outbound_gb": 241,
"total_inbound_95th_percentile_mbps": 1832.91,
"total_outbound_95th_percentile_mbps": 1819.99,
"data": [
{
"date": "2021-07-01T00:00:00.000+00:00",
"inbound_gb": 10,
"outbound_gb": 102,
"avg_outbound_speed_mbps": 1.19,
"avg_inbound_speed_mbps": 0.13
},
{
"date": "2021-07-02T00:00:00.000+00:00",
"inbound_gb": 2,
"outbound_gb": 6,
"avg_outbound_speed_mbps": 0.08,
"avg_inbound_speed_mbps": 0.02
},
{
"date": "2021-07-03T00:00:00.000+00:00",
"inbound_gb": 5,
"outbound_gb": 15,
"avg_outbound_speed_mbps": 0.18,
"avg_inbound_speed_mbps": 0.06
},
{
"date": "2021-07-04T00:00:00.000+00:00",
"inbound_gb": 57,
"outbound_gb": 32,
"avg_outbound_speed_mbps": 0.38,
"avg_inbound_speed_mbps": 0.66
},
{
"date": "2021-07-05T00:00:00.000+00:00",
"inbound_gb": 11,
"outbound_gb": 59,
"avg_outbound_speed_mbps": 0.69,
"avg_inbound_speed_mbps": 0.13
},
{
"date": "2021-07-06T00:00:00.000+00:00",
"inbound_gb": 17,
"outbound_gb": 27,
"avg_outbound_speed_mbps": 0.32,
"avg_inbound_speed_mbps": 0.2
}
]
}
]
}
},
"meta": {}
}The server id to filter by
The project id to filter by
The start timestamp to retrieve the traffic. You must provide in ISO8601 format. Example: filter[date][gte]=2024-04-01T00:00:00Z
The end timestamp to retrieve the traffic. You must provide in ISO8601 format. Example: filter[date][gte]=2024-04-31T23:59:59Z
Success
Show child attributes
Was this page helpful?