curl --request GET \
--url https://api.example.com/api/v1/inventory/devices/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/inventory/devices/{id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/inventory/devices/{id}/', 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://api.example.com/api/v1/inventory/devices/{id}/",
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://api.example.com/api/v1/inventory/devices/{id}/"
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://api.example.com/api/v1/inventory/devices/{id}/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/inventory/devices/{id}/")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"netbox_id": 123,
"position": 123,
"serial_number": "<string>",
"bmc_ip": "<string>",
"asset_tag": "<string>",
"description": "<string>",
"primary_ip": "<string>",
"custom_fields": {},
"device_type": {
"manufacturer": "<string>",
"model": "<string>",
"kind": "COMPUTE",
"part_number": "<string>",
"u_height": 123
},
"role": {
"name": "<string>",
"slug": "<string>"
},
"rack": {
"name": "<string>",
"location": "<string>",
"serial_number": "<string>"
},
"location": {
"name": "<string>",
"description": "<string>",
"ancestors": [
{
"name": "<string>",
"slug": "<string>",
"description": "<string>"
}
]
},
"site": {
"name": "<string>",
"slug": "<string>",
"netbox_id": 123,
"datacenter": "<string>",
"description": "<string>",
"region": "<string>",
"syslog_server": "<string>"
},
"status": "planned",
"interfaces": [
{
"name": "<string>",
"type": "<string>",
"mac_address": "<string>",
"ip_addresses": [
"<string>"
],
"ib_device_guid": "<string>",
"speed": 123,
"enabled": true
}
],
"fru": [
{
"category": "cpu",
"serial_number": "<string>",
"part_number": "<string>",
"model_number": "<string>"
}
],
"switch_port": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}Get inventory device
Read-only customer inventory projection endpoint.
curl --request GET \
--url https://api.example.com/api/v1/inventory/devices/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/inventory/devices/{id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/inventory/devices/{id}/', 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://api.example.com/api/v1/inventory/devices/{id}/",
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://api.example.com/api/v1/inventory/devices/{id}/"
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://api.example.com/api/v1/inventory/devices/{id}/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/inventory/devices/{id}/")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"netbox_id": 123,
"position": 123,
"serial_number": "<string>",
"bmc_ip": "<string>",
"asset_tag": "<string>",
"description": "<string>",
"primary_ip": "<string>",
"custom_fields": {},
"device_type": {
"manufacturer": "<string>",
"model": "<string>",
"kind": "COMPUTE",
"part_number": "<string>",
"u_height": 123
},
"role": {
"name": "<string>",
"slug": "<string>"
},
"rack": {
"name": "<string>",
"location": "<string>",
"serial_number": "<string>"
},
"location": {
"name": "<string>",
"description": "<string>",
"ancestors": [
{
"name": "<string>",
"slug": "<string>",
"description": "<string>"
}
]
},
"site": {
"name": "<string>",
"slug": "<string>",
"netbox_id": 123,
"datacenter": "<string>",
"description": "<string>",
"region": "<string>",
"syslog_server": "<string>"
},
"status": "planned",
"interfaces": [
{
"name": "<string>",
"type": "<string>",
"mac_address": "<string>",
"ip_addresses": [
"<string>"
],
"ib_device_guid": "<string>",
"speed": 123,
"enabled": true
}
],
"fru": [
{
"category": "cpu",
"serial_number": "<string>",
"part_number": "<string>",
"model_number": "<string>"
}
],
"switch_port": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z",
"last_synced_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}{
"detail": "<string>",
"code": "error",
"field_errors": [
{
"field": "<string>",
"messages": [
"<string>"
]
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Response
Customer-facing inventory projection row keyed by Fleet Manager Device UUID.
Show child attributes
Show child attributes
Device type details exposed through the customer inventory API.
Show child attributes
Show child attributes
Device role details exposed through the customer inventory API.
Show child attributes
Show child attributes
Rack details exposed through the customer inventory API.
Show child attributes
Show child attributes
The device's location: its name and the ordered list of ancestor locations,
from the site root down to the location's immediate parent. ancestors is empty
for a top-level location.
Show child attributes
Show child attributes
Site details exposed through the customer inventory API.
Show child attributes
Show child attributes
planned- Plannedstaged- Stagedactive- Activefailed- Failedoffline- Offlinerma- RMAreturned- Returneddecommissioning- Decommissioningdecommissioned- Decommissionedinventory- Inventoryunknown- Unknown
planned, staged, active, failed, offline, rma, returned, decommissioning, decommissioned, inventory, unknown Show child attributes
Show child attributes
Show child attributes
Show child attributes