-
Notifications
You must be signed in to change notification settings - Fork 18
/
openapi.yaml
1891 lines (1840 loc) · 54.1 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
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: OpenFairDB API
version: 0.12.10
contact:
name: slowtec GmbH
url: "https://slowtec.de"
license:
name: AGPLv3
url: "https://github.com/slowtec/openfairdb/blob/main/LICENSE"
servers:
- url: "https://api.ofdb.io/v0/"
description: Public production server
- url: "https://dev.ofdb.io/v0/"
description: Public unstable development server
paths:
/search:
get:
summary: Search for places
description: |
Query the database for entries/places according to the search criteria
and order the top matching results by their total rating in descending
order.
The default result contains up to 100 entries. Use the `limit` parameter
to customize the desired amount. The server may decide to deliver less
results than requested up to some internal upper limit (currently 2000).
If the review status list is empty or missing only visible places
(created, confirmed) are returned.
tags:
- Search
parameters:
- $ref: "#/components/parameters/BoundingBox"
- $ref: "#/components/parameters/OrgTagFilter"
- name: categories
in: query
schema:
type: string
description: |
Comma-separated list of category identifiers.
We currently use the following two:
- Initiative (non-commercial): `2cd00bebec0c48ba9db761da48678134`
- Company (commercial): `77b3c33a92554bcf8e8c2c86cedd6f6f`
- name: text
in: query
schema:
type: string
- $ref: "#/components/parameters/IdList"
- $ref: "#/components/parameters/TagList"
- $ref: "#/components/parameters/ReviewStatusList"
- $ref: "#/components/parameters/PaginationLimit"
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/SearchResponse"
/search/duplicates:
post:
summary: Search for duplicate places
description: |
Search for similar places that might be duplicates of a
given place.
Currently only the geographical location and title and are
considered to find similar, already existing entries in
the database.
Returns a list of possible duplicates for the given place.
tags:
- Search
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NewEntryWithLicense"
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/SearchEntry"
"/entries":
post:
summary: Create an entry
tags:
- Entries/Places
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NewEntryWithLicense"
security:
- bearerAuth: []
- captchaCookieAuth: []
- jwtAuth: []
- userEmailCookieAuth: []
responses:
"200":
description: Successful response
"/entries/{ids}":
get:
summary: Get multiple entries
tags:
- Entries/Places
parameters:
- $ref: "#/components/parameters/IdListPath"
- $ref: "#/components/parameters/OrgTagFilter"
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Entry"
"/entries/{id}":
put:
summary: Update an entry
description: |
The edited entry must include the *next version* of this entry
in the `version` field, where *next version* = *current version* + 1.
tags:
- Entries/Places
parameters:
- $ref: "#/components/parameters/IdPath"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NewEntryWithVersion"
security:
- bearerAuth: []
- captchaCookieAuth: []
- jwtAuth: []
- userEmailCookieAuth: []
responses:
"200":
description: Successful response
/entries/recently-changed:
get:
summary: Get recently changed entries
description: |
Get recently changed entries that have been created/updated/archived between since and now.
Limitation: Only the most recent 1000 entries are returned and the change history is
restricted to the last 100 days.
tags:
- Entries/Places
parameters:
- name: since
in: query
required: false
description: Time stamp of the oldest change (inclusive)
schema:
$ref: "#/components/schemas/UnixTime"
- name: until
in: query
required: false
description: Time stamp of the most recent change (exclusive)
schema:
$ref: "#/components/schemas/UnixTime"
- name: with_ratings
in: query
description: Return entries including their ratings
schema:
type: boolean
- $ref: "#/components/parameters/PaginationLimit"
- $ref: "#/components/parameters/PaginationOffset"
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/Entry"
/entries/most-popular-tags:
get:
summary: Get most popular tags for entries
description: |
Get most popular tags for entries with their total usage count.
Results are sorted in descending order of counts, i.e. most popular
tags appear first. A maximum of 1000 tag with their count is returned
if no limit is specified.
tags:
- Entries/Places
parameters:
- name: min_count
in: query
required: false
description: Minimum count per tag (inclusive)
schema:
type: integer
format: int64
- name: max_count
in: query
required: false
description: Maximum count per tag (inclusive)
schema:
type: integer
format: int64
- $ref: "#/components/parameters/PaginationLimit"
- $ref: "#/components/parameters/PaginationOffset"
- name: max_cache_age
in: query
required: false
description: |
By default, cached data is returned for performance, if the cache is not older than one hour.
If you need newer data, you can set the maximum tolerable age of the cache here, in seconds.
A value of 0 disables the cache and gets the newest state.
schema:
type: integer
format: int64
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/TagCounts"
"/places/clearance":
get:
tags:
- Entries/Places
summary: List clearance of places
description: |
Returns a list of places with pending clearance on behalf
of the requesting organization in chronological order.
Requests must include the API token of the organization.
parameters:
- $ref: "#/components/parameters/PaginationLimit"
- $ref: "#/components/parameters/PaginationOffset"
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/PendingClearanceForPlace"
"401":
$ref: "#/components/responses/UnauthorizedError"
post:
tags:
- Entries/Places
summary: Update clearance of places
description: |
Update the clearance of multiple places on behalf of the
requesting organization.
Returns the number of created/updated clearance records.
If the given revision matches the current revision of that place
then any pending clearance is deleted. Otherwise clearance will
remain pending with the given revision stored as the new last
cleared revision, i.e. any pending clearance is replaced.
Requests must include the API token of the organization.
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ClearanceForPlace"
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/ResultCount"
"401":
$ref: "#/components/responses/UnauthorizedError"
"/places/clearance/count":
get:
tags:
- Entries/Places
summary: Count clearance of places
description: |
Returns the total number places with pending clearance on behalf
of the requesting organization.
Requests must include the API token of the organization.
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/ResultCount"
"401":
$ref: "#/components/responses/UnauthorizedError"
"/places/{id}/history/{revision}":
get:
tags:
- Entries/Places
summary: History of place revisions
description: |
Loads the history of all place revisions including status reviews.
Optionally the result can be restricted to a single revision. If no
particular revision is requested then all revisions are returned.
Results are sorted in descending chronological order of activity time stamps,
i.e. the most recent changes appear first.
Only users with the role scout or admin are entitled to invoke this function.
Organizations must provide their API token for authorization.
parameters:
- $ref: "#/components/parameters/IdPath"
- $ref: "#/components/parameters/OptionalRevisionPath"
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/PlaceHistory"
"401":
$ref: "#/components/responses/UnauthorizedError"
"/places/{ids}/review":
post:
tags:
- Entries/Places
summary: Review multiple places
description: |
Reviews the latest revision of multiple places at once. An audit log
is written into the history of all place revisions.
Depending on the review status the affected places might be
hidden from search results (archived, rejected) or re-appear
(created, confirmed).
Only scouts and admins are entitled to invoke this function.
parameters:
- $ref: "#/components/parameters/IdListPath"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Review"
responses:
"201":
description: Created a review for all places.
"400":
$ref: "#/components/responses/ParameterError"
"401":
$ref: "#/components/responses/UnauthorizedError"
"/places/review-with-token":
post:
tags:
- Entries/Places
summary: Review a place by a secret token
description: |
Reviews a specific revision of a place.
If a newer revision already exists, a review is no longer possible.
An audit log is written into the history of the place revision.
Depending on the review status the affected place might be
hidden from search results (archived, rejected) or re-appear
(created, confirmed).
requestBody:
required: true
content:
application/json:
schema:
properties:
status:
$ref: "#/components/schemas/ReviewStatus"
token:
$ref: "#/components/schemas/ReviewToken"
responses:
"201":
description: Created a review for the place.
"400":
$ref: "#/components/responses/ParameterError"
"401":
$ref: "#/components/responses/UnauthorizedError"
"/places/not-updated":
get:
tags:
- Entries/Places
summary: Get outdated entries
description: |
Returns a list of places that have not been changed since the given timestamp.
Archived and rejected places are ignored.
Only scouts and admins are entitled to invoke this function.
parameters:
- name: since
in: query
required: false
description: The point in time from which the places are to be considered up-to-date.
schema:
$ref: "#/components/schemas/UnixTime"
- $ref: "#/components/parameters/PaginationLimit"
- $ref: "#/components/parameters/PaginationOffset"
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
type: array
minLength: 3
maxLength: 3
items:
oneOf:
- $ref: "#/components/schemas/PlaceRoot"
- $ref: "#/components/schemas/PlaceRevision"
- $ref: "#/components/schemas/ReviewStatus"
"401":
$ref: "#/components/responses/UnauthorizedError"
"/ratings/{ids}":
get:
summary: Get multiple ratings
tags:
- Ratings
parameters:
- $ref: "#/components/parameters/IdListPath"
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/Rating"
/categories/:
get:
summary: Get available categories
tags:
- Categories
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Category"
"/categories/{ids}":
get:
summary: Get multiple categories
tags:
- Categories
parameters:
- $ref: "#/components/parameters/IdListPath"
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/Category"
/events:
get:
tags:
- Events
summary: Search events
parameters:
- $ref: "#/components/parameters/BoundingBox"
- $ref: "#/components/parameters/PaginationLimit"
- $ref: "#/components/parameters/EventTagList"
- $ref: "#/components/parameters/EventStartMin"
- $ref: "#/components/parameters/EventStartMax"
- $ref: "#/components/parameters/EventEndMin"
- $ref: "#/components/parameters/EventEndMax"
- $ref: "#/components/parameters/EventFilterText"
- $ref: "#/components/parameters/EventCreatedBy"
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Event"
post:
tags:
- Events
summary: Create a new event
description: |
Creating new events is only allowed for registered organizations
by authorizing themselves with an API token. These organizations must
own reserved tags.
One or more reserved tags have to be provided upon creation. Otherwise
all of the organization's reserved tags are added implicitly to the event.
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Event"
responses:
"201":
description: Created a new event
content:
application/json:
schema:
description: The ID of the created event
type: string
"401":
$ref: "#/components/responses/UnauthorizedError"
"/events/{id}":
get:
summary: Get a single event
tags:
- Events
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/Event"
put:
summary: Update an event
description: |
Events can only be updated by the organization that owns them.
Ownership is determined by the event's reserved tags.
The updated event must be assigned at least one of the organization's
reserved tags. Otherwise all reserved tags of the event are preserved
by implicitly re-adding them.
tags:
- Events
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Event"
responses:
"200":
description: Successfully updated the event
"401":
$ref: "#/components/responses/UnauthorizedError"
delete:
summary: Delete an event
description: |
Events can only be deleted by the organization that owns them.
Ownership is determined by the event's reserved tags.
tags:
- Events
security:
- bearerAuth: []
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
"200":
description: Successfully deleted the event
"401":
$ref: "#/components/responses/UnauthorizedError"
"/events/{ids}/archive":
post:
tags:
- Events
summary: Archive multiple events
description: |
Marks the given events as *archived* and excludes them from
all search results.
Only scouts and admins are entitled to invoke this function.
parameters:
- $ref: "#/components/parameters/IdListPath"
responses:
"204":
description: Archived the given events if not already archived.
"400":
$ref: "#/components/responses/ParameterError"
"401":
$ref: "#/components/responses/UnauthorizedError"
"/login":
post:
summary: User login
tags:
- Users
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Credentials"
responses:
"200":
description: Successful response - the JWT token
content:
application/json:
schema:
$ref: "#/components/schemas/JwtToken"
"/logout":
post:
summary: User logout
tags:
- Users
security:
- jwtAuth: []
responses:
"200":
description: Successful response
"/users":
post:
summary: Register a new user
tags:
- Users
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NewUser"
responses:
"200":
description: Successful response
"/users/current":
get:
summary: Get the current user
tags:
- Users
security:
- jwtAuth: []
responses:
"200":
description: The current user
content:
application/json:
schema:
$ref: "#/components/schemas/User"
"/users/reset-password-request":
post:
summary: Request a password reset
tags:
- Users
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
$ref: "#/components/schemas/UserEmail"
responses:
"200":
description: Successful response
"/users/reset-password":
post:
summary: Request a users password
tags:
- Users
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
$ref: "#/components/schemas/UserEmail"
token:
type: string
new_password:
type: string
responses:
"200":
description: Successful response
/users/confirm-email-address:
post:
summary: Confirm that an email is valid.
tags:
- Users
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
token:
type: string
responses:
"200":
description: Successful response
/subscribe-to-bbox:
post:
summary: Subscribe to a bounding box
tags:
- Subscriptions
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/LatLonDeg"
example:
- lat: 45.3
lng: 8.6
- lat: 48.7
lng: 9.2
responses:
"200":
description: Successful response
/bbox-subscriptions:
get:
summary: Fetch subscriptions
tags:
- Subscriptions
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/BboxSubscription"
/unsubscribe-all-bboxes:
delete:
summary: Delete all subscriptions
tags:
- Subscriptions
responses:
"200":
description: Successful response
/tags:
get:
summary: Get tags
tags:
- Tags
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
type: string
/count/entries:
get:
summary: Get number of entries
tags:
- Stats
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: integer
/count/tags:
get:
summary: Get number of tags
tags:
- Stats
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: integer
/server/version:
get:
summary: Get current server version
tags:
- Stats
responses:
"200":
description: Successful response
content:
text/plain:
schema:
type: string
/server/openapi.yaml:
get:
summary: Download the current API documentation
tags:
- Stats
responses:
"200":
description: Successful response
content:
text/yaml:
schema:
type: string
/export/entries.csv:
get:
summary: Export places as CSV.
description: |
The CSV export is only available for logged in users with the role _Admin_ or _Scout_.
This request supports the same parameters as the corresponding search request.
Contact details (email/phone) are only visible for users with the role _Admin_ or _Scout_.
Information about who created the current version (created_by) is only visible for
users with the role _Admin_ or owners of this entry.
**Example**:
Export all entries in Germany:
`/export/entries.csv?bbox=47.49,0.79,54.63,18.30`
tags:
- Export
parameters:
- $ref: "#/components/parameters/BoundingBox"
- name: categories
in: query
schema:
type: string
description: |
Comma-separated list of category identifiers.
We currently use the following two:
- Initiative (non-commercial): `2cd00bebec0c48ba9db761da48678134`
- Company (commercial): `77b3c33a92554bcf8e8c2c86cedd6f6f`
- name: text
in: query
schema:
type: string
- $ref: "#/components/parameters/IdList"
- $ref: "#/components/parameters/TagList"
- $ref: "#/components/parameters/ReviewStatusList"
- $ref: "#/components/parameters/PaginationLimit"
responses:
"200":
description: Successful response
content:
text/csv:
schema:
type: string
"401":
$ref: "#/components/responses/UnauthorizedError"
/export/events.csv:
get:
summary: Export events as CSV.
description: |
The CSV export is only available for logged in users with the role _Admin_ or _Scout_.
This request supports the same parameters as the corresponding search request.
**Example**:
Export all events in Germany:
`/export/events.csv?bbox=47.49,0.79,54.63,18.30`
tags:
- Export
parameters:
- $ref: "#/components/parameters/BoundingBox"
- $ref: "#/components/parameters/PaginationLimit"
- $ref: "#/components/parameters/EventTagList"
- $ref: "#/components/parameters/EventStartMin"
- $ref: "#/components/parameters/EventStartMax"
- $ref: "#/components/parameters/EventFilterText"
- $ref: "#/components/parameters/EventCreatedBy"
responses:
"200":
description: Successful response
content:
text/csv:
schema:
type: string
"401":
$ref: "#/components/responses/UnauthorizedError"
/export/events.ical:
get:
summary: Export events as iCal.
description: |
The iCal export is only available for logged in users with the role _Admin_ or _Scout_.
This request supports the same parameters as the corresponding search request.
**Example**:
Export all events in Germany:
`/export/events.ical?bbox=47.49,0.79,54.63,18.30`
tags:
- Export
parameters:
- $ref: "#/components/parameters/BoundingBox"
- $ref: "#/components/parameters/PaginationLimit"
- $ref: "#/components/parameters/EventTagList"
- $ref: "#/components/parameters/EventStartMin"
- $ref: "#/components/parameters/EventStartMax"
- $ref: "#/components/parameters/EventFilterText"
- $ref: "#/components/parameters/EventCreatedBy"
responses:
"200":
description: Successful response
content:
text/calendar:
schema:
type: string
"401":
$ref: "#/components/responses/UnauthorizedError"
/captcha:
post:
summary: Request a new captcha challenge
tags:
- Captcha
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/CaptchaToken"
"/captcha/{captcha-token}":
get:
summary: Get the captcha challenge
description: |
Returns an image with a captcha challenge for the given token.
tags:
- Captcha
parameters:
- $ref: "#/components/parameters/CaptchaToken"
responses:
"200":
description: Successful response
content:
image/png:
schema:
$ref: "#/components/schemas/CaptchaImage"
"404":
description: Unknown or expired token
"/captcha/{captcha-token}/verify":
post:
summary: Verify a captcha answer for the given token
tags:
- Captcha
parameters:
- $ref: "#/components/parameters/CaptchaToken"
requestBody:
required: true
content:
text/plain:
schema:
$ref: "#/components/schemas/CaptchaAnswer"
responses:
"200":
description: |
The answer to the capcha challenge was correct.
A token is returned in a cookie named `ofdb-captcha`.
You need to include this cookie in subsequent requests.
headers:
Set-Cookie:
schema:
type: string
example: ofdb-captcha=2f006JTvKBr5KJggwirdTzTssdzschIwThWF8LdqPZTr4wSY6r%2F79ayYNz46NTrKn4VR6KPxpkNeIOoGbA%3D%3D; HttpOnly; Path=/;
"400":
description: The answer to the capcha challenge was not correct
components:
schemas:
NewEntry:
properties: