orgsStatsBGPPeers := client .OrgsStatsBGPPeers ()
OrgsStatsBGPPeers
Count Org BGP Stats
CountOrgBgpStats (
ctx context .Context ,
orgId uuid .UUID ) (
models .ApiResponse [models .RepsonseCount ],
error )
Parameter
Type
Tags
Description
orgId
uuid.UUID
Template, Required
-
models.RepsonseCount
ctx := context .Background ()
orgId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
apiResponse , err := orgsStatsBGPPeers .CountOrgBgpStats (ctx , orgId )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Example Response (as JSON)
{
"distinct" : " string" ,
"end" : 0 ,
"limit" : 0 ,
"results" : [
{
"count" : 0 ,
"property" : " string"
}
],
"start" : 0 ,
"total" : 0
}
Search Org BGP Stats
SearchOrgBgpStats (
ctx context .Context ,
orgId uuid .UUID ) (
models .ApiResponse [models .ResponseSearchBgps ],
error )
Parameter
Type
Tags
Description
orgId
uuid.UUID
Template, Required
-
models.ResponseSearchBgps
ctx := context .Background ()
orgId := uuid .MustParse ("000000ab-00ab-00ab-00ab-0000000000ab" )
apiResponse , err := orgsStatsBGPPeers .SearchOrgBgpStats (ctx , orgId )
if err != nil {
log .Fatalln (err )
} else {
// Printing the result and response
fmt .Println (apiResponse .Data )
fmt .Println (apiResponse .Response .StatusCode )
}
Example Response (as JSON)
{
"end" : 0 ,
"limit" : 0 ,
"results" : [
{
"evpn_overlay" : true ,
"for_overlay" : true ,
"local_as" : 65000 ,
"mac" : " 020001c04668" ,
"neighbor" : " 15.8.3.5" ,
"neighbor_as" : 65000 ,
"neighbor_mac" : " 020001c04600" ,
"node" : " node0" ,
"org_id" : " 0c160b7f-1027-4cd1-923b-744534c4b070" ,
"rx_pkts" : 63366 ,
"rx_routes" : 60 ,
"site_id" : " 725a8d34-a126-4f2c-b990-d1219421cb75" ,
"state" : " established" ,
"timestamp" : 1666251056.07 ,
"tx_pkts" : 1735 ,
"tx_routes" : 60 ,
"up" : true ,
"uptime" : 31355 ,
"vrf_name" : " default"
}
],
"start" : 0 ,
"total" : 0
}