Retrieve a metadata object
curl --request GET \
--url https://v1.api.altostrat.io/metadata/{resourceId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://v1.api.altostrat.io/metadata/{resourceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v1.api.altostrat.io/metadata/{resourceId}', 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/metadata/{resourceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/metadata/{resourceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v1.api.altostrat.io/metadata/{resourceId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/metadata/{resourceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"resource_id": "9b52d930-f432-4c0a-bac0-4c12dff85544",
"type": "mikrotik.device",
"metadata": {
"circuit_id": "AS12345-XYZ",
"install_date": "2025-01-15",
"is_critical": true,
"rack_units": 2
}
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Metadata
Retrieve a metadata object
Fetches the metadata object for a single resource, identified by its unique ID.
GET
/
metadata
/
{resourceId}
Retrieve a metadata object
curl --request GET \
--url https://v1.api.altostrat.io/metadata/{resourceId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://v1.api.altostrat.io/metadata/{resourceId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://v1.api.altostrat.io/metadata/{resourceId}', 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/metadata/{resourceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://v1.api.altostrat.io/metadata/{resourceId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://v1.api.altostrat.io/metadata/{resourceId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.api.altostrat.io/metadata/{resourceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"resource_id": "9b52d930-f432-4c0a-bac0-4c12dff85544",
"type": "mikrotik.device",
"metadata": {
"circuit_id": "AS12345-XYZ",
"install_date": "2025-01-15",
"is_critical": true,
"rack_units": 2
}
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}{
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'name' parameter is required for this request.",
"doc_url": "https://docs.altostrat.io/errors/parameter_missing"
}Authorizations
A bearer token is required for all API requests.
Path Parameters
The unique identifier of the resource whose metadata is being accessed.
Response
The requested metadata object.
The unique identifier of the resource this metadata belongs to.
Example:
"9b52d930-f432-4c0a-bac0-4c12dff85544"
A string identifying the type of the resource.
Example:
"mikrotik.device"
A free-form object containing key-value pairs. Values can be strings, numbers, or booleans.
Show child attributes
Show child attributes
Example:
{
"circuit_id": "AS12345-XYZ",
"install_date": "2025-01-15",
"is_critical": true,
"rack_units": 2
}
Was this page helpful?
⌘I