Please note that if you’re not using Erco at the root of your web server, you’ll need to add your URL prefix before the API URLs presented below.
id number
internal id of the subnet. Changes every time Erco is reloaded
cidr string
CIDR notation of the subnet
next_hop string
IP address of the next hop
communities array[string]
Array of communities the subnet is announced with
created_at number
UNIX timestamp of the subnet’s creation
human_created_at string
human readable representation of created_at
modified_at number
UNIX timestamp of the subnet’s last modification
human_modified_at string
human readable representation of modified_at
local_pref string
optional, local-preference of the subnet
Get the list of the announced subnets.
200
ShowHideContent-Type: application/json
[
{
"id":1,
"cidr":"203.0.113.0/24",
"next_hop":"192.0.2.42",
"communities":
[
"64496:42"
],
"created_at":1433497409,
"human_created_at":"Fri, 05 Jun 2015 09:43:29 GMT",
"modified_at":null,
"human_modified_at":null
},{
"id":2,
"cidr":"198.51.100.42\/32",
"next_hop":"192.0.2.44",
"communities":
[
"64496:42",
"64511:1337"
],
"created_at":1433497409,
"human_created_at":"Fri, 05 Jun 2015 09:43:29 GMT",
"modified_at":1435832156,
"human_modified_at":"Thu, 02 Jul 2015 10:15:55 GMT"
}
]
Announce a new subnet.
Content-Type: application/x-www-form-urlencoded
cidr=198.51.100.43/32&next_hop=192.0.2.42&communities[]=64496:42&communities[]=64511:1337
200
ShowHideContent-Type: application/json
# Success:
{
"success":true,
"msg":{
"id":3,
"cidr":"198.51.100.43\/32"
"next_hop":"192.0.2.42",
"communities":
[
"64496:42",
"64511:1337"
],
"created_at":1433497409,
"human_created_at":"Fri, 05 Jun 2015 09:43:29 GMT",
"modified_at":null,
"human_modified_at":null
}
}
# Failure:
{
"success":false,
"msg":"The reason why it failed"
}
Modified an announced subnet.
Content-Type: application/x-www-form-urlencoded
id=3&cidr=198.51.100.1/32&next_hop=192.0.2.42&communities[]=64496:42&communities[]=64511:123
200
ShowHideContent-Type: application/json
# Success:
{
"success":true,
"msg":{
"id":3,
"cidr":"198.51.100.1\/32"
"next_hop":"192.0.2.42",
"communities":
[
"64496:42",
"64511:123"
],
"created_at":1433497409,
"human_created_at":"Fri, 05 Jun 2015 09:43:29 GMT",
"modified_at":1435832156,
"human_modified_at":"Thu, 02 Jul 2015 10:15:55 GMT"
}
}
# Failure:
{
"success":false,
"msg":"The reason why it failed"
}
Stop to announce a subnet.
Get the status of Exabgp (running, not running).
200
ShowHideContent-Type: application/json
{
"running":true,
"file_missing":false
}
Execute a command on Exabgp.
string
(required) Example: reloadThe available commands depends of your configuration
200
ShowHideContent-Type: application/json
# Success:
{
"success":true,
"msg":"Exabgp has been successfully reloaded."
}
# Failure:
{
"success":false,
"msg":"The reason why it failed"
}
Get the list of available commands.
200
ShowHideContent-Type: application/json
[
"reload"
]
Generated by aglio on 22 Sep 2015