formatting.

This commit is contained in:
Matthias Hannig 2019-07-18 12:20:55 +02:00
parent 841aa7edf5
commit 582b405011
No known key found for this signature in database
GPG Key ID: 62E226E47DDCE58D
1 changed files with 64 additions and 64 deletions

View File

@ -3,83 +3,83 @@ Minimal description of required fields
# Envelope
{
"api": {
"version": "string",
"result_from_cache": "boolean",
"cache_status": {
"cached_at": "datetime",
"date": "datetime",
{
"api": {
"version": "string",
"result_from_cache": "boolean",
"cache_status": {
"cached_at": "datetime",
"date": "datetime",
}
}
"ttl": "datetime",
}
"ttl": "datetime",
}
# Status
{
"api": ...,
"status": {
"current_server": "datetime",
"last_reboot": "datetime",
"last_reconfig": "datetime",
"version": "string",
"message": "string",
"router_id": "string",
{
"api": ...,
"status": {
"current_server": "datetime",
"last_reboot": "datetime",
"last_reconfig": "datetime",
"version": "string",
"message": "string",
"router_id": "string",
}
}
}
# Routes
{
"api": ...,
"routes": [
{
"age": "datetime",
"bgp": {
"as_path": ["int"],
"communities": [["int"]],
"ext_communities": [["string"]],
"large_communities": [["int"]],
"local_pref": "int",
"med": "int",
"origin": "string",
"next_hop": "string",
},
"network": "string",
"from_protocol": "string",
"interface": "string",
"gateway": "string"
"metric": "int",
"type": ["string"],
"primary": "boolean"
}
]
}
{
"api": ...,
"routes": [
{
"age": "datetime",
"bgp": {
"as_path": ["int"],
"communities": [["int"]],
"ext_communities": [["string"]],
"large_communities": [["int"]],
"local_pref": "int",
"med": "int",
"origin": "string",
"next_hop": "string",
},
"network": "string",
"from_protocol": "string",
"interface": "string",
"gateway": "string"
"metric": "int",
"type": ["string"],
"primary": "boolean"
}
]
}
# Protocols / Neighbors
{
"api": ...,
"protocols": [
{
"routes": {
"imported": "int",
"filtered": "int",
"exported": "int",
"preferred": "int",
},
"neighbor_address": string,
"neighbor_as": int,
"state": "string",
"description": "string",
"state_changed": "datetime",
"uptime": "datetime",
"last_error": "string"
}
]
}
{
"api": ...,
"protocols": [
{
"routes": {
"imported": "int",
"filtered": "int",
"exported": "int",
"preferred": "int",
},
"neighbor_address": string,
"neighbor_as": int,
"state": "string",
"description": "string",
"state_changed": "datetime",
"uptime": "datetime",
"last_error": "string"
}
]
}