curl --request POST \
--url https://api.example.com/api/v1/inventory/cable-projections/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"netbox_cable_id": 2,
"site_netbox_id": 2,
"site_slug": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z",
"ethernet": {
"site_id": "<string>",
"dc_region": "<string>",
"dc_code": "<string>",
"start_device": "<string>",
"start_device_type": "<string>",
"start_port": "<string>",
"end_device": "<string>",
"end_device_type": "<string>",
"end_port": "<string>",
"link_id": "<string>",
"bandwidth_gbps": 123
},
"infiniband": {
"start_device": "<string>",
"start_port": "<string>",
"start_device_location": "<string>",
"start_data_hall": "<string>",
"start_rack_id": "<string>",
"end_device": "<string>",
"end_port": "<string>",
"end_device_location": "<string>",
"end_data_hall": "<string>",
"end_rack_id": "<string>",
"region": "<string>",
"link_type": "<string>",
"speed": "<string>",
"source": "<string>",
"source_cluster": "<string>",
"start_rack_unit": 123,
"start_u_height": 123,
"end_rack_unit": 123,
"end_u_height": 123,
"hostname": "<string>"
},
"far_datacenter": {
"netbox_id": 2,
"name": "<string>",
"region": "<string>",
"description": "<string>"
}
}
'import requests
url = "https://api.example.com/api/v1/inventory/cable-projections/"
payload = {
"netbox_cable_id": 2,
"site_netbox_id": 2,
"site_slug": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z",
"ethernet": {
"site_id": "<string>",
"dc_region": "<string>",
"dc_code": "<string>",
"start_device": "<string>",
"start_device_type": "<string>",
"start_port": "<string>",
"end_device": "<string>",
"end_device_type": "<string>",
"end_port": "<string>",
"link_id": "<string>",
"bandwidth_gbps": 123
},
"infiniband": {
"start_device": "<string>",
"start_port": "<string>",
"start_device_location": "<string>",
"start_data_hall": "<string>",
"start_rack_id": "<string>",
"end_device": "<string>",
"end_port": "<string>",
"end_device_location": "<string>",
"end_data_hall": "<string>",
"end_rack_id": "<string>",
"region": "<string>",
"link_type": "<string>",
"speed": "<string>",
"source": "<string>",
"source_cluster": "<string>",
"start_rack_unit": 123,
"start_u_height": 123,
"end_rack_unit": 123,
"end_u_height": 123,
"hostname": "<string>"
},
"far_datacenter": {
"netbox_id": 2,
"name": "<string>",
"region": "<string>",
"description": "<string>"
}
}
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({
netbox_cable_id: 2,
site_netbox_id: 2,
site_slug: '<string>',
source_updated_at: '2023-11-07T05:31:56Z',
ethernet: {
site_id: '<string>',
dc_region: '<string>',
dc_code: '<string>',
start_device: '<string>',
start_device_type: '<string>',
start_port: '<string>',
end_device: '<string>',
end_device_type: '<string>',
end_port: '<string>',
link_id: '<string>',
bandwidth_gbps: 123
},
infiniband: {
start_device: '<string>',
start_port: '<string>',
start_device_location: '<string>',
start_data_hall: '<string>',
start_rack_id: '<string>',
end_device: '<string>',
end_port: '<string>',
end_device_location: '<string>',
end_data_hall: '<string>',
end_rack_id: '<string>',
region: '<string>',
link_type: '<string>',
speed: '<string>',
source: '<string>',
source_cluster: '<string>',
start_rack_unit: 123,
start_u_height: 123,
end_rack_unit: 123,
end_u_height: 123,
hostname: '<string>'
},
far_datacenter: {netbox_id: 2, name: '<string>', region: '<string>', description: '<string>'}
})
};
fetch('https://api.example.com/api/v1/inventory/cable-projections/', 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/cable-projections/",
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([
'netbox_cable_id' => 2,
'site_netbox_id' => 2,
'site_slug' => '<string>',
'source_updated_at' => '2023-11-07T05:31:56Z',
'ethernet' => [
'site_id' => '<string>',
'dc_region' => '<string>',
'dc_code' => '<string>',
'start_device' => '<string>',
'start_device_type' => '<string>',
'start_port' => '<string>',
'end_device' => '<string>',
'end_device_type' => '<string>',
'end_port' => '<string>',
'link_id' => '<string>',
'bandwidth_gbps' => 123
],
'infiniband' => [
'start_device' => '<string>',
'start_port' => '<string>',
'start_device_location' => '<string>',
'start_data_hall' => '<string>',
'start_rack_id' => '<string>',
'end_device' => '<string>',
'end_port' => '<string>',
'end_device_location' => '<string>',
'end_data_hall' => '<string>',
'end_rack_id' => '<string>',
'region' => '<string>',
'link_type' => '<string>',
'speed' => '<string>',
'source' => '<string>',
'source_cluster' => '<string>',
'start_rack_unit' => 123,
'start_u_height' => 123,
'end_rack_unit' => 123,
'end_u_height' => 123,
'hostname' => '<string>'
],
'far_datacenter' => [
'netbox_id' => 2,
'name' => '<string>',
'region' => '<string>',
'description' => '<string>'
]
]),
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://api.example.com/api/v1/inventory/cable-projections/"
payload := strings.NewReader("{\n \"netbox_cable_id\": 2,\n \"site_netbox_id\": 2,\n \"site_slug\": \"<string>\",\n \"source_updated_at\": \"2023-11-07T05:31:56Z\",\n \"ethernet\": {\n \"site_id\": \"<string>\",\n \"dc_region\": \"<string>\",\n \"dc_code\": \"<string>\",\n \"start_device\": \"<string>\",\n \"start_device_type\": \"<string>\",\n \"start_port\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_device_type\": \"<string>\",\n \"end_port\": \"<string>\",\n \"link_id\": \"<string>\",\n \"bandwidth_gbps\": 123\n },\n \"infiniband\": {\n \"start_device\": \"<string>\",\n \"start_port\": \"<string>\",\n \"start_device_location\": \"<string>\",\n \"start_data_hall\": \"<string>\",\n \"start_rack_id\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_port\": \"<string>\",\n \"end_device_location\": \"<string>\",\n \"end_data_hall\": \"<string>\",\n \"end_rack_id\": \"<string>\",\n \"region\": \"<string>\",\n \"link_type\": \"<string>\",\n \"speed\": \"<string>\",\n \"source\": \"<string>\",\n \"source_cluster\": \"<string>\",\n \"start_rack_unit\": 123,\n \"start_u_height\": 123,\n \"end_rack_unit\": 123,\n \"end_u_height\": 123,\n \"hostname\": \"<string>\"\n },\n \"far_datacenter\": {\n \"netbox_id\": 2,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"description\": \"<string>\"\n }\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://api.example.com/api/v1/inventory/cable-projections/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"netbox_cable_id\": 2,\n \"site_netbox_id\": 2,\n \"site_slug\": \"<string>\",\n \"source_updated_at\": \"2023-11-07T05:31:56Z\",\n \"ethernet\": {\n \"site_id\": \"<string>\",\n \"dc_region\": \"<string>\",\n \"dc_code\": \"<string>\",\n \"start_device\": \"<string>\",\n \"start_device_type\": \"<string>\",\n \"start_port\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_device_type\": \"<string>\",\n \"end_port\": \"<string>\",\n \"link_id\": \"<string>\",\n \"bandwidth_gbps\": 123\n },\n \"infiniband\": {\n \"start_device\": \"<string>\",\n \"start_port\": \"<string>\",\n \"start_device_location\": \"<string>\",\n \"start_data_hall\": \"<string>\",\n \"start_rack_id\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_port\": \"<string>\",\n \"end_device_location\": \"<string>\",\n \"end_data_hall\": \"<string>\",\n \"end_rack_id\": \"<string>\",\n \"region\": \"<string>\",\n \"link_type\": \"<string>\",\n \"speed\": \"<string>\",\n \"source\": \"<string>\",\n \"source_cluster\": \"<string>\",\n \"start_rack_unit\": 123,\n \"start_u_height\": 123,\n \"end_rack_unit\": 123,\n \"end_u_height\": 123,\n \"hostname\": \"<string>\"\n },\n \"far_datacenter\": {\n \"netbox_id\": 2,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"description\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/inventory/cable-projections/")
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 \"netbox_cable_id\": 2,\n \"site_netbox_id\": 2,\n \"site_slug\": \"<string>\",\n \"source_updated_at\": \"2023-11-07T05:31:56Z\",\n \"ethernet\": {\n \"site_id\": \"<string>\",\n \"dc_region\": \"<string>\",\n \"dc_code\": \"<string>\",\n \"start_device\": \"<string>\",\n \"start_device_type\": \"<string>\",\n \"start_port\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_device_type\": \"<string>\",\n \"end_port\": \"<string>\",\n \"link_id\": \"<string>\",\n \"bandwidth_gbps\": 123\n },\n \"infiniband\": {\n \"start_device\": \"<string>\",\n \"start_port\": \"<string>\",\n \"start_device_location\": \"<string>\",\n \"start_data_hall\": \"<string>\",\n \"start_rack_id\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_port\": \"<string>\",\n \"end_device_location\": \"<string>\",\n \"end_data_hall\": \"<string>\",\n \"end_rack_id\": \"<string>\",\n \"region\": \"<string>\",\n \"link_type\": \"<string>\",\n \"speed\": \"<string>\",\n \"source\": \"<string>\",\n \"source_cluster\": \"<string>\",\n \"start_rack_unit\": 123,\n \"start_u_height\": 123,\n \"end_rack_unit\": 123,\n \"end_u_height\": 123,\n \"hostname\": \"<string>\"\n },\n \"far_datacenter\": {\n \"netbox_id\": 2,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"description\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changed": true,
"content_hash": "<string>",
"last_synced_at": "2023-11-07T05:31:56Z",
"site_netbox_id": 123,
"site_slug": "<string>"
}{
"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>"
]
}
]
}Upsert cable inventory projection (internal)
Internal upsert, soft-delete, and list endpoint for cable projections.
curl --request POST \
--url https://api.example.com/api/v1/inventory/cable-projections/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"netbox_cable_id": 2,
"site_netbox_id": 2,
"site_slug": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z",
"ethernet": {
"site_id": "<string>",
"dc_region": "<string>",
"dc_code": "<string>",
"start_device": "<string>",
"start_device_type": "<string>",
"start_port": "<string>",
"end_device": "<string>",
"end_device_type": "<string>",
"end_port": "<string>",
"link_id": "<string>",
"bandwidth_gbps": 123
},
"infiniband": {
"start_device": "<string>",
"start_port": "<string>",
"start_device_location": "<string>",
"start_data_hall": "<string>",
"start_rack_id": "<string>",
"end_device": "<string>",
"end_port": "<string>",
"end_device_location": "<string>",
"end_data_hall": "<string>",
"end_rack_id": "<string>",
"region": "<string>",
"link_type": "<string>",
"speed": "<string>",
"source": "<string>",
"source_cluster": "<string>",
"start_rack_unit": 123,
"start_u_height": 123,
"end_rack_unit": 123,
"end_u_height": 123,
"hostname": "<string>"
},
"far_datacenter": {
"netbox_id": 2,
"name": "<string>",
"region": "<string>",
"description": "<string>"
}
}
'import requests
url = "https://api.example.com/api/v1/inventory/cable-projections/"
payload = {
"netbox_cable_id": 2,
"site_netbox_id": 2,
"site_slug": "<string>",
"source_updated_at": "2023-11-07T05:31:56Z",
"ethernet": {
"site_id": "<string>",
"dc_region": "<string>",
"dc_code": "<string>",
"start_device": "<string>",
"start_device_type": "<string>",
"start_port": "<string>",
"end_device": "<string>",
"end_device_type": "<string>",
"end_port": "<string>",
"link_id": "<string>",
"bandwidth_gbps": 123
},
"infiniband": {
"start_device": "<string>",
"start_port": "<string>",
"start_device_location": "<string>",
"start_data_hall": "<string>",
"start_rack_id": "<string>",
"end_device": "<string>",
"end_port": "<string>",
"end_device_location": "<string>",
"end_data_hall": "<string>",
"end_rack_id": "<string>",
"region": "<string>",
"link_type": "<string>",
"speed": "<string>",
"source": "<string>",
"source_cluster": "<string>",
"start_rack_unit": 123,
"start_u_height": 123,
"end_rack_unit": 123,
"end_u_height": 123,
"hostname": "<string>"
},
"far_datacenter": {
"netbox_id": 2,
"name": "<string>",
"region": "<string>",
"description": "<string>"
}
}
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({
netbox_cable_id: 2,
site_netbox_id: 2,
site_slug: '<string>',
source_updated_at: '2023-11-07T05:31:56Z',
ethernet: {
site_id: '<string>',
dc_region: '<string>',
dc_code: '<string>',
start_device: '<string>',
start_device_type: '<string>',
start_port: '<string>',
end_device: '<string>',
end_device_type: '<string>',
end_port: '<string>',
link_id: '<string>',
bandwidth_gbps: 123
},
infiniband: {
start_device: '<string>',
start_port: '<string>',
start_device_location: '<string>',
start_data_hall: '<string>',
start_rack_id: '<string>',
end_device: '<string>',
end_port: '<string>',
end_device_location: '<string>',
end_data_hall: '<string>',
end_rack_id: '<string>',
region: '<string>',
link_type: '<string>',
speed: '<string>',
source: '<string>',
source_cluster: '<string>',
start_rack_unit: 123,
start_u_height: 123,
end_rack_unit: 123,
end_u_height: 123,
hostname: '<string>'
},
far_datacenter: {netbox_id: 2, name: '<string>', region: '<string>', description: '<string>'}
})
};
fetch('https://api.example.com/api/v1/inventory/cable-projections/', 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/cable-projections/",
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([
'netbox_cable_id' => 2,
'site_netbox_id' => 2,
'site_slug' => '<string>',
'source_updated_at' => '2023-11-07T05:31:56Z',
'ethernet' => [
'site_id' => '<string>',
'dc_region' => '<string>',
'dc_code' => '<string>',
'start_device' => '<string>',
'start_device_type' => '<string>',
'start_port' => '<string>',
'end_device' => '<string>',
'end_device_type' => '<string>',
'end_port' => '<string>',
'link_id' => '<string>',
'bandwidth_gbps' => 123
],
'infiniband' => [
'start_device' => '<string>',
'start_port' => '<string>',
'start_device_location' => '<string>',
'start_data_hall' => '<string>',
'start_rack_id' => '<string>',
'end_device' => '<string>',
'end_port' => '<string>',
'end_device_location' => '<string>',
'end_data_hall' => '<string>',
'end_rack_id' => '<string>',
'region' => '<string>',
'link_type' => '<string>',
'speed' => '<string>',
'source' => '<string>',
'source_cluster' => '<string>',
'start_rack_unit' => 123,
'start_u_height' => 123,
'end_rack_unit' => 123,
'end_u_height' => 123,
'hostname' => '<string>'
],
'far_datacenter' => [
'netbox_id' => 2,
'name' => '<string>',
'region' => '<string>',
'description' => '<string>'
]
]),
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://api.example.com/api/v1/inventory/cable-projections/"
payload := strings.NewReader("{\n \"netbox_cable_id\": 2,\n \"site_netbox_id\": 2,\n \"site_slug\": \"<string>\",\n \"source_updated_at\": \"2023-11-07T05:31:56Z\",\n \"ethernet\": {\n \"site_id\": \"<string>\",\n \"dc_region\": \"<string>\",\n \"dc_code\": \"<string>\",\n \"start_device\": \"<string>\",\n \"start_device_type\": \"<string>\",\n \"start_port\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_device_type\": \"<string>\",\n \"end_port\": \"<string>\",\n \"link_id\": \"<string>\",\n \"bandwidth_gbps\": 123\n },\n \"infiniband\": {\n \"start_device\": \"<string>\",\n \"start_port\": \"<string>\",\n \"start_device_location\": \"<string>\",\n \"start_data_hall\": \"<string>\",\n \"start_rack_id\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_port\": \"<string>\",\n \"end_device_location\": \"<string>\",\n \"end_data_hall\": \"<string>\",\n \"end_rack_id\": \"<string>\",\n \"region\": \"<string>\",\n \"link_type\": \"<string>\",\n \"speed\": \"<string>\",\n \"source\": \"<string>\",\n \"source_cluster\": \"<string>\",\n \"start_rack_unit\": 123,\n \"start_u_height\": 123,\n \"end_rack_unit\": 123,\n \"end_u_height\": 123,\n \"hostname\": \"<string>\"\n },\n \"far_datacenter\": {\n \"netbox_id\": 2,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"description\": \"<string>\"\n }\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://api.example.com/api/v1/inventory/cable-projections/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"netbox_cable_id\": 2,\n \"site_netbox_id\": 2,\n \"site_slug\": \"<string>\",\n \"source_updated_at\": \"2023-11-07T05:31:56Z\",\n \"ethernet\": {\n \"site_id\": \"<string>\",\n \"dc_region\": \"<string>\",\n \"dc_code\": \"<string>\",\n \"start_device\": \"<string>\",\n \"start_device_type\": \"<string>\",\n \"start_port\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_device_type\": \"<string>\",\n \"end_port\": \"<string>\",\n \"link_id\": \"<string>\",\n \"bandwidth_gbps\": 123\n },\n \"infiniband\": {\n \"start_device\": \"<string>\",\n \"start_port\": \"<string>\",\n \"start_device_location\": \"<string>\",\n \"start_data_hall\": \"<string>\",\n \"start_rack_id\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_port\": \"<string>\",\n \"end_device_location\": \"<string>\",\n \"end_data_hall\": \"<string>\",\n \"end_rack_id\": \"<string>\",\n \"region\": \"<string>\",\n \"link_type\": \"<string>\",\n \"speed\": \"<string>\",\n \"source\": \"<string>\",\n \"source_cluster\": \"<string>\",\n \"start_rack_unit\": 123,\n \"start_u_height\": 123,\n \"end_rack_unit\": 123,\n \"end_u_height\": 123,\n \"hostname\": \"<string>\"\n },\n \"far_datacenter\": {\n \"netbox_id\": 2,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"description\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/inventory/cable-projections/")
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 \"netbox_cable_id\": 2,\n \"site_netbox_id\": 2,\n \"site_slug\": \"<string>\",\n \"source_updated_at\": \"2023-11-07T05:31:56Z\",\n \"ethernet\": {\n \"site_id\": \"<string>\",\n \"dc_region\": \"<string>\",\n \"dc_code\": \"<string>\",\n \"start_device\": \"<string>\",\n \"start_device_type\": \"<string>\",\n \"start_port\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_device_type\": \"<string>\",\n \"end_port\": \"<string>\",\n \"link_id\": \"<string>\",\n \"bandwidth_gbps\": 123\n },\n \"infiniband\": {\n \"start_device\": \"<string>\",\n \"start_port\": \"<string>\",\n \"start_device_location\": \"<string>\",\n \"start_data_hall\": \"<string>\",\n \"start_rack_id\": \"<string>\",\n \"end_device\": \"<string>\",\n \"end_port\": \"<string>\",\n \"end_device_location\": \"<string>\",\n \"end_data_hall\": \"<string>\",\n \"end_rack_id\": \"<string>\",\n \"region\": \"<string>\",\n \"link_type\": \"<string>\",\n \"speed\": \"<string>\",\n \"source\": \"<string>\",\n \"source_cluster\": \"<string>\",\n \"start_rack_unit\": 123,\n \"start_u_height\": 123,\n \"end_rack_unit\": 123,\n \"end_u_height\": 123,\n \"hostname\": \"<string>\"\n },\n \"far_datacenter\": {\n \"netbox_id\": 2,\n \"name\": \"<string>\",\n \"region\": \"<string>\",\n \"description\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"changed": true,
"content_hash": "<string>",
"last_synced_at": "2023-11-07T05:31:56Z",
"site_netbox_id": 123,
"site_slug": "<string>"
}{
"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.
Body
Write contract for the cable projection upsert endpoint.
netbox_cable_id is the natural key. Exactly one payload group must be
supplied, matching link_kind — validated here so a mismatch fails the
request instead of tripping the DB check constraint.
x >= 1ethernet- Ethernetinfiniband- InfiniBand
ethernet, infiniband x >= 1100^[-a-zA-Z0-9_]+$Resolved ethernet/console link payload (mirrors EthInterfaceLink).
String fields that the legacy transforms can emit as "" (region/code
parsing, asset-type extraction) allow blank; everything else is required
non-empty because the transforms validate it before emitting a record.
Show child attributes
Show child attributes
Resolved InfiniBand link payload (mirrors IbSwitchLink).
Port names are already transposed / RDMA-normalized by the legacy
transform; rack units and U-heights are NetBox decimals exposed as JSON
numbers (same convention as the device projection's u_height).
Show child attributes
Show child attributes
Cross-DC far-end site's DataCenter attributes (spec 0036 cross-DC links).
Present only on a cross-datacenter ethernet row: the far (end-side) site has
no projected devices, so the connector emits its DataCenter from these
NetBox site attributes. region / description allow null/blank because
NetBox omits them for some sites — but description is what the connector
parses into DCRegionCode, so a far site missing it fails loud at emit
time (transform_far_datacenter) rather than silently shipping a link
whose far datacenter cannot be rendered.
Show child attributes
Show child attributes
Response
Response contract for a cable projection upsert.
Carries the row id and site scope so the agent can build the NATS cable postcard (spec 0036 §3.5) without re-reading the row.