-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
883 lines (804 loc) · 37.4 KB
/
openapi.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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
openapi: 3.1.0
info:
title: ProbeLab API
summary: ProbeLab API for awesome metrics 💫
description: |
The ProbeLab API offers endpoints for retrieving detailed network
metrics.
This API loosely follows the [Google JSON Style Guide](https://google.github.io/styleguide/jsoncstyleguide.xml).
This means, all successful responses will only have a `data` field
containing the payload. All error responses will only have an `error` field
containing at least a `message` field with an error description. Following
the style guide, if there are multiple errors the `error` object will
contain another `errors` array.
version: 0.5.0
contact:
name: ProbeLab Team
url: https://probelab.io
email: [email protected]
servers:
- url: 'https://api.probelab.io'
description: Production
security:
- ApiKeyAuth: []
paths:
/v1/projects/celestia/networks/{network}/stats/country:
get:
tags:
- Celestia
summary: Celestia peer country distribution
description: |
This endpoint returns the number of peers we have found in a given
interval in a specific country. You can request multiple intervals
at once by spanning a large enough time range with the `start` and `end`
query parameters. Check the different path and query parameter
documentation below.
The maximum number of data points that this endpoint returns is `512`.
The number of data points is derived by dividing the `start` and `end`
time range by the `interval` duration. This is an arbitrary limitation
and if you need different limits, let us know at [[email protected]]([email protected]).
The default data points granularity (`interval`) is 1h and the
minimum is 10 minutes. Any interval that's a multiple of 10 minutes is
valid.
Check out the documentation of the response schema to learn more about
the idiosyncrasies of the data.
operationId: getCelestiaStatsCountry
parameters:
- $ref: '#/components/parameters/requestID'
- $ref: '#/components/parameters/celestiaNetwork'
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/end'
- $ref: '#/components/parameters/nodeTypes'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
data:
type: object
allOf:
- $ref: '#/components/schemas/CommonStatisticsResponseFields'
- properties:
statistic:
type: string
description: |
Mirroring back the statistic that the data represents.
For this endpoint the value will always be `country`.
columns:
type: array
items:
type: string
description: |
At each timestamp (`index` entry) we will have
values for various countries. This `columns` array will
contain [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1)
alpha-2 codes like `US`, `GR`, or `FR`. If a peer was
seen in more than one country in the specified time
interval, the peer only counts towards the latest
country in the interval. So for example if the
aggregation interval is 1h and after a minute we see
peer A in the US and after another 30 minutes we see
the same peer A in FR, the peer is only counted towards
France.
In the data there is one special case where we were not
able to geolocate a peer. In this case the array will
contain the value `unknown`.
example:
data:
start: "2024-12-05T00:00:00"
end: "2024-12-05T02:00:00"
interval: 3600
statistic: "country"
project: "celestia"
network: "mainnet"
index:
- "2024-12-05T00:00:00"
- "2024-12-05T01:00:00"
columns:
- "unknown"
- "FR"
- "ES"
values:
- [ 2, 124, 17]
- [ 1, 123, 17]
'400':
description: Bad Request
$ref: '#/components/responses/ErrorResponse'
'401':
description: Unauthorized
$ref: '#/components/responses/ErrorResponse'
/v1/projects/celestia/networks/{network}/stats/city:
get:
tags:
- Celestia
summary: Celestia peer city distribution
description: |
This endpoint returns the number of peers we have found in a given
interval in a specific city. You can request multiple intervals
at once by spanning a large enough time range with the `start` and `end`
query parameters. Check the different path and query parameter
documentation below.
The maximum number of data points that this endpoint returns is `512`.
The number of data points is derived by dividing the `start` and `end`
time range by the `interval` duration. This is an arbitrary limitation
and if you need different limits, let us know at [[email protected]]([email protected]).
The default data points granularity (`interval`) is 1h and the
minimum is 10 minutes. Any interval that's a multiple of 10 minutes is
valid.
Keep in mind that we geolocate peers by their IP addresses. This means
the data accuracy is determined by the IP geolocation service being used.
We collaborate with [ipregistry.co](ipregistry.co). City-level geolocations
are often only accurate to a 50km (~30 miles) radius.
Check out the documentation of the response schema to learn more about
the idiosyncrasies of the data.
operationId: getCelestiaStatsCity
parameters:
- $ref: '#/components/parameters/requestID'
- $ref: '#/components/parameters/celestiaNetwork'
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/end'
- $ref: '#/components/parameters/nodeTypes'
- $ref: '#/components/parameters/cityFormat'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
data:
type: object
allOf:
- $ref: '#/components/schemas/CommonStatisticsResponseFields'
- properties:
statistic:
type: string
description: |
Mirroring back the statistic that the data represents.
For this endpoint the value will always be `city`.
columns:
type: array
items:
type: string
description: |
For each index entry (timestamp) we can have multiple
values that correspond to that index.
In the case of the `city` statistic this array will
contain geohash+city name combinations formatted like
`$geo_hash,$city_name` by default. The format can be
configured with the `format` query parameter. See the
corresponding documentation. Note that there can be
multiple different geo hashes for the same city name.
Similar to the `country` statistic, only the latest
city in the time interval is considered. This array
may also contain entries that correspond to unknown
locations of peers. These will appear in the resulting
array as `s00000000,unknown` in the default formatting
case. `s00000000` corresponds to the lat/long values
of `0`, `0`. The full format for an unknown city is
`unknown,unknown,s00000000000,0,0,unknown`.
example:
data:
start: "2024-12-05T00:00:00"
end: "2024-12-05T02:00:00"
interval: 3600
statistic: "city"
project: "celestia"
network: "mainnet"
index:
- "2024-12-05T00:00:00"
- "2024-12-05T01:00:00"
columns:
- "s00000000000,unknown"
- "69y7hj5ttkde,Caseros"
- "6e9dch78y512,Salta"
values:
- [ 1, 124, 17 ]
- [ 3, 123, 17 ]
'400':
description: Bad Request
$ref: '#/components/responses/ErrorResponse'
'401':
description: Unauthorized
$ref: '#/components/responses/ErrorResponse'
/v1/projects/celestia/networks/{network}/stats/version:
get:
tags:
- Celestia
summary: Celestia peer version distribution
description: |
This endpoint returns the number of peers we have found in a given
interval running a specific version. You can request multiple intervals
at once by spanning a large enough time range with the `start` and `end`
query parameters. Check the different path and query parameter
documentation below.
The data of this endpoint only makes sense if you provide the `nodeTypes`
filter with a single value as a query parameter.
The maximum number of data points that this endpoint returns is `512`.
The number of data points is derived by dividing the `start` and `end`
time range by the `interval` duration. This is an arbitrary limitation
and if you need different limits, let us know at [[email protected]]([email protected]).
The default data points granularity (`interval`) is 1h and the
minimum is 10 minutes. Any interval that's a multiple of 10 minutes is
valid.
Check out the documentation of the response schema to learn more about
the idiosyncrasies of the data.
operationId: getCelestiaStatsVersion
parameters:
- $ref: '#/components/parameters/requestID'
- $ref: '#/components/parameters/celestiaNetwork'
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/end'
- $ref: '#/components/parameters/nodeTypes'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
data:
type: object
allOf:
- $ref: '#/components/schemas/CommonStatisticsResponseFields'
- properties:
statistic:
type: string
description: |
Mirroring back the statistic that the data represents.
For this endpoint the value will always be `version`
columns:
type: array
items:
type: string
description: |
For each index entry (timestamp) we can have multiple
values that correspond to that index. Here this array
will contain a lexicographically sorted list of valid
semver strings containing the major, minor and patch
components.
example:
data:
start: "2024-12-05T00:00:00"
end: "2024-12-05T02:00:00"
interval: 3600
statistic: "version"
project: "celestia"
network: "mainnet"
index:
- "2024-12-05T00:00:00"
- "2024-12-05T01:00:00"
- "2024-12-05T02:00:00"
columns:
- "0.17.1"
- "0.20.0"
values:
- [ 124, 17]
- [ 123, 17]
- [ 180, 25]
'400':
description: Bad Request
$ref: '#/components/responses/ErrorResponse'
'401':
description: Unauthorized
$ref: '#/components/responses/ErrorResponse'
/v1/projects/celestia/networks/{network}/stats/nodetype:
get:
tags:
- Celestia
summary: Celestia peer node type distribution
description: |
This endpoint returns the number of peers we have found in a given
interval running a specific client implementation (node type). You can
request multiple intervals at once by spanning a large enough time range
with the `start` and `end` query parameters. Check the different path
and query parameter documentation below.
The maximum number of data points that this endpoint returns is `512`.
The number of data points is derived by dividing the `start` and `end`
time range by the `interval` duration. This is an arbitrary limitation
and if you need different limits, let us know at [[email protected]]([email protected]).
The default data points granularity (`interval`) is 1h and the
minimum is 10 minutes. Any interval that's a multiple of 10 minutes is
valid.
Check out the documentation of the response schema to learn more about
the idiosyncrasies of the data.
operationId: getCelestiaStatsNodeType
parameters:
- $ref: '#/components/parameters/requestID'
- $ref: '#/components/parameters/celestiaNetwork'
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/end'
- $ref: '#/components/parameters/nodeTypes'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
data:
type: object
allOf:
- $ref: '#/components/schemas/CommonStatisticsResponseFields'
- properties:
statistic:
type: string
description: |
Mirroring back the statistic that the data represents.
For this endpoint the value will always be `nodetype`
columns:
type: array
items:
type: string
description: |
For each index entry we can have multiple values that
correspond to that index. In the case of the `nodetype`
statistic we can have values for multiple node types
at each timestamp. This `columns` array will contain
an ordered list of node types. The ordering corresponds
to the values array of arrays below.
example:
data:
start: "2024-12-05T00:00:00"
end: "2024-12-05T02:00:00"
interval: 3600
statistic: "nodetype"
project: "celestia"
network: "mainnet"
index:
- "2024-12-05T00:00:00"
- "2024-12-05T01:00:00"
columns:
- "bridge"
- "full"
- "light"
- "other"
values:
- [ 124, 17, 229, 33 ]
- [ 123, 17, 229, 33 ]
'400':
description: Bad Request
$ref: '#/components/responses/ErrorResponse'
'401':
description: Unauthorized
$ref: '#/components/responses/ErrorResponse'
/v1/projects/celestia/networks/{network}/stats/connection:
get:
tags:
- Celestia
summary: Celestia peer connection distribution
description: |
This endpoint returns the number of peers we have found to interact
with network with a given connection type with the network. This can
range from mobile or datacenter connections to VPN or Tor ones.
You can request multiple intervals at once by spanning a large enough time range
with the `start` and `end` query parameters. Check the different path
and query parameter documentation below.
The maximum number of data points that this endpoint returns is `512`.
The number of data points is derived by dividing the `start` and `end`
time range by the `interval` duration. This is an arbitrary limitation
and if you need different limits, let us know at [[email protected]]([email protected]).
The default data points granularity (`interval`) is 1h and the
minimum is 10 minutes. Any interval that's a multiple of 10 minutes is
valid.
Check out the documentation of the response schema to learn more about
the idiosyncrasies of the data.
operationId: getCelestiaConnection
parameters:
- $ref: '#/components/parameters/requestID'
- $ref: '#/components/parameters/celestiaNetwork'
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/end'
- $ref: '#/components/parameters/nodeTypes'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
data:
type: object
allOf:
- $ref: '#/components/schemas/CommonStatisticsResponseFields'
- properties:
statistic:
type: string
description: |
Mirroring back the statistic that the data represents.
For this endpoint the value will always be `connection`
columns:
type: array
items:
type: string
enum:
- unknown
- vpn
- tor
- datacenter
- proxy
- relay
- bogon
- mobile
- education
- government
- regular
description: |
For each index entry we can have multiple values that
correspond to that index. In the case of the `connection`
statistic we can have values for multiple connection types
at each timestamp. This `columns` array will contain
an ordered list of the following connection types:
- `unknown` - number of peers we couldn't associate with one of the other types
- `vpn` - number of peers connecting to the network via a known VPN
- `tor` - number of peers connecting to the network via a Tor exit relay node, middle relay node or a bridge.
- `datacenter` - number of peers connecting from a known datacenter IP
- `proxy` - number of peers connecting to the network through a known proxy including HTTP/HTTPS/SSL/SOCKS/CONNECT and transparent proxies.
- `relay` - number of peers connecting to the network via a known relay. This is different from proxy as relays are not designed to bypass geo-controls but instead pool multiple users behind the same IP. At this time, only Apple Private Relay IP addresses are detected.
- `mobile` - number of peers connecting to the network via a cellular connection
- `education` - number of peers connecting to the network from, e.g., a university network
- `government` - number of peers connecting to the network from known governmental IP ranges
- `regular` - number of peers connecting to the network from non of the above. These are most likely residential connections but could be anything else. This is different from `unknown` in the regard that we could at least identify the peers' IP and get information for it.
You could sum the numbers of `vpn`, `tor`, and
`proxy` to derive property called `anonymous`.
The response may not contain all columns. For example,
if in the requested time range no peer connected via
a VPN, `vpn` won't appear in this array here.
example:
data:
start: "2024-12-05T00:00:00"
end: "2024-12-05T02:00:00"
interval: 3600
statistic: "connection"
project: "celestia"
network: "mainnet"
index:
- "2024-12-05T00:00:00"
- "2024-12-05T01:00:00"
columns:
- "unknown"
- "vpn"
- "regular"
- "mobile"
values:
- [ 124, 17, 229, 33 ]
- [ 123, 17, 229, 33 ]
'400':
description: Bad Request
$ref: '#/components/responses/ErrorResponse'
'401':
description: Unauthorized
$ref: '#/components/responses/ErrorResponse'
/v1/projects/celestia/networks/{network}/stats/datacenter:
get:
tags:
- Celestia
summary: Celestia peer datacenter distribution
description: |
This endpoint returns the number of peers we have found to interact
from a particular datacenter.
You can request multiple intervals at once by spanning a large enough time range
with the `start` and `end` query parameters. Check the different path
and query parameter documentation below.
The maximum number of data points that this endpoint returns is `512`.
The number of data points is derived by dividing the `start` and `end`
time range by the `interval` duration. This is an arbitrary limitation
and if you need different limits, let us know at [[email protected]]([email protected]).
The default data points granularity (`interval`) is 1h and the
minimum is 10 minutes. Any interval that's a multiple of 10 minutes is
valid.
Check out the documentation of the response schema to learn more about
the idiosyncrasies of the data.
operationId: getCelestiaDatacenter
parameters:
- $ref: '#/components/parameters/requestID'
- $ref: '#/components/parameters/celestiaNetwork'
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/end'
- $ref: '#/components/parameters/nodeTypes'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
data:
type: object
allOf:
- $ref: '#/components/schemas/CommonStatisticsResponseFields'
- properties:
statistic:
type: string
description: |
Mirroring back the statistic that the data represents.
For this endpoint the value will always be `datacenter`
columns:
type: array
items:
type: string
description: |
We are currently grouping peers in the following
datacenter categories:
- `AWS`
- `Alibaba`
- `Azure`
- `Cisco`
- `Contabo`
- `Digital Ocean`
- `GCP`
- `Hetzner`
- `IBM`
- `Linode`
- `OVH`
- `Oracle`
- `Rackspace`
- `Scaleway`
- `Tencent`
- `Verizon`
- `Vultr`
If there's a provider missing from that list, please
reach out to [`[email protected]`]([email protected])
and we will add it to the list. That being said,
when integrating this endpoint, don't expect this
list to be stable.
This endpoint will also only return the datacenters
where we found peers in the specified time interval.
All peers that run from within a cloud environment
and don't belong into one of the above datacenters
will be grouped under the `Other` key. For completeness
this endpoint also returns the number of peers
that do not run from a cloud environment. They
will be grouped under the `Non-Datacenter` key.
Finally, if there is a peer whose location we could
not identify, we group it under `unknown` (lower
case for consistency reasons with the other
endpoints).
So, additionally this array will contain the keys:
- `Other`
- `Non-Datacenter`
- `unknown`
example:
data:
start: "2024-12-05T00:00:00"
end: "2024-12-05T02:00:00"
interval: 3600
statistic: "connection"
project: "celestia"
network: "mainnet"
index:
- "2024-12-05T00:00:00"
- "2024-12-05T01:00:00"
columns:
- "AWS"
- "Azure"
- "Hetzner"
- "Other"
- "Non-Datacenter"
- "unknown"
values:
- [ 124, 17, 229, 33, 6, 0 ]
- [ 123, 17, 229, 33, 9, 0 ]
'400':
description: Bad Request
$ref: '#/components/responses/ErrorResponse'
'401':
description: Unauthorized
$ref: '#/components/responses/ErrorResponse'
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: ProbeLab-API-Key
parameters:
celestiaNetwork:
name: network
in: path
description: The network of interest. Arabica and Mocha are not supported yet.
required: true
schema:
type: string
enum: [mainnet]
requestID:
in: header
name: X-Request-ID
description: |
When you provide the `X-Request-ID` header and encounter an issue
with the API, please pass the ID to us and we will be better able
to identify the root cause.
schema:
type: string
format: uuid
start:
name: start
in: query
description: |
The UTC aggregation start timestamp. In combination with the `end`
query parameter, this endpoint will only return the aggregation of
peers that were seen in the network within the time range spanned by
both timestamps.
If this query parameter is not provided the API will return all peers
that were seen up until 24h before the `end` timestamp (which is set
to `now` by default).
Note that the timestamp will be rounded down to the nearest multiple
of `interval` which is set to 3600 seconds (1h) by default.
You can provide timestamps as defined by [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339)
in the format `2006-01-02T15:04:05+07:00`. You can omit the timezone
part `2006-01-02T15:04:05Z` (the `Z` suffix indicates UTC).
example: "2024-11-05T10:04:30Z"
schema:
type: string
format: date-time
end:
name: end
in: query
description: |
The UTC aggregation end timestamp. By default this is set to `now()`
truncated to the latest multiple of `interval` which is set to 3600
seconds (1h) by default. So, if `now()` is `2025-03-14T12:36:57` and
interval is `3600s`, `end` will become `2025-03-14T12:00:00`.
You can provide timestamps as defined by [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339)
in the format `2006-01-02T15:04:05+07:00`. You can omit the timezone
part `2006-01-02T15:04:05Z` (the `Z` suffix indicates UTC).
schema:
type: string
format: date-time
example: "2024-11-05T10:04:30Z"
interval:
name: interval
in: query
description: |
The aggregation interval in seconds. By default this is set to 3600
(1h).
The `start` and `end` times will be rounded down to a multiple of
`interval` (since the beginning of the unix epoch).
For example, the a start or end timestamp of `2024-12-07T12:15:36`
with an interval of `1h` will be truncated to `2024-12-07T12:00:00`.
Further, the time range spanned by start and end will be divided
into `interval`-sized chunks in which the aggregation happens.
The value needs to be a multiple of the minimum interval size of
600 seconds (10 minutes).
schema:
type: integer
minimum: 600
default: 3600
example: "86400"
nodeTypes:
name: nodetypes
in: query
description: |
A comma separated list of node types to filter the results by. The
results will only contain nodes with any of the given types. The
maximum number of node types you can define here is five.
If no node types are specified, no filtering takes place and all
types will be returned.
Common values are:
- `bridge`
- `full`
- `light`
- `lumina`
- `unknown`
schema:
type: array
items:
type: string
example: "bridge,light"
cityFormat:
name: format
in: query
description: |
When requesting city aggregate data each column corresponds to a
specific city and the values the number of unique peers we found
in this city in the given time period and interval.
With this parameter you can control which information associated
with each city should be returned.
Valid values are:
- `$continent`
- `$country`
- `$latitude`
- `$longitude`
- `$geohash`
- `$city`
The value for this query parameter is a comma separated list of
the above formatting directives. There are two limitations:
1. You cannot change the order of the format but only enable/disable
the amount of information. For example: `$city,$country` is not allowed.
The reason is that city names can also contain `,` characters
2. You always need to have either the `$geohash` or `$latitude,$longitude`
directive in the format.
The default format is `$geohash,$city` which will return column
values like: `u4rpzkgevr73,Tjøllingvollen`.
More information about what geohashes are on [Wikipedia](https://en.wikipedia.org/wiki/Geohash).
The full schema `$continent,$country,$latitude,$longitude,$geohash,$city`
would look like: `EU,FR,u09tvmyy1um8,2.349440097808838,48.85588073730469,Paris`
schema:
type: array
default:
- $geohash
- $city
items:
type: string
example: "$continent,$country,$latitude,$longitude,$geohash,$city"
schemas:
CommonStatisticsResponseFields:
properties:
start:
type: string
format: date-time
description: |
The start time used for the aggregation. This can differ
from the provided start time. As indicated above, the
given timestamp is rounded down to the nearest multiple
of `interval`. This timestamp also may not match the
first timestamp in the `index` array. This can happen
if we don't have data points for such an early time.
It just indicates the start of the search space.
end:
type: string
format: date-time
description: |
The end time used for the aggregation. This can differ
from the provided end time. As indicated above, the
given timestamp is rounded down to the nearest multiple
of `interval`. This timestamp also never matches the last
timestamp in the `index` array. The last timestamp in the array
corresponds to the last bucket of the aggregation until
the `end` time. Therefore, the last timestamp in the
list is usually `interval` seconds earlier than this
`end` timestamp. If the `end` timestamp is in the
future the difference of the last timestamp in the
index array and this `end` value is larger accordingly.
It just indicates the end of the search space.
interval:
type: integer
description: |
The used aggregation interval in seconds.
project:
type: string
description: |
Mirroring back the project that was aggregated.
network:
type: string
description: |
Mirroring back the network that was aggregated.
index:
type: array
items:
type: string
description: |
This array will contain timestamp strings in the
[RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339)
format with seconds precision and will commonly be interpreted
as the x-axis of a graph.
values:
type: array
items:
type: array
items:
type: number
description: |
An array of arrays. Each item in the top level array
corresponds to a single index and each item in the
nested array to a column.
responses:
ErrorResponse:
description: A generic error response.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string