-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.yml
183 lines (178 loc) · 5.66 KB
/
api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
---
openapi: '3.0.0'
info:
title: bgp_routeinfo HTTP API
version: '1.0.0'
description: |
The bgp_routeinfo daemon returns a looking-glass-style JSON response read from BGP directly.
servers:
- url: https://lookingglass01.belwue.de/api
description: BelWü production server
paths:
/status:
get:
summary: Get status information about the configured routers.
responses:
'200':
description: Status information
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
'500':
description: An error occurred while processing
content:
text/plain:
schema:
type: string
description: Error text
example: Something bad happened!
/prefix:
get:
summary: Get information about a given prefix from a given router.
parameters:
- in: query
name: prefix
schema:
type: string
required: true
description: IPv4 or IPv6 prefix to query information about
- in: query
name: router
schema:
type: array
items:
type: string
description: Names of routers to retrieve information from, defaults to all routers
responses:
'200':
description: Prefix information
content:
application/json:
schema:
$ref: '#/components/schemas/Prefix'
'500':
description: An error occurred while processing
content:
text/plain:
schema:
type: string
description: Error text
example: Something bad happened!
components:
schemas:
Status:
type: object
properties:
errors:
description: Error texts
nullable: true
type: array
example: null
items:
type: string
example: Something bad happened!
results:
description: Available routers
type: array
items:
type: object
properties:
router:
description: Name of the router
type: string
example: my-fancy-router
ready:
description: Whether this router is currently usable
type: boolean
Prefix:
type: object
properties:
errors:
description: Error texts
nullable: true
type: array
example: null
items:
type: string
example: Something bad happened!
results:
description: Route information returned from each specified router
type: array
items:
type: object
properties:
router:
description: Name of the router that returned this data
type: string
example: my-fancy-router
prefix:
description: Matched prefix
type: string
example: 1.2.3.4
paths:
description: Paths to the prefix
type: array
items:
type: object
properties:
aspath:
description: Hops to the AS
type: array
items:
type: integer
example: 1234
communities:
description: Communities this path is in
type: array
nullable: true
items:
type: string
example: "123:456"
largecommunities:
description: Large communities this path is in
type: array
nullable: true
items:
type: string
example: "123:456"
localpref:
description: Local pref of the path
type: integer
example: 100
med:
description: Med value of the path
type: integer
example: 1000
nexthop:
description: Next hop
type: string
example: 1.2.3.4
originas:
description: AS this path originates from
type: integer
example: 1234
origin:
description: Origin of the path
type: integer
example: 0
peer:
description: Peer of the path
type: string
example: 1.2.3.4
prefix:
description: Prefix of this path
type: string
example: 1.2.3.0/24
timestamp:
description: Timestamp when the prefix was learned
type: string
example: 2022-09-15T21:57:52Z
validation:
description: Validation lookup result (0 → valid, 1 → not found, 1 → invalid)
type: integer
example: 0
enum:
- 0
- 1
- 2