-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathswagger_v1.yml.ejs
More file actions
4536 lines (4519 loc) · 118 KB
/
swagger_v1.yml.ejs
File metadata and controls
4536 lines (4519 loc) · 118 KB
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
swagger: "2.0"
info:
title: iNaturalist API
description: |
# https://api.inaturalist.org/v1/
[iNaturalist](https://www.inaturalist.org/) is a global community of
naturalists, scientists, and members of the public sharing over a million
wildlife sightings to teach one another about the natural world while
creating high quality citizen science data for science and conservation.
These API methods return data in JSON/JSONP and PNG response formats. They
are meant to supplement the existing [iNaturalist
API](https://www.inaturalist.org/pages/api+reference), implemented in Ruby
on Rails, which has more functionality and supports more write operations,
but tends to be slower and have less consistent response formats. Visit our
[developers page](https://www.inaturalist.org/pages/developers) for more
information. Write operations that expect and return JSON describe a single
`body` parameter that represents the request body, which should be specified
as JSON. See the "Model" of each body parameter for attributes that we
accept in these JSON objects.
Multiple values for a single URL parameter should be separated by commas,
e.g. `taxon_id=1,2,3`.
Map tiles are generated using the
[node-mapnik](https://github.com/mapnik/node-mapnik) library, following the
XYZ map tiling scheme. The "Observation Tile" methods accept nearly all the
parameters of the observation search APIs, and will generate map tiles
reflecting the same observations returned by searches. These
"Observation Tile" methods have corresponding
[UTFGrid](https://github.com/mapbox/utfgrid-spec) JSON
responses which return information needed to make interactive maps.
Authentication in the Node API is handled via JSON Web Tokens (JWT). To
obtain one, make an [OAuth-authenticated
request](http://www.inaturalist.org/pages/api+reference#auth) to
https://www.inaturalist.org/users/api_token. Each JWT will expire after 24
hours. Authentication required for all PUT and POST requests. Some GET
requests will also include private information like hidden coordinates if
the authenticated user has permission to view them.
Photos served from https://static.inaturalist.org and
https://inaturalist-open-data.s3.amazonaws.com have multiple size
variants and not all size variants are returned in responses. To access
other sizes, the photo URL can be modified to replace only the size
qualifier (each variant shares the exact same extension). The domain a photo
is hosted under reflects the license under which the photo is being shared,
and the domain may change over time if the license changes. Photos in
the `inaturalist-open-data` domain are shared under open licenses. These can
be accessed in bulk in the [iNaturalist AWS Open Dataset](
https://registry.opendata.aws/inaturalist-open-data/). Photos in the
`static.inaturalist.org` domain do not have open licenses.
The available photo sizes are:
* original (max 2048px in either dimension)
* large (max 1024px in either dimension)
* medium (max 500px in either dimension)
* small (max 240px in either dimension)
* thumb (max 100px in either dimension)
* square (75px square)
iNaturalist Website: https://www.inaturalist.org/
Open Source Software: https://github.com/inaturalist/
## Terms of Use
Use of this API is subject to the iNaturalist
[Terms of Service](https://www.inaturalist.org/terms) and
[Privacy Policy](https://www.inaturalist.org/privacy). We will block any
use of our API that violates our Terms or Privacy Policy without notice.
The API is intended to support application development, not data scraping.
For pre- generated data exports, see
https://www.inaturalist.org/pages/developers.
Please note that we throttle API usage to a max of 100 requests per minute,
though we ask that you try to keep it to 60 requests per minute or lower,
and to keep under 10,000 requests per day. If we notice usage that has
serious impact on our performance we may institute blocks without
notification.
Terms of Service: https://www.inaturalist.org/terms
Privacy Policy: https://www.inaturalist.org/privacy
version: "1.3.0"
schemes:
- http
- https
basePath: /v1
produces:
- application/json
tags:
- name: Annotations
description: Create, delete, and vote
- name: Comments
description: Create, update, and delete
- name: Controlled Terms
description: Search and fetch
- name: Flags
description: Create, update, and delete flags
- name: Identifications
description: Create, update, and delete
- name: Messages
description: Create, fetch, delete
- name: Observation Field Values
description: Create, update, and delete
- name: Observation Photos
description: Create and delete
- name: Observations
description: CRUD, search, faving, quality metrics, stats, and more
- name: Places
description: Search and fetch
- name: Posts
description: Fetch site and project posts
- name: Project Observations
description: Create, update, and delete
- name: Projects
description: Search and fetch projects and members
- name: Search
description: Site search
- name: Taxa
description: Search and fetch
- name: Users
description: Fetch and update
- name: Observation Tiles
description: Map observation search results
- name: Polygon Tiles
description: Place geometry and taxon range tiles
- name: UTFGrid
description: JSON for observation tiles
paths:
/annotations:
post:
summary: Annotation Create
description: |
Create an annotation
consumes:
- application/json
parameters:
- name: body
in: body
description: Annotation object
schema:
$ref: "#/definitions/PostAnnotation"
tags:
- Annotations
security:
- api_token: []
responses:
200:
description: OK
/annotations/{id}:
delete:
summary: Annotation Delete
description: |
Delete an annotation
parameters:
- $ref: "#/parameters/annotation_path_id"
tags:
- Annotations
security:
- api_token: []
responses:
200:
description: OK
/votes/vote/annotation/{id}:
post:
summary: Annotation Vote
description: |
Vote on an annotation
parameters:
- $ref: "#/parameters/annotation_path_id"
- name: body
in: body
description: Vote object
schema:
$ref: "#/definitions/PostVote"
tags:
- Annotations
security:
- api_token: []
responses:
200:
description: OK
/votes/unvote/annotation/{id}:
delete:
summary: Annotation Unvote
description: |
Remove a vote from annotation
parameters:
- $ref: "#/parameters/annotation_path_id"
tags:
- Annotations
security:
- api_token: []
responses:
200:
description: OK
/comments:
post:
summary: Comment Create
description: |
Create a comment
consumes:
- application/json
parameters:
- name: body
in: body
description: Comment object
schema:
$ref: "#/definitions/PostComment"
tags:
- Comments
security:
- api_token: []
responses:
200:
description: OK
/comments/{id}:
put:
summary: Comment Update
description: |
Update a comment
consumes:
- application/json
parameters:
- $ref: "#/parameters/path_id"
- name: body
in: body
description: Comment object
schema:
$ref: "#/definitions/PostComment"
tags:
- Comments
security:
- api_token: []
responses:
200:
description: OK
delete:
summary: Comment Delete
description: |
Delete a comment
parameters:
- $ref: "#/parameters/path_id"
tags:
- Comments
security:
- api_token: []
responses:
200:
description: OK
/controlled_terms:
get:
summary: Terms Index
description: |
List all attribute controlled terms
tags:
- Controlled Terms
responses:
200:
description: OK
/controlled_terms/for_taxon:
get:
summary: Terms for Taxon
description: |
Returns attribute controlled terms relevant to a taxon
parameters:
- name: taxon_id
type: integer
in: query
minimum: 1
description: Filter by this taxon
required: true
tags:
- Controlled Terms
responses:
200:
description: OK
/flags:
post:
summary: Flag Create
description: |
Create a flag. To create a custom flag beyond the standard `spam` and
`inappropriate` flags, set `flag` to `other` and include a `flag_explanation`
consumes:
- application/json
parameters:
- name: body
in: body
description: Flag object
schema:
$ref: "#/definitions/PostFlag"
tags:
- Flags
security:
- api_token: []
responses:
200:
description: OK
/flags/{id}:
put:
summary: Flag Update
description: |
Update a flag. Generally only used to resolve the flag.
parameters:
- $ref: "#/parameters/path_id"
- name: body
in: body
schema:
$ref: "#/definitions/PutFlag"
tags:
- Flags
security:
- api_token: []
responses:
200:
description: OK
delete:
summary: Flag Delete
description: |
Delete a flag
parameters:
- $ref: "#/parameters/path_id"
tags:
- Flags
security:
- api_token: []
responses:
200:
description: OK
/identifications/{id}:
get:
summary: Identification Details
description: |
Given an ID, or an array of IDs in comma-delimited format, returns
corresponding identifications. A maximum of 30 results will be returned
consumes:
- application/json
parameters:
- $ref: "#/parameters/path_multi_id"
tags:
- Identifications
responses:
200:
description: OK
put:
summary: Identification Update
description: |
Update an identification. Note that to "withdraw" an observation you
send a `PUT` request to this endpoint and set the `current`
attribute to false. To "restore" it you do the same but set
`current` to `true`. Only one identification by a given user can be
`current` for a given observation, so if you "restore" one all the other
identifications by the authenticated user for the given observation will
be withdrawn.
consumes:
- application/json
parameters:
- $ref: "#/parameters/path_id"
- name: body
in: body
description: Identification object
schema:
$ref: "#/definitions/PostIdentification"
tags:
- Identifications
security:
- api_token: []
responses:
200:
description: OK
delete:
summary: Identification Delete
description: |
Delete an identification. See description of `PUT /identifications/{id}
for notes on withdrawing and restoring identifications.
parameters:
- $ref: "#/parameters/path_id"
tags:
- Identifications
security:
- api_token: []
responses:
200:
description: OK
/identifications:
post:
summary: Identification Create
description: Create an identification
consumes:
- application/json
parameters:
- name: body
in: body
description: Identification object
schema:
$ref: "#/definitions/PostIdentification"
tags:
- Identifications
security:
- api_token: []
responses:
200:
description: OK
get:
summary: Identification Search
description: |
Given zero to many of following parameters, returns identifications
matching the search criteria
parameters:
<%- include( "_identification_search_params_v1.yml.ejs", { type: "index" } ) %>
tags:
- Identifications
responses:
200:
description: OK
/identifications/categories:
get:
summary: Identification Categories
description: |
Given zero to many of following parameters, return counts of the
categories of identifications matching the search criteria
parameters:
<%- include( "_identification_search_params_v1.yml.ejs", { type: "index" } ) %>
tags:
- Identifications
responses:
200:
description: OK
/identifications/species_counts:
get:
summary: Identification Species Counts
description: |
Given zero to many of following parameters, returns `leaf taxa`
associated with identifications matching the search criteria and the
count of identifications they are associated with, ordered by count
descending. `Leaf taxa` are the leaves of the taxonomic tree containing
only the taxa associated with observations matching the search criteria.
parameters:
<%- include( "_identification_search_params_v1.yml.ejs", { type: "index" } ) %>
- name: taxon_of
type: string
in: query
description: Source of the taxon for counting
enum:
- identification
- observation
default: identification
- name: order
type: string
in: query
description: Sort order
default: desc
enum:
- desc
- asc
tags:
- Identifications
responses:
200:
description: |
Returns an object with metadata and an array of taxa
schema:
$ref: "#/definitions/SpeciesCountsResponse"
default:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
/identifications/identifiers:
get:
summary: Identification Identifiers
description: |
Given zero to many of following parameters, returns creators of
identifications matching the search criteria and the count of
matching identifications, ordered by count descending. A
maximum of 500 results will be returned
parameters:
<%- include( "_identification_search_params_v1.yml.ejs", { type: "index" } ) %>
tags:
- Identifications
responses:
200:
description: |
Returns an object with metadata and an array of identifiers
schema:
$ref: "#/definitions/UserCountsResponse"
default:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
/identifications/observers:
get:
summary: Identification Observers
description: |
Given zero to many of following parameters, returns creators of
observations of identifications matching the search criteria and
the count of matching observations, ordered by count descending
parameters:
<%- include( "_identification_search_params_v1.yml.ejs", { type: "index" } ) %>
tags:
- Identifications
responses:
200:
description: |
Returns an object with metadata and an array of observers
schema:
$ref: "#/definitions/UserCountsResponse"
default:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
/identifications/recent_taxa:
get:
summary: Identification Recent Taxa
description: |
Returns an array of objects each containing an identification and a
taxon. Returns IDs representing the earliest occurrence of taxa
associated with identifications in the filtered set of results
parameters:
<%- include( "_identification_search_params_v1.yml.ejs", { type: "index" } ) %>
tags:
- Identifications
responses:
200:
description: OK
/identifications/similar_species:
get:
summary: Identification Similar Species
description: |
Returns species attached to IDs of observations of this taxon, or
attached to observations identified as this species, ordered by combined
frequency descending. This will only return species in the same iconic
taxon, and will never return descendants of the chosen taxon
parameters:
<%- include( "_observation_search_params_v1.yml.ejs", { type: "similar" } ) %>
- name: taxon_id
type: integer
in: query
minimum: 1
description: Only show observations of these taxa and their descendants
required: true
tags:
- Identifications
responses:
200:
description: OK
/messages:
get:
summary: Retrieve messages for the authenticated user. This does not mark them as read.
description:
Show the user's inbox or sent box
parameters:
- $ref: "#/parameters/page"
- name: box
in: query
type: string
description: Whether to view messages the user has received (default) or messages the user has sent
default: inbox
enum: [inbox, sent, any]
- name: q
in: query
type: string
description: Search query for subject and body
- name: user_id
in: query
type: string
description: User ID or username of correspondent to filter by
- name: threads
in: query
type: boolean
default: false
description: |
Groups results by `thread_id`, only shows the latest message per
thread, and includes a `thread_messages_count` attribute showing the
total number of messages in that thread. Note that this will not
work with the `q` param, and it probably should only be used with
`box=any` because the `thread_messages_count` will be inaccurate when
you restrict it to `inbox` or `sent`.
tags:
- Messages
security:
- api_token: []
responses:
200:
description: OK
default:
description: |
Returns an object with metadata and an array of messages
schema:
$ref: "#/definitions/MessagesResponse"
post:
summary: Create a new message
description: Create and deliver a new message to another user
tags:
- Messages
security:
- api_token: []
parameters:
- name: body
in: body
schema:
$ref: "#/definitions/PostMessage"
responses:
200:
description: |
Returns the message just created
schema:
$ref: "#/definitions/Message"
default:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
/messages/{id}:
get:
summary: Retrieve messages in a thread
description: |
Retrieves all messages in the thread the specified message belongs to
and marks them all as read.
tags:
- Messages
security:
- api_token: []
parameters:
- $ref: "#/parameters/path_id"
responses:
200:
description: |
Returns an object with metadata and an array of messages
schema:
properties:
reply_to_user:
description: User to reply to
$ref: "#/definitions/User"
thread_id:
description: Identifier for this thread
type: integer
flaggable_message_id:
description: |
Identifier for the message that should be flagged if the user
chooses to flag this thread
type: integer
results:
type: array
items:
$ref: "#/definitions/Message"
default:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
delete:
summary: Delete a message / thread
description: |
This will all of the authenticated user's copies of the messages in tha
thread to which the specified message belongs.
tags:
- Messages
security:
- api_token: []
parameters:
- $ref: "#/parameters/path_id"
responses:
200:
description: |
No return data, 200 just means deletion was successful
404:
description: |
Specified message doesn't exist
default:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
/messages/unread:
get:
summary: Gets a count of messages the authenticated user has not read
summary: Simple response to get the unread messages count
tags:
- Messages
security:
- api_token: []
responses:
200:
description: Number of unread messages
schema:
properties:
count:
type: integer
description: Number of unread messages
default:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
/observations/{id}:
get:
summary: Observation Details
description: |
Given an ID, or an array of IDs in comma-delimited format, returns
corresponding observations. A maximum of 200 results will be returned
parameters:
- $ref: "#/parameters/path_multi_id"
tags:
- Observations
responses:
200:
description: |
Returns an object with metadata and an array of observations
schema:
$ref: "#/definitions/ObservationsShowResponse"
default:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
put:
summary: Observation Update
description: |
Update an observation
consumes:
- application/json
parameters:
- $ref: "#/parameters/path_id"
- name: body
in: body
description: Comment object
schema:
$ref: "#/definitions/PostObservation"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
delete:
summary: Observation Delete
description: |
Delete an observation
parameters:
- $ref: "#/parameters/path_id"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations/{id}/fave:
post:
summary: Observations Fave
description: |
Fave an observation
parameters:
- $ref: "#/parameters/path_id"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations/{id}/unfave:
delete:
summary: Observations Unfave
description: |
Unfave an observation
parameters:
- $ref: "#/parameters/path_id"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations/{id}/review:
post:
summary: Observations Review
description: |
Review an observation
parameters:
- $ref: "#/parameters/path_id"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations/{id}/unreview:
post:
summary: Observations Unreview
description: |
Unreview an observation
parameters:
- $ref: "#/parameters/path_id"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations/{id}/subscriptions:
get:
summary: Observation Subscriptions
description: |
Fetches any subscriptions the current user has to this observation
or the observer
parameters:
- $ref: "#/parameters/path_id"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations/{id}/quality/{metric}:
post:
summary: Quality Metric Set
description: |
Set the value of a quality metric
parameters:
- $ref: "#/parameters/path_id"
- $ref: "#/parameters/path_metric"
- name: body
in: body
description: Quality object
schema:
$ref: "#/definitions/PostQuality"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
delete:
summary: Quality Metric Delete
description: |
Delete a quality metric
consumes:
- application/x-www-form-urlencoded
parameters:
- $ref: "#/parameters/path_id"
- $ref: "#/parameters/path_metric"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations/{id}/taxon_summary:
get:
summary: Observation Taxon Summary
description: |
Fetches information about this observation's taxon, within the context
of this observation's location
parameters:
- $ref: "#/parameters/path_id"
tags:
- Observations
responses:
200:
description: OK
/subscriptions/observation/{id}/subscribe:
post:
summary: Observation Subscribe
description: |
Toggles current user's subscription to this observation. If the logged-in
user is not subscribed, POSTing here will subscribe them. If they are already
subscribed, this will remove the subscription
parameters:
- $ref: "#/parameters/path_id"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/votes/vote/observation/{id}:
post:
summary: Observation Vote
description: |
Vote on an observation. A vote with an empty `scope` is recorded as a
`fave` of the observation. A vote with scope `needs_id` is recorded as a
vote on the Quality Grade criterion "can the Community ID still be
confirmed or improved?", and can be an up or down vote
parameters:
- $ref: "#/parameters/path_id"
- name: body
in: body
description: Vote object
schema:
$ref: "#/definitions/PostObservationVote"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/votes/unvote/observation/{id}:
delete:
summary: Observation Unvote
description: Remove a vote from an observation
parameters:
- $ref: "#/parameters/path_id"
- name: body
in: body
description: Vote object
schema:
$ref: "#/definitions/PostObservationVote"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations:
get:
summary: Observation Search
description: |
Given zero to many of following parameters, returns observations
matching the search criteria. The large size of the observations index
prevents us from supporting the `page` parameter when retrieving records
from large result sets. If you need to retrieve large numbers of
records, use the `per_page` and `id_above` or `id_below` parameters
instead.
parameters:
<%- include( "_observation_search_params_v1.yml.ejs", { type: "index" } ) %>
tags:
- Observations
responses:
200:
description: |
Returns an object with metadata and an array of observations
schema:
$ref: "#/definitions/ObservationsResponse"
default:
description: Unexpected error
schema:
$ref: "#/definitions/Error"
post:
summary: Observation Create
description: |
Create an observation
consumes:
- application/json
parameters:
- name: body
in: body
description: Comment object
schema:
$ref: "#/definitions/PostObservation"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations/deleted:
get:
summary: Observations Deleted
description: |
Given a starting date, return an array of IDs of the authenticated
user's observations that have been deleted since that date. Requires
authentication
parameters:
- $ref: "#/parameters/since"
tags:
- Observations
security:
- api_token: []
responses:
200:
description: OK
/observations/histogram:
get:
summary: Observation Histogram
description: |
Given zero to many of following parameters, returns histogram data about
observations matching the search criteria
parameters:
<%- include( "_observation_search_params_v1.yml.ejs", { type: "search" } ) %>
- $ref: "#/parameters/date_field"
- $ref: "#/parameters/interval"
tags:
- Observations
responses:
200:
description: |
Returns an object with metadata and an array of histogram data
default:
description: Unexpected error
schema: