Get Interface Metrics
curl --request POST \
--url https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2025-10-29T10:00:00Z",
"to": "2025-10-29T11:00:00Z"
}
'import requests
url = "https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics"
payload = {
"from": "2025-10-29T10:00:00Z",
"to": "2025-10-29T11:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({from: '2025-10-29T10:00:00Z', to: '2025-10-29T11:00:00Z'})
};
fetch('https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '2025-10-29T10:00:00Z',
'to' => '2025-10-29T11:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics"
payload := strings.NewReader("{\n \"from\": \"2025-10-29T10:00:00Z\",\n \"to\": \"2025-10-29T11:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"2025-10-29T10:00:00Z\",\n \"to\": \"2025-10-29T11:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"2025-10-29T10:00:00Z\",\n \"to\": \"2025-10-29T11:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"ifInOctets": [
{
"clock": "2025-10-29 10:05:00",
"value": 1543210.5
}
],
"ifOutOctets": [
{
"clock": "2025-10-29 10:05:00",
"value": 1543210.5
}
]
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The provided 'siteId' is not a valid UUID.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The provided 'siteId' is not a valid UUID.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The provided 'siteId' is not a valid UUID.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The provided 'siteId' is not a valid UUID.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}Site Interfaces & Metrics
Get Interface Metrics
Fetches time-series traffic metrics (ifInOctets for inbound, ifOutOctets for outbound) for a specific network interface over a given time period. The values are returned as bits per second.
POST
/
metrics
/
interfaces
/
{interfaceId}
/
metrics
Get Interface Metrics
curl --request POST \
--url https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2025-10-29T10:00:00Z",
"to": "2025-10-29T11:00:00Z"
}
'import requests
url = "https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics"
payload = {
"from": "2025-10-29T10:00:00Z",
"to": "2025-10-29T11:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({from: '2025-10-29T10:00:00Z', to: '2025-10-29T11:00:00Z'})
};
fetch('https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '2025-10-29T10:00:00Z',
'to' => '2025-10-29T11:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics"
payload := strings.NewReader("{\n \"from\": \"2025-10-29T10:00:00Z\",\n \"to\": \"2025-10-29T11:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"2025-10-29T10:00:00Z\",\n \"to\": \"2025-10-29T11:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/metrics/interfaces/{interfaceId}/metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"2025-10-29T10:00:00Z\",\n \"to\": \"2025-10-29T11:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"ifInOctets": [
{
"clock": "2025-10-29 10:05:00",
"value": 1543210.5
}
],
"ifOutOctets": [
{
"clock": "2025-10-29 10:05:00",
"value": 1543210.5
}
]
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The provided 'siteId' is not a valid UUID.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The provided 'siteId' is not a valid UUID.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The provided 'siteId' is not a valid UUID.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}{
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "The provided 'siteId' is not a valid UUID.",
"doc_url": "https://docs.altostrat.io/errors/parameter_invalid"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier for the SNMP interface.
Example:
"9f9510bd-1234-5678-a7cf-f845a39e26db"
Body
application/json
Response
Time-series metrics for the specified interface.
Was this page helpful?
⌘I