Search ARP Entries
curl --request POST \
--url https://v1.api.altostrat.io/metrics/arps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"search": "192.168.1.10",
"sites": [
"d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8"
],
"page": 1,
"per_page": 10,
"sort": "ip_address",
"order": "asc"
}
'import requests
url = "https://v1.api.altostrat.io/metrics/arps"
payload = {
"search": "192.168.1.10",
"sites": ["d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8"],
"page": 1,
"per_page": 10,
"sort": "ip_address",
"order": "asc"
}
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({
search: '192.168.1.10',
sites: ['d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8'],
page: 1,
per_page: 10,
sort: 'ip_address',
order: 'asc'
})
};
fetch('https://v1.api.altostrat.io/metrics/arps', 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/arps",
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([
'search' => '192.168.1.10',
'sites' => [
'd8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8'
],
'page' => 1,
'per_page' => 10,
'sort' => 'ip_address',
'order' => 'asc'
]),
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/arps"
payload := strings.NewReader("{\n \"search\": \"192.168.1.10\",\n \"sites\": [\n \"d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8\"\n ],\n \"page\": 1,\n \"per_page\": 10,\n \"sort\": \"ip_address\",\n \"order\": \"asc\"\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/arps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"search\": \"192.168.1.10\",\n \"sites\": [\n \"d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8\"\n ],\n \"page\": 1,\n \"per_page\": 10,\n \"sort\": \"ip_address\",\n \"order\": \"asc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/metrics/arps")
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 \"search\": \"192.168.1.10\",\n \"sites\": [\n \"d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8\"\n ],\n \"page\": 1,\n \"per_page\": 10,\n \"sort\": \"ip_address\",\n \"order\": \"asc\"\n}"
response = http.request(request)
puts response.read_body{
"current_page": 123,
"data": [
{
"id": "0c8526584284b025f3c328904724cf48a1a3848b",
"mac": "00:1A:2B:3C:4D:5E",
"ip_address": "192.168.88.254",
"interface": "bridge",
"last_seen": "5 minutes ago",
"group": "<string>",
"hostname": "my-laptop.local",
"manufacturer": "Apple, Inc.",
"site_id": "d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8",
"range": "192.168.88.0/24",
"alias": "Main Server",
"serial": "<string>"
}
],
"first_page_url": "<string>",
"from": 123,
"last_page": 123,
"last_page_url": "<string>",
"links": [
{
"url": "<string>",
"label": "<string>",
"active": true
}
],
"next_page_url": "<string>",
"path": "<string>",
"per_page": 123,
"prev_page_url": "<string>",
"to": 123,
"total": 123
}{
"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"
}ARP Inventory
Search ARP Entries
Performs a paginated search for ARP entries across one or more sites, with options for filtering and sorting. This is the primary endpoint for building an inventory of connected devices.
POST
/
metrics
/
arps
Search ARP Entries
curl --request POST \
--url https://v1.api.altostrat.io/metrics/arps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"search": "192.168.1.10",
"sites": [
"d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8"
],
"page": 1,
"per_page": 10,
"sort": "ip_address",
"order": "asc"
}
'import requests
url = "https://v1.api.altostrat.io/metrics/arps"
payload = {
"search": "192.168.1.10",
"sites": ["d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8"],
"page": 1,
"per_page": 10,
"sort": "ip_address",
"order": "asc"
}
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({
search: '192.168.1.10',
sites: ['d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8'],
page: 1,
per_page: 10,
sort: 'ip_address',
order: 'asc'
})
};
fetch('https://v1.api.altostrat.io/metrics/arps', 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/arps",
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([
'search' => '192.168.1.10',
'sites' => [
'd8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8'
],
'page' => 1,
'per_page' => 10,
'sort' => 'ip_address',
'order' => 'asc'
]),
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/arps"
payload := strings.NewReader("{\n \"search\": \"192.168.1.10\",\n \"sites\": [\n \"d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8\"\n ],\n \"page\": 1,\n \"per_page\": 10,\n \"sort\": \"ip_address\",\n \"order\": \"asc\"\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/arps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"search\": \"192.168.1.10\",\n \"sites\": [\n \"d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8\"\n ],\n \"page\": 1,\n \"per_page\": 10,\n \"sort\": \"ip_address\",\n \"order\": \"asc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/metrics/arps")
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 \"search\": \"192.168.1.10\",\n \"sites\": [\n \"d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8\"\n ],\n \"page\": 1,\n \"per_page\": 10,\n \"sort\": \"ip_address\",\n \"order\": \"asc\"\n}"
response = http.request(request)
puts response.read_body{
"current_page": 123,
"data": [
{
"id": "0c8526584284b025f3c328904724cf48a1a3848b",
"mac": "00:1A:2B:3C:4D:5E",
"ip_address": "192.168.88.254",
"interface": "bridge",
"last_seen": "5 minutes ago",
"group": "<string>",
"hostname": "my-laptop.local",
"manufacturer": "Apple, Inc.",
"site_id": "d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8",
"range": "192.168.88.0/24",
"alias": "Main Server",
"serial": "<string>"
}
],
"first_page_url": "<string>",
"from": 123,
"last_page": 123,
"last_page_url": "<string>",
"links": [
{
"url": "<string>",
"label": "<string>",
"active": true
}
],
"next_page_url": "<string>",
"path": "<string>",
"per_page": 123,
"prev_page_url": "<string>",
"to": 123,
"total": 123
}{
"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.
Body
application/json
A search term to filter by IP address, MAC address, hostname, or manufacturer.
Example:
"192.168.1.10"
An array of Site UUIDs to include in the search. If omitted, all accessible sites are searched.
Example:
["d8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8"]
The page number for pagination.
The number of results to return per page.
The field to sort the results by.
Available options:
ip_address, mac_address, hostname, manufacturer, alias, range The sort order.
Available options:
asc, desc Response
A paginated list of ARP entries matching the search criteria.
Was this page helpful?
⌘I