-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswagger.v3.yaml
1921 lines (1916 loc) · 66.4 KB
/
swagger.v3.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
swagger: '2.0'
################################################################################
# API Information
################################################################################
info:
title: GRiD API v3
description: |
This is the API v3 specification for the Geospatial Repository and
Data Management System (aka GRiD). Here you can see API examples and
interact with all of the API endpoints visually in your browser. If you would
like to see the API in action, use the
"Try it out!" button for an endpoint. Note: you will be interacting with
live data.
Authentication using OAuth 2.0 - Authorization Code.
version: "3.0.2"
contact:
url: https://github.com/CRREL/GRiD-API/
################################################################################
# Other root-level fixed fields
################################################################################
host: {{ domain }}
schemes:
- {{ protocol }}
securityDefinitions:
OauthSecurity:
type: oauth2
authorizationUrl: {{ URL_ROOT }}api/authorize
tokenUrl: {{ URL_ROOT }}api/token
flow: accessCode
scopes:
api: grant api access
security:
- OauthSecurity:
- api
basePath: {{ URL_ROOT }}api/v3
consumes:
- application/json
- application/x-www-form-urlencoded
produces:
- application/json
tags:
- name: AOI
description: AOI resources
- name: Export
description: Export resources
- name: Product
description: Product resources
- name: Geoname
description: Lookup geoname
- name: Task
description: Task resources
- name: Hook
description: Hook resources
- name: Holding
description: Data Holding resources
- name: STAC
description: STAC API access
################################################################################
# Paths
################################################################################
paths:
/aois:
get:
tags:
- AOI
summary: Get all AOIs
description: |
Get a list of the AOIs created by or shared with your user.
parameters:
- name: geom
in: query
description: A WKT or GeoJSON geometry used to filter AOI results.
required: false
type: string
- name: intersections
in: query
description: |
Determines whether or not to include a list of products that intersect with the AOI geometry. This can
be time-consuming so setting this to False is recommended if product intersections aren't needed.
Default value is False.
required: false
default: false
type: boolean
- name: intersection_types
in: query
description: |
A comma-separated list of product types to include in the product intersection check.
Valid intersection type parameters: pointcloud, raster, vector, mesh.
All types are included by default.
required: false
type: string
- name: intersection_geoms
in: query
description: |
Determines whether or not to include the entire geometry of each product that intersects with the AOI geometry.
Product geometries can be complex, so setting this to False can greatly reduce the return size and
is recommended if the entire geometry is not needed.
Default value is False.
required: false
default: false
type: boolean
- name: export_full
in: query
description: |
Determines whether or not to include a list of export files that
belong to exports for the AOI.
Default value is False.
required: false
default: false
type: boolean
- name: sort
in: query
description: |
Sort the result by a given field. A "-" can be prepended to the field to indicate descending order.
Valid AOI sorting parameters: area, created_at, name, pk, user.
default: pk
required: false
type: string
responses:
200:
description: All of a users AOIs.
schema:
$ref: '#/definitions/AOIResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
post:
tags:
- AOI
summary: Create an AOI
consumes:
- application/json
description: |
Create a new AOI for the given geometry.
parameters:
- name: name
in: formData
description: The name for the AOI.
required: true
type: string
- name: geom
in: formData
description: A WKT or GeoJSON geometry describing the AOI. For WKT, supports POLYGON and MULTIPOLYGON natively, POINT and LINESTRING with a buffer parameter.
required: true
type: string
- name: buffer
in: formData
description: A buffer radius in meters for POINT or LINESTRING geom WKTs.
required: false
type: float
- name: notes
in: formData
description: The notes for the AOI.
required: false
type: string
- name: subscribe
in: formData
description: |
Whether or not to subscribe to the AOI. Accepted values: True, False, T, F, 1, or 0.
default: false
required: false
type: boolean
- name: intersections
in: formData
description: |
Determines whether or not to include a list of products that intersect with the AOI geometry. This can
be time-consuming so setting this to False is recommended if product intersections aren't needed.
Default value is True.
required: false
default: true
type: boolean
- name: intersection_types
in: formData
description: |
A comma-separated list of product types to include in the product intersection check.
Valid intersection type parameters: pointcloud, raster, vector, mesh.
All types are included by default.
required: false
type: string
- name: intersection_geoms
in: formData
description: |
Determines whether or not to include the entire geometry of each product that intersects with the AOI geometry.
Product geometries can be complex, so setting this to False can greatly reduce the return size and
is recommended if the entire geometry is not needed.
Default value is True.
required: false
default: true
type: boolean
responses:
200:
description: The new AOI.
schema:
$ref: '#/definitions/AOIResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
/aois/{pk}:
get:
tags:
- AOI
summary: Get AOI by PK
description: |
Get information for one or more AOIs.
parameters:
- name: pk
in: path
description: A comma-separated list of AOI primary keys.
required: true
type: integer
- name: intersections
in: query
description: |
Determines whether or not to include a list of products that intersect with the AOI geometry. This can
be time-consuming so setting this to False is recommended if product intersections aren't needed.
Default value is True.
required: false
default: true
type: boolean
- name: intersection_types
in: query
description: |
A comma-separated list of product types to include in the product intersection check.
Valid intersection type parameters: pointcloud, raster, vector, mesh.
All types are included by default.
required: false
type: string
- name: intersection_geoms
in: query
description: |
Determines whether or not to include the entire geometry of each product that intersects with the AOI geometry.
Product geometries can be complex, so setting this to False can greatly reduce the return size and
is recommended if the entire geometry is not needed.
Default value is True.
required: false
default: true
type: boolean
- name: export_full
in: query
description: |
Determines whether or not to include a list of export files that
belong to exports for the AOI.
Default value is True.
required: false
default: true
type: boolean
- name: sort
in: query
description: |
Sort the result by a given field. A "-" can be prepended to the field to indicate descending order.
Valid AOI sorting parameters: area, created_at, name, pk, user.
default: pk
required: false
type: string
responses:
200:
description: An array of AOIs.
schema:
$ref: '#/definitions/AOIResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
404:
$ref: '#/responses/DoesNotExistResponse'
patch:
tags:
- AOI
summary: Edit AOI by PK
description: |
Update an AOIs name, notes, or geometry. In order to change an AOI's
geometry, it must contain 0 generated exports. While we can `GET` or `DELETE` multiple primary keys, the `PATCH` may only be applied to a single primary key.
parameters:
- name: pk
in: path
description: The primary key of an existing AOI.
required: true
type: integer
- name: name
in: formData
description: The name for the AOI.
required: false
type: string
- name: geom
in: formData
description: A WKT or GeoJSON geometry describing the AOI.
required: false
type: string
- name: notes
in: formData
description: The notes for the AOI.
required: false
type: string
- name: subscribe
in: formData
description: Whether or not to subscribe to the AOI.
required: false
type: boolean
responses:
200:
description: The updated AOI.
schema:
$ref: '#/definitions/AOIResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
404:
$ref: '#/responses/DoesNotExistResponse'
delete:
tags:
- AOI
summary: Delete AOI by PK
description: Delete one or more existing AOIs.
parameters:
- name: pk
in: path
description: A comma-separated list of AOI primary keys.
required: true
type: integer
responses:
200:
description: Successful AOI deletion responds with an empty body.
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
404:
$ref: '#/responses/DoesNotExistResponse'
/exports:
post:
tags:
- Export
summary: Generate export
consumes:
- application/json
description: |
Exports is new in API v3. It replaces the former `/aoi/{pk}/generate/pointcloud` endpoint. A user would typically begin by querying `/products` for available products that are coincident with the provided geometry `geom`.
parameters:
- name: aoi
in: formData
description: The primary key of the AOI used to export from.
required: true
type: integer
- name: products
in: formData
description: |
A comma-separated list of product primary keys to include in the export.
required: true
type: string
- name: name
in: formData
description: An optional name for the export.
required: false
type: string
- name: hsrs
in: formData
description: Horizontal Spatial Reference System. Accepts an EPSG code. Defaults to the source data HSRS.
required: false
type: integer
- name: vsrs
in: formData
description: Vertical Spatial Reference System. Pointcloud and Raster export option. Accepts an EPSG code. Valid supported values are 4326, 5773, and 3855. Defaults to source data VSRS if present.
required: false
type: integer
- name: file_export_options
in: formData
description: |
Pointcloud and Raster export option. Determine file merging strategy. Both export types accept individual and collect.
Default is individual.
required: false
type: string
- name: compressed
in: formData
description: |
Pointcloud and Raster export option. Whether or not to export compressed data. Defaults to True.
required: false
type: boolean
- name: send_email
in: formData
description: |
Whether or not to notify user via email upon completion. Defaults to False.
required: false
type: boolean
- name: file_export_format
in: formData
description: |
Pointcloud export option. Determine the format of the output file(s). Valid values are las12,
las14, nitf, pdf, bpf3, and source. Defaults to las12.
required: false
type: string
- name: clipping
in: formData
description: |
Pointcloud export option. Whether or not to clip selected products to the boundary of the AOI.
If false, tiles that intersect the AOI are included in their entirety. Defaults to true.
required: false
type: boolean
- name: generate_dem
in: formData
description: |
Pointcloud export option. Whether or not to generate a DEM from the pointcloud. Defaults to False.
required: false
type: boolean
- name: custom_filters
in: formData
description: |
Pointcloud export option. Custom PDAL filters to use for pointcloud generation. A single filter block should be
in json object format, multiple filters should be passed as an array of json objects. Any reader or writer blocks
included will be ignored. See pdal.io/stages/filters.html for filter details. Defaults to None.
required: false
type: string
format: json
- name: cell_spacing
in: formData
description: |
Pointcloud export option used together with generate_dem. Ignored for
raster types. Defaults to 1.0.
required: false
type: number
format: float
- name: smrf_terrain
in: formData
description: |
Pointcloud export option. Used to trigger a SMRF Bare Earth export. Accepts default, urban or suburban,
mountainous, and foliated. Default is None. Cannot be used with
pmf_terrain option.
required: false
type: string
- name: be_extract
in: formData
description: |
Pointcloud export option. Whether or not to extract ground returns. Defaults to False.
required: false
type: boolean
- name: pmf_terrain
in: formData
description: |
Pointcloud export option. Used to trigger a PMF Bare Earth export. Accepts urban, suburban,
mountainous, and foliated. Default is none. Cannot be used with
smrf_terrain option.
type: string
- name: sri_hres
in: formData
description: |
Deprecated Pointcloud export option. Used to trigger a Sarnoff Bare Earth export. Accepts the horizontal
resolution. Default is none. Cannot be used with smrf_terrain or pmf_terrain options.
required: false
type: number
format: float
- name: decimation_radius
in: formData
description: |
Pointcloud export option. The minimum distance between points. If a neighboring point is
found within this radius, it will be discarded. Units in meters. Uses PDAL
decimation filter. Default is none.
required: false
type: number
format: float
- name: capacity
in: formData
description: |
Pointcloud export option. How many points to fit into each tile. The number of points in each
tile will not exceed this value, and will sometimes be less than
it. Uses PDAL chipper filter. Cannot be used with length
option. Default is none.
required: false
type: integer
- name: length
in: formData
description: |
Pointcloud export option. The target length of generated tiles. Units in meters. Uses PDAL splitter filter. Cannot be used with capacity
option. Default is none.
required: false
type: number
format: float
- name: file_format_options
in: formData
description: |
Raster export option. Determine the format of the output file(s). Valid values are GTiff, NITF, and source. Defaults to GTiff.
required: false
type: string
- name: target_resolution
in: formData
description: |
Raster export option. Determine the raster cell size (in meters). Defaults to None which uses the source resolution size.
required: false
type: number
format: float
- name: vector_format
in: formData
description: |
Vector export option. Accepts officially supported vector formats. Valid values are ESRI Shapefile, GML, GPKG, KMZ, GeoJSON, and SQLite.
Defaults to ESRI Shapefile.
required: false
type: string
# - name: afe_selection
# in: formData
# required: false
# description: |
# Automated Feature Extraction selection. Accepts a number of different algorithm names, some with the option to include Tree output. Algorithm name
# ends in semicolon (;) which is the separator for whether Tree / Vegetaion output is requested.
# type: string
# enum: [texpert_1.2.12;, ara_mrf;, ara_mrf;trees, ara;, ara;trees, psu;, texpert_3.0.14;, texpert_3.0.14;trees]
- name: derived_rasters
in: formData
required: false
description: |
Raster Export Option - Elevation only. Generate Derived Rasters, eg alternative representations of the Elevation data. Accepts a number of different derived outputs
type: string
enum: [hillshade, shaded_relief_terrain, shaded_relief_rgb, shaded_slope, slope, aspect]
- name: derived_pc_rasters
in: formData
required: false
description: |
Pointcloud Export Option - Elevation only. Generate Pointcloud Derived Rasters, eg alternative representations of the Pointcloud data. Accepts a number of different derived outputs
type: string
enum: [dtm_hillshade, dsm_hillshade, rii, shaded_relief_dtm, shaded_relief_dsm, slope, slope_shade, slope_dtm, slope_shade_dtm, aspect, aspect_dtm, orthophoto]
responses:
200:
description: Started export object.
schema:
$ref: '#/definitions/ExportStartedResponse'
400:
$ref: '#/responses/ErrorResponse'
/exports/{pk}:
get:
tags:
- Export
summary: Get export by PK
description: Get information for one or more exports.
parameters:
- name: pk
in: path
description: A comma-separated list of export primary keys.
required: true
type: integer
- name: sort
in: query
description: |
Sort the result by a given field. A "-" can be prepended to the field to indicate descending order.
Valid Export sorting parameters: name, pk, started_at, user.
default: pk
required: false
type: string
- name: file_geoms
in: query
description: |
Determines whether or not to include the geometry of each export file generated by this Export.
Geometries can be verbose, so keeping this set to False can greatly reduce the return size and
is recommended if the geometries are not needed.
Default value is False.
default: false
required: false
type: boolean
responses:
200:
description: Export objects.
schema:
$ref: '#/definitions/ExportResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
404:
$ref: '#/responses/DoesNotExistResponse'
403:
$ref: '#/responses/ForbiddenResponse'
patch:
tags:
- Export
summary: Edit export by PK
description: Updates an exports name or notes. While we can `GET` or `DELETE` multiple primary keys, the `PATCH` may only be applied to a single primary key.
parameters:
- name: pk
in: path
description: The primary key of the export.
required: true
type: integer
- name: name
in: formData
description: The name for the export.
required: false
type: string
- name: notes
in: formData
description: The notes for the export.
required: false
type: string
responses:
200:
description: Export object.
schema:
$ref: '#/definitions/ExportResponse'
400:
$ref: '#/responses/ErrorResponse'
403:
$ref: '#/responses/ForbiddenResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
404:
$ref: '#/responses/DoesNotExistResponse'
delete:
tags:
- Export
summary: Delete export by PK
description: Delete one or more existing exports.
parameters:
- name: pk
in: path
description: A comma-separated list of export primary keys.
required: true
type: integer
responses:
200:
description: Successful export deletion responds with an empty body.
400:
$ref: '#/responses/ErrorResponse'
403:
$ref: '#/responses/ForbiddenResponse'
/exports/filters:
get:
tags:
- Export
summary: Get PDAL filters available for use in exports.
description: Get PDAL filters available for use in exports.
responses:
200:
description: Filters list.
schema:
$ref: '#/definitions/FiltersResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
404:
$ref: '#/responses/DoesNotExistResponse'
403:
$ref: '#/responses/ForbiddenResponse'
/holdings:
get:
tags:
- Holding
summary: Get data holdings
description: |
Provides a high level overview of GRiD's data holdings.
parameters:
- name: geom
in: query
description: A WKT or GeoJSON geometry used to filter Holdings results.
required: false
type: string
- name: geoms
in: query
description: |
Determines whether or not to include the full coverage geometry WKT with the return.
Product geometries can be complex, so setting this to False can greatly reduce the return size and
is recommended if the geometry is not needed.
required: false
type: boolean
default: true
- name: program
in: query
description: |
A comma-separated list of program names used to filter the results.
required: false
type: string
- name: access_tag
in: query
description: |
A comma-separated list of access permision names used to filter the results.
required: false
type: string
- name: datatype
in: query
description: |
A comma-separated list of datatypes used to filter the results.
required: false
type: string
responses:
200:
description: Holdings objects.
schema:
$ref: '#/definitions/DataHoldingResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
/products:
get:
tags:
- Product
summary: Get products by geom
description: |
API users will query the `products` endpoint to discover available products that are coincident with the given geometry `geom`.
Results can be filtered by sensor or type.
parameters:
- name: geom
in: query
description: A WKT or GeoJSON geometry used to discover the Product results that intersect the given geometry.
required: true
type: string
- name: geoms
in: query
description: |
Determines whether or not to include full product geometries with the return.
Product geometries can be complex, so setting this to False can greatly reduce the return size and
is recommended if the entire geometry is not needed.
required: false
default: false
type: boolean
- name: sensor
in: query
description: A comma-separated list of sensor names used to filter the results.
required: false
type: string
- name: datatype
in: query
description: |
A comma-separated list of datatypes used to filter the results.
required: false
type: string
- name: program
in: query
description: |
A comma-separated list of program names used to filter the results.
required: false
type: string
- name: access_tag
in: query
description: |
A comma-separated list of access permission names used to filter the results.
required: false
type: string
- name: type
in: query
description: |
A comma-separated list of product types to include in the product intersection check.
Valid intersection type parameters: pointcloud, raster, vector, mesh.
All types are included by default.
required: false
type: string
- name: error_model
in: query
description: |
A comma-separated list of error model names to include in the product intersection check, such as GPM.
If left blank, products with any error model or no error model will be included.
required: false
type: string
- name: files
in: query
description: |
Whether to include the file list or not. Default value is False
required: false
default: false
type: boolean
- name: sort
in: query
description: |
Sort the result by a given field. A "-" can be prepended to the field to indicate descending order.
Valid Product sorting parameters: collected_at, name, pk.
default: pk
required: false
type: string
responses:
200:
description: Product objects.
schema:
$ref: '#/definitions/ProductResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
/products/{pk}:
get:
tags:
- Product
summary: Get product by PK
description: Get information for one or more products.
parameters:
- name: pk
in: path
description: A comma-separated list of product primary keys.
required: true
type: integer
- name: geoms
in: query
description: |
Determines whether or not to include the full product geometry with the return.
Product geometries can be complex, so setting this to False can greatly reduce the return size and
is recommended if the entire geometry is not needed.
Default value is True.
required: false
default: true
type: boolean
- name: files
in: query
description: |
Whether to include the file list or not. Default value is False
required: false
default: false
type: boolean
- name: sort
in: query
description: |
Sort the result by a given field. A "-" can be prepended to the field to indicate descending order.
Valid Product sorting parameters: collected_at, name, pk.
default: pk
required: false
type: string
responses:
200:
description: A product (pointcloud, raster, vector, or mesh) object.
schema:
$ref: '#/definitions/ProductResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
404:
$ref: '#/responses/DoesNotExistResponse'
/geonames:
get:
tags:
- Geoname
summary: Lookup geoname by geom
description: |
Get suggested AOI name based on geographic coordinates of the geometry.
parameters:
- name: geom
in: query
description: A WKT or GeoJSON geometry describing the AOI.
required: true
type: string
responses:
200:
description: Geoname object.
schema:
$ref: '#/definitions/GeonameResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
/tasks:
get:
tags:
- Task
summary: Get all tasks
description: Get all of your tasks. Results can be filtered by state or name.
parameters:
- name: state
in: query
description: The state of the task (SUCCESS, RUNNING, QUEUED, CANCELED, or FAILURE). Accepts a comma-separated list.
required: false
type: string
- name: name
in: query
description: The name of the task (export.tasks.generate_export, api.tasks.deliver_hook). Accepts a comma-separated list.
required: false
type: string
- name: sort
in: query
description: |
Sort the result by a given field. A "-" can be prepended to the field to indicate descending order.
Valid Task sorting parameters: name, state, task_id, time_stamp.
default: task_id
required: false
type: string
responses:
200:
description: Task objects.
schema:
$ref: '#/definitions/TaskResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
/tasks/{task_id}:
get:
tags:
- Task
summary: Get task by task_id
description: Get information for one or more tasks.
parameters:
- name: task_id
in: path
description: A comma-separated list of task IDs.
required: true
type: string
- name: sort
in: query
description: |
Sort the result by a given field. A "-" can be prepended to the field to indicate descending order.
Valid Task sorting parameters: name, state, task_id, time_stamp.
default: task_id
required: false
type: string
responses:
200:
description: Task object.
schema:
$ref: '#/definitions/TaskResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
404:
$ref: '#/responses/DoesNotExistResponse'
/hooks:
get:
tags:
- Hook
summary: Get all hooks
description: Get all of your hooks.
parameters:
- name: sort
in: query
description: |
Sort the result by a given field. A "-" can be prepended to the field to indicate descending order.
Valid Hook sorting parameters: created_at, event, pk, target.
default: pk
required: false
type: string
responses:
200:
description: Hook objects.
schema:
$ref: '#/definitions/HookResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
post:
tags:
- Hook
summary: Create hook
consumes:
- application/json
description: |
Create a new hook. Hooks are new to v3 of the API and allow for users to subscribe to particular GRiD events and be notified when they occur.
Currently supported events are: newdata.loaded and export.complete. The newdata.loaded event is triggered any time new pointcloud, raster, vector, or mesh data
is ingested into GRiD and intersects one of your existing AOIs. The export.complete event is triggered any time one of your exports finishes, SUCCESS or FAILURE.
The scope of these notifications can be controlled by including an optional AOI parameter. Newdata and export notifications will be limited to the given AOI if supplied.
Hooks that fail to deliver will retry 5 times. Delivered hooks that receive a 410 or 500+ return response will be automatically deleted.
parameters:
- name: event
in: formData
description: The event being subscribed to (export.complete, newdata.loaded)
required: true
type: string
- name: target
in: formData
description: The destination URL for payloads to be delivered to.
required: true
type: string
- name: aoi
in: formData
description: The pk of an AOI. Used to limit the scope of event notifications.
required: false
type: integer
responses:
200:
description: A hook object.
schema:
$ref: '#/definitions/HookResponse'
400:
$ref: '#/responses/ErrorResponse'
401:
$ref: '#/responses/UnauthenticatedResponse'
/hooks/{pk}:
get:
tags:
- Hook
summary: Get hook by PK
description: Get information for one or more hooks.
parameters:
- name: pk
in: path
description: A comma-separated list of hook primary keys.
required: true
type: integer
- name: sort
in: query
description: |
Sort the result by a given field. A "-" can be prepended to the field to indicate descending order.
Valid Hook sorting parameters: created_at, event, pk, target.
default: pk
required: false
type: string
responses:
200:
description: A hook object.
schema:
$ref: '#/definitions/HookResponse'