-
Notifications
You must be signed in to change notification settings - Fork 0
/
public-api.yaml
260 lines (253 loc) · 5.32 KB
/
public-api.yaml
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
swagger: "2.0"
info:
title: ForestVPN Public API
description: |
ForestVPN defeats content restrictions and censorship to deliver unlimited access to video, music, social media,
and more, from anywhere in the world.
termsOfService: https://www.forestvpn.com/terms/
contact:
name: Digital Services LLC
url: https://www.forestvpn.com/
email: [email protected]
license:
name: MIT
url: https://opensource.org/licenses/MIT
version: "2.0"
externalDocs:
description: Find more info here
url: https://www.forestvpn.com/
host: api.forestvpn.com
basePath: /v2
schemes:
- https
- http
consumes:
- application/json
produces:
- application/json
securityDefinitions:
Bearer:
type: apiKey
in: header
name: Authorization
security:
- Bearer: [ ]
paths:
/devices/{deviceID}/bindings/:
get:
summary: Device bindings
description: |
Each device has bindings to specific servers. This method returns hostnames where this device
bonded at a particular time.
operationId: BindingList
tags:
- device
parameters:
- in: path
name: deviceID
type: string
format: uuid
required: true
description: |
Device ID
responses:
200:
description: ok
schema:
$ref: "#/definitions/DeviceBindings"
default:
description: error
schema:
$ref: "#/definitions/Error"
/devices/{deviceID}/:
get:
summary: Device Info
description: |
Retrieve device info
operationId: GetByID
tags:
- device
parameters:
- in: path
name: deviceID
type: string
format: uuid
required: true
description: |
Device ID
responses:
200:
description: ok
schema:
$ref: "#/definitions/DeviceFullDetails"
default:
description: error
schema:
$ref: "#/definitions/Error"
/devices/{deviceID}/peers/:
get:
summary: Device Peers
description: |
Retrieve device peers
operationId: PeersList
tags:
- device
parameters:
- in: path
name: deviceID
type: string
format: uuid
required: true
description: |
Device ID
responses:
200:
description: ok
schema:
type: array
items:
$ref: "#/definitions/DevicePeer"
default:
description: error
schema:
$ref: "#/definitions/Error"
definitions:
Error:
type: object
properties:
code:
type: string
example: internal_server_error
message:
type: string
example: something went wrong
Country:
type: object
properties:
id:
type: string
name:
type: string
emoji:
type: string
Location:
type: object
properties:
id:
type: string
name:
type: string
latitude:
type: number
longitude:
type: number
country:
$ref: "#/definitions/Country"
IP:
type: string
DNS:
type: string
Port:
type: object
properties:
src:
type: integer
dst:
type: integer
WireGuardKey:
type: string
WireGuard:
type: object
properties:
priv_key:
$ref: "#/definitions/WireGuardKey"
pub_key:
$ref: "#/definitions/WireGuardKey"
peers:
type: array
items:
$ref: "#/definitions/WireGuardPeer"
DeviceStats:
type: object
properties:
connections:
type: number
received_bytes:
type: number
transmitted_bytes:
type: number
DeviceShortDetails:
type: object
properties:
id:
type: string
format: uuid
external_key:
type: string
name:
type: string
locations:
type: array
items:
$ref: "#/definitions/Location"
last_active_at:
type: string
format: date-time
DeviceFullDetails:
type: object
properties:
id:
type: string
format: uuid
external_key:
type: string
name:
type: string
ips:
type: array
items:
$ref: "#/definitions/IP"
x-go-name: IPs
dns:
type: array
items:
$ref: "#/definitions/DNS"
ports:
type: array
items:
$ref: "#/definitions/Port"
wireguard:
$ref: "#/definitions/WireGuard"
locations:
type: array
items:
$ref: "#/definitions/Location"
last_active_at:
type: string
format: date-time
stats:
$ref: "#/definitions/DeviceStats"
DeviceBindings:
type: array
items:
type: string
example: example.com
WireGuardPeer:
type: object
properties:
pub_key:
type: string
ps_key:
type: string
endpoint:
type: string
ips:
type: array
items:
$ref: "#/definitions/IP"
x-go-name: IPs
DevicePeer:
type: object
properties:
wireguard:
$ref: "#/definitions/WireGuardPeer"