Get bgpstate
curl --request GET \
--url https://{host}/api/supervisors/{name}/bgp/state \
--cookie k8s-gate-session=import requests
url = "https://{host}/api/supervisors/{name}/bgp/state"
headers = {"cookie": "k8s-gate-session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'k8s-gate-session='}};
fetch('https://{host}/api/supervisors/{name}/bgp/state', 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://{host}/api/supervisors/{name}/bgp/state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "k8s-gate-session=",
]);
$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://{host}/api/supervisors/{name}/bgp/state"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "k8s-gate-session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/supervisors/{name}/bgp/state")
.header("cookie", "k8s-gate-session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/supervisors/{name}/bgp/state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'k8s-gate-session='
response = http.request(request)
puts response.read_body{
"engine": "<string>",
"nodes": [
{
"advertised": [
{
"best": true,
"originated": true,
"prefix": "<string>",
"weight": 123,
"asPath": "<string>",
"nextHop": "<string>",
"origin": "<string>"
}
],
"node": "<string>",
"received": [
{
"prefix": "<string>",
"asPath": "<string>",
"nextHop": "<string>",
"origin": "<string>",
"peer": "<string>"
}
],
"sessions": [
{
"accepted": 123,
"msgRcvd": 123,
"msgSent": 123,
"peer": "<string>",
"pfxRcvd": 123,
"pfxSnt": 123,
"remoteAS": 123,
"state": "<string>",
"bfd": "<string>",
"bfdDetail": {
"status": "<string>",
"diagnostic": "<string>",
"echoReceiveLocalMs": 1,
"echoReceiveRemoteMs": 1,
"echoTransmitLocalMs": 1,
"echoTransmitRemoteMs": 1,
"multihop": true,
"multiplierLocal": 1,
"multiplierRemote": 1,
"passiveMode": true,
"receiveLocalMs": 1,
"receiveRemoteMs": 1,
"remoteDiagnostic": "<string>",
"rttAvgUs": 1,
"rttMaxUs": 1,
"rttMinUs": 1,
"transmitLocalMs": 1,
"transmitRemoteMs": 1,
"uptime": "<string>"
},
"capAddPath": true,
"capEnhancedRR": true,
"capFourByteAS": true,
"capGracefulRestart": true,
"capLongLivedGR": true,
"capRouteRefresh": true,
"connectRetryMs": 1,
"estimatedRttMs": 1,
"externalHops": 123,
"grLocalMode": "<string>",
"grNBit": true,
"grRBit": true,
"grRemoteMode": "<string>",
"grRestartTimeS": 1,
"grStalePathTimeS": 1,
"holdConfiguredMs": 1,
"holdNegotiatedMs": 1,
"hostname": "<string>",
"keepaliveConfiguredMs": 1,
"keepaliveNegotiatedMs": 1,
"lastResetAgoMs": 1,
"lastResetCode": 123,
"lastResetReason": "<string>",
"localAddr": "<string>",
"msgs": {
"keepalivesRecv": 123,
"keepalivesSent": 123,
"notifRecv": 123,
"notifSent": 123,
"opensRecv": 123,
"opensSent": 123,
"routeRefreshRecv": 123,
"routeRefreshSent": 123,
"totalRecv": 123,
"totalSent": 123,
"updatesRecv": 123,
"updatesSent": 123
},
"multihop": true,
"remoteAddr": "<string>",
"routeMapIn": "<string>",
"routeMapOut": "<string>",
"softwareVersion": "<string>",
"tcpMssSynced": true,
"uptime": "<string>"
}
],
"error": "<string>",
"localAS": 123,
"policy": "<unknown>",
"prefixLists": {},
"routeMaps": {},
"routerId": "<string>"
}
]
}networking
Get bgpstate
Single-fetch aggregator: candidates + operator configs + bridge-node
Authorisation: cilium:GetState on krn:celum:supervisor:{name}:cilium:*.
Assistant tool: get_bgp_state
GET
/
api
/
supervisors
/
{name}
/
bgp
/
state
Get bgpstate
curl --request GET \
--url https://{host}/api/supervisors/{name}/bgp/state \
--cookie k8s-gate-session=import requests
url = "https://{host}/api/supervisors/{name}/bgp/state"
headers = {"cookie": "k8s-gate-session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'k8s-gate-session='}};
fetch('https://{host}/api/supervisors/{name}/bgp/state', 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://{host}/api/supervisors/{name}/bgp/state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_COOKIE => "k8s-gate-session=",
]);
$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://{host}/api/supervisors/{name}/bgp/state"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "k8s-gate-session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/api/supervisors/{name}/bgp/state")
.header("cookie", "k8s-gate-session=")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/supervisors/{name}/bgp/state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["cookie"] = 'k8s-gate-session='
response = http.request(request)
puts response.read_body{
"engine": "<string>",
"nodes": [
{
"advertised": [
{
"best": true,
"originated": true,
"prefix": "<string>",
"weight": 123,
"asPath": "<string>",
"nextHop": "<string>",
"origin": "<string>"
}
],
"node": "<string>",
"received": [
{
"prefix": "<string>",
"asPath": "<string>",
"nextHop": "<string>",
"origin": "<string>",
"peer": "<string>"
}
],
"sessions": [
{
"accepted": 123,
"msgRcvd": 123,
"msgSent": 123,
"peer": "<string>",
"pfxRcvd": 123,
"pfxSnt": 123,
"remoteAS": 123,
"state": "<string>",
"bfd": "<string>",
"bfdDetail": {
"status": "<string>",
"diagnostic": "<string>",
"echoReceiveLocalMs": 1,
"echoReceiveRemoteMs": 1,
"echoTransmitLocalMs": 1,
"echoTransmitRemoteMs": 1,
"multihop": true,
"multiplierLocal": 1,
"multiplierRemote": 1,
"passiveMode": true,
"receiveLocalMs": 1,
"receiveRemoteMs": 1,
"remoteDiagnostic": "<string>",
"rttAvgUs": 1,
"rttMaxUs": 1,
"rttMinUs": 1,
"transmitLocalMs": 1,
"transmitRemoteMs": 1,
"uptime": "<string>"
},
"capAddPath": true,
"capEnhancedRR": true,
"capFourByteAS": true,
"capGracefulRestart": true,
"capLongLivedGR": true,
"capRouteRefresh": true,
"connectRetryMs": 1,
"estimatedRttMs": 1,
"externalHops": 123,
"grLocalMode": "<string>",
"grNBit": true,
"grRBit": true,
"grRemoteMode": "<string>",
"grRestartTimeS": 1,
"grStalePathTimeS": 1,
"holdConfiguredMs": 1,
"holdNegotiatedMs": 1,
"hostname": "<string>",
"keepaliveConfiguredMs": 1,
"keepaliveNegotiatedMs": 1,
"lastResetAgoMs": 1,
"lastResetCode": 123,
"lastResetReason": "<string>",
"localAddr": "<string>",
"msgs": {
"keepalivesRecv": 123,
"keepalivesSent": 123,
"notifRecv": 123,
"notifSent": 123,
"opensRecv": 123,
"opensSent": 123,
"routeRefreshRecv": 123,
"routeRefreshSent": 123,
"totalRecv": 123,
"totalSent": 123,
"updatesRecv": 123,
"updatesSent": 123
},
"multihop": true,
"remoteAddr": "<string>",
"routeMapIn": "<string>",
"routeMapOut": "<string>",
"softwareVersion": "<string>",
"tcpMssSynced": true,
"uptime": "<string>"
}
],
"error": "<string>",
"localAS": 123,
"policy": "<unknown>",
"prefixLists": {},
"routeMaps": {},
"routerId": "<string>"
}
]
}Authorizations
sessionCookiebearerToken
The session cookie issued by the OIDC sign-in flow. This is what a browser uses.
Path Parameters
The supervisor's name, as registered under Administration → Supervisors.