diff --git a/composed_api.rst b/composed_api.rst index a6b38c6..5004ecd 100644 --- a/composed_api.rst +++ b/composed_api.rst @@ -135,34 +135,115 @@ Example .. code:: bash - curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/export/?source=grid&geom=POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) + curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/?source=grid&geom=POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) .. code:: json { - "self_aoi_list": [ - { - "name": "myFirstAOI", - "geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", - "notes": "", - "is_active": true, - "source": "api", - "num_exports": "3 exports", - "pk": 1959, - "created_at": "2015-07-07 23:30:29.088539" - }, { - "name": "mySecondAOI", - "geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", - "notes": "", - "is_active": true, - "source": "map", - "num_exports": "6 exports", - "pk": 1855, - "created_at": "2015-06-23 13:21:50.034012" + "123": { + "aoi": [ + { + "fields": { + "clip_geometry": "SRID=4326;POLYGON ((68.9150709532930961 33.5950250284996983, 68.8704389952918063 33.5955969812235011, 68.8724989318148033 33.5858732691386024, 68.9020246886466055 33.5853012519442018, 68.9068312072003977 33.5549789148388982, 68.9274305724316037 33.5589843621810999, 68.9274305724316037 33.5944530719840984, 68.9150709532930961 33.5950250284996983))", + "created_at": "2013-04-16T13:10:33.974", + "is_active": true, + "name": "First_Aoi", + "notes": "", + "source": "", + "user": 102 + }, + "model": "export.aoi", + "pk": 123 + } + ], + "export_set": [ + { + "datatype": "LAS 1.2", + "hsrs": 32642, + "name": "First_Aoi_WGS84-UTMzone42N_2015-Oct-15.zip", + "pk": 1335, + "stated_at": "2015-10-15 18:06:13.272161", + "status": "SUCCESS", + "url": "http://127.0.0.1:8000/export/download/1335/" + }, + { + "datatype": "DSM", + "hsrs": 32642, + "name": "First_Aoi_WGS84-UTMzone42N_2015-Oct-15.zip", + "pk": 1328, + "stated_at": "2015-10-15 17:59:05.937854", + "status": "SUCCESS", + "url": "http://127.0.0.1:8000/export/download/1328/" + }, + ], + "pointcloud_collects": [ + { + "datatype": "LAS 1.2", + "name": "20110323_00_0_UFO", + "pk": 168 + } + ], + "raster_collects": [ + { + "datatype": "DSM", + "name": "20080407_00_0_UFO", + "pk": 228 + } + ] + }, + "1304": { + "aoi": [ + { + "fields": { + "clip_geometry": "SRID=4326;POLYGON ((64.2115925480768936 36.8743567152622020, 59.2018269230769008 32.7632670467287994, 68.6940144230768936 32.9847159272803978, 64.2115925480768936 36.8743567152622020))", + "created_at": "2015-09-23T09:50:19.856", + "is_active": true, + "name": "Second_Aoi", + "notes": "", + "source": "", + "user": 102 + }, + "model": "export.aoi", + "pk": 1304 + } + ], + "export_set": [], + "pointcloud_collects": [ + { + "datatype": "LAS 1.2", + "name": "20110401_00_1_UFO", + "pk": 169 + }, + { + "datatype": "LAS 1.2", + "name": "20110404_00_0_UFO", + "pk": 186 + }, + { + "datatype": "LAS 1.2", + "name": "11111_Ring_Road60", + "pk": 55 + }, + ], + "raster_collects": [ + { + "datatype": "DTM", + "name": "20111001_00_0_UFO", + "pk": 254 + }, + { + "datatype": "DTM", + "name": "20110619_00_1_UFO", + "pk": 268 + }, + ] + }, + "GRiD API": { + "API Version": "v1" } - ] } + Get AOI Details ~~~~~~~~~~~~~~~ @@ -202,60 +283,63 @@ Example .. code:: bash - curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/1959?source=grid + curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/123?source=grid .. code:: json { - "export_set": [ - { - "status": "SUCCESS", - "stated_at": "2015-07-07 23:33:24.247148", - "name": "ExportNumberOne.zip", - "datatype": "LAS 1.2", - "hsrs": 32641, - "url": "http://gridte.rsgis.erdc.dren.mil/te_ba/export/download/3561/", - "pk": 3561 - }, { - "status": "SUCCESS", - "stated_at": "2015-07-07 23:31:32.584232", - "name": "ExportNumberTwo.zip", - "datatype": "DSM", - "hsrs": 32641, - "url": "http://gridte.rsgis.erdc.dren.mil/te_ba/export/download/3560/", - "pk": 3560 - } - ], - "aoi": [ - { - "fields": { - "name": "myFirstAOI", - "created_at": "2015-07-07T23:30:29.088", - "is_active": true, - "source": "api", - "user": 90, - "clip_geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", - "notes": "" - }, - "model": "export.aoi", - "pk": 1959 - } - ], - "collects": [ - { - "fields": { - "name": "CollectA" - }, - "model": "loaddata.collect", - "pk": 2298 - }, { - "fields": { - "name": "CollectB" - }, - "model": "loaddata.collect", - "pk": 3109 - } - ] + "GRiD API": { + "API Version": "v1" + }, + "aoi": [ + { + "fields": { + "clip_geometry": "SRID=4326;POLYGON ((68.9150709532930961 33.5950250284996983, 68.8704389952918063 33.5955969812235011, 68.8724989318148033 33.5858732691386024, 68.9020246886466055 33.5853012519442018, 68.9068312072003977 33.5549789148388982, 68.9274305724316037 33.5589843621810999, 68.9274305724316037 33.5944530719840984, 68.9150709532930961 33.5950250284996983))", + "created_at": "2013-04-16T13:10:33.974", + "is_active": true, + "name": "First_Aoi", + "notes": "", + "source": "", + "user": 102 + }, + "model": "export.aoi", + "pk": 123 + } + ], + "export_set": [ + { + "datatype": "LAS 1.2", + "hsrs": 32642, + "name": "First_Aoi-UTMzone42N_2015-Oct-15.zip", + "pk": 1335, + "stated_at": "2015-10-15 18:06:13.272161", + "status": "SUCCESS", + "url": "http://127.0.0.1:8000/export/download/1335/" + }, + { + "datatype": "DSM", + "hsrs": 32642, + "name": "First_Aoi_WGS84-UTMzone42N_2015-Oct-15.zip", + "pk": 1328, + "stated_at": "2015-10-15 17:59:05.937854", + "status": "SUCCESS", + "url": "http://127.0.0.1:8000/export/download/1328/" + }, + ], + "pointcloud_collects": [ + { + "datatype": "LAS 1.2", + "name": "20110323_00_0_UFO", + "pk": 168 + } + ], + "raster_collects": [ + { + "datatype": "DSM", + "name": "20080407_00_0_UFO", + "pk": 228 + } + ] } Add AOI @@ -302,15 +386,30 @@ Example .. code:: json { - "aoi": [ - { - "geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", - "pk": 2086, - "name": "uploadedAOI", - "subscribed": true - } - ], - "success": true + "1592": { + "aoi": [ + { + "fields": { + "clip_geometry": "SRID=4326;POLYGON ((30.0000000000000000 10.0000000000000000, 40.0000000000000000 40.0000000000000000, 20.0000000000000000 40.0000000000000000, 10.0000000000000000 20.0000000000000000, 30.0000000000000000 10.0000000000000000))", + "created_at": "2015-11-13T12:58:28.040", + "is_active": true, + "name": "test", + "notes": "", + "source": "api", + "user": 102 + }, + "model": "export.aoi", + "pk": 1592 + } + ], + "export_set": [], + "pointcloud_collects": [], + "raster_collects": [] + }, + "GRiD API": { + "API Version": "v1" + }, + "success": true } Get Export Details @@ -352,11 +451,14 @@ Example .. code:: bash - curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/export/3124?source=grid + curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/export/1335?source=grid .. code:: json { + "GRiD API": { + "API Version": "v1" + } "exportfiles": [ { "url": "http://gridte.rsgis.erdc.dren.mil/te_ba/export/download/file/30359/", @@ -425,8 +527,11 @@ Example .. code:: json { - "name": "Some Place", - "provided_geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))" + "GRiD API": { + "API Version": "v1" + }, + "name": "Great Sand Sea", + "provided_geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))" } Get Task Details @@ -473,6 +578,9 @@ Example .. code:: json { + "GRiD API": { + "API Version": "v1" + }, "task_traceback": "", "task_state": "SUCCESS", "task_tstamp": "2015-09-09T14:19:36.080", @@ -547,6 +655,9 @@ Example .. code:: json { + "GRiD API": { + "API Version": "v1" + }, "started" : true, "task_id" : "774b4666-5706-4237-8661-df0f96cd7b9c" } @@ -606,6 +717,9 @@ Example .. code:: json { + "GRiD API": { + "API Version": "v1" + }, "started" : true, "task_id" : "774b4666-5706-4237-8661-df0f96cd7b9c" } diff --git a/endpoints.md b/endpoints.md index c9463d2..62be310 100644 --- a/endpoints.md +++ b/endpoints.md @@ -1,4 +1,4 @@ -GRiD API +GRiD API v1 ======== API Endpoint Reference @@ -96,13 +96,14 @@ Get a list of the AOIs created by or shared with the current GRiD user. #### Endpoint ~~~~ {.bash} -GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/aoi +GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi ~~~~ #### Request Parameters Query parameter Value ----------------- -------------------------------------------------------- + source *Required*. Your GRiD generated API key. geom *Optional*. A WKT geometry used to filter AOI results. #### Response Format @@ -114,32 +115,112 @@ format. #### Example ~~~~ {.bash} -curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/aoi/?geom=POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) +curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/?geom=POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))&?source=grid ~~~~ ~~~~ {.json} { - "self_aoi_list": [ - { - "name": "myFirstAOI", - "geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", - "notes": "", - "is_active": true, - "source": "api", - "num_exports": "3 exports", - "pk": 1959, - "created_at": "2015-07-07 23:30:29.088539" - }, { - "name": "mySecondAOI", - "geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", - "notes": "", - "is_active": true, - "source": "map", - "num_exports": "6 exports", - "pk": 1855, - "created_at": "2015-06-23 13:21:50.034012" + "123": { + "aoi": [ + { + "fields": { + "clip_geometry": "SRID=4326;POLYGON ((68.9150709532930961 33.5950250284996983, 68.8704389952918063 33.5955969812235011, 68.8724989318148033 33.5858732691386024, 68.9020246886466055 33.5853012519442018, 68.9068312072003977 33.5549789148388982, 68.9274305724316037 33.5589843621810999, 68.9274305724316037 33.5944530719840984, 68.9150709532930961 33.5950250284996983))", + "created_at": "2013-04-16T13:10:33.974", + "is_active": true, + "name": "First_Aoi", + "notes": "", + "source": "", + "user": 102 + }, + "model": "export.aoi", + "pk": 123 + } + ], + "export_set": [ + { + "datatype": "LAS 1.2", + "hsrs": 32642, + "name": "First_Aoi_WGS84-UTMzone42N_2015-Oct-15.zip", + "pk": 1335, + "stated_at": "2015-10-15T18:06:13.272161", + "status": "SUCCESS", + "url": "http://127.0.0.1:8000/export/download/1335/" + }, + { + "datatype": "DSM", + "hsrs": 32642, + "name": "First_Aoi_WGS84-UTMzone42N_2015-Oct-15.zip", + "pk": 1328, + "stated_at": "2015-10-15T17:59:05.937854", + "status": "SUCCESS", + "url": "http://127.0.0.1:8000/export/download/1328/" + }, + ], + "pointcloud_collects": [ + { + "datatype": "LAS 1.2", + "name": "20110323_00_0_UFO", + "pk": 168 + } + ], + "raster_collects": [ + { + "datatype": "DSM", + "name": "20080407_00_0_UFO", + "pk": 228 + } + ] + }, + "1304": { + "aoi": [ + { + "fields": { + "clip_geometry": "SRID=4326;POLYGON ((64.2115925480768936 36.8743567152622020, 59.2018269230769008 32.7632670467287994, 68.6940144230768936 32.9847159272803978, 64.2115925480768936 36.8743567152622020))", + "created_at": "2015-09-23T09:50:19.856", + "is_active": true, + "name": "Second_Aoi", + "notes": "", + "source": "", + "user": 102 + }, + "model": "export.aoi", + "pk": 1304 + } + ], + "export_set": [], + "pointcloud_collects": [ + { + "datatype": "LAS 1.2", + "name": "20110401_00_1_UFO", + "pk": 169 + }, + { + "datatype": "LAS 1.2", + "name": "20110404_00_0_UFO", + "pk": 186 + }, + { + "datatype": "LAS 1.2", + "name": "11111_Ring_Road60", + "pk": 55 + }, + ], + "raster_collects": [ + { + "datatype": "DTM", + "name": "20111001_00_0_UFO", + "pk": 254 + }, + { + "datatype": "DTM", + "name": "20110619_00_1_UFO", + "pk": 268 + }, + ] + }, + "GRiD API": { + "API Version": "v1" } - ] } ~~~~ @@ -150,14 +231,18 @@ Get information for a single AOI. #### Endpoint ~~~~ {.bash} -GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/aoi/{pk} +GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/{pk} ~~~~ #### Request Parameters Path parameter Value ---------------- ------------------------------ - pk The primary key for the AOI. + pk *Required*. The primary key for the AOI. + + Query parameter Value + ----------------- ------------------------------------------------ + source *Required*. Your GRiD generated API key. #### Response Format @@ -168,60 +253,63 @@ JSON format. #### Example ~~~~ {.bash} -curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/aoi/1959 +curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/123?source=grid ~~~~ ~~~~ {.json} { - "export_set": [ - { - "status": "SUCCESS", - "stated_at": "2015-07-07 23:33:24.247148", - "name": "ExportNumberOne.zip", - "datatype": "LAS 1.2", - "hsrs": 32641, - "url": "http://gridte.rsgis.erdc.dren.mil/te_ba/export/download/3561/", - "pk": 3561 - }, { - "status": "SUCCESS", - "stated_at": "2015-07-07 23:31:32.584232", - "name": "ExportNumberTwo.zip", - "datatype": "DSM", - "hsrs": 32641, - "url": "http://gridte.rsgis.erdc.dren.mil/te_ba/export/download/3560/", - "pk": 3560 - } - ], - "aoi": [ - { - "fields": { - "name": "myFirstAOI", - "created_at": "2015-07-07T23:30:29.088", - "is_active": true, - "source": "api", - "user": 90, - "clip_geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", - "notes": "" - }, - "model": "export.aoi", - "pk": 1959 - } - ], - "collects": [ - { - "fields": { - "name": "CollectA" - }, - "model": "loaddata.collect", - "pk": 2298 - }, { - "fields": { - "name": "CollectB" - }, - "model": "loaddata.collect", - "pk": 3109 - } - ] + "GRiD API": { + "API Version": "v1" + }, + "aoi": [ + { + "fields": { + "clip_geometry": "SRID=4326;POLYGON ((68.9150709532930961 33.5950250284996983, 68.8704389952918063 33.5955969812235011, 68.8724989318148033 33.5858732691386024, 68.9020246886466055 33.5853012519442018, 68.9068312072003977 33.5549789148388982, 68.9274305724316037 33.5589843621810999, 68.9274305724316037 33.5944530719840984, 68.9150709532930961 33.5950250284996983))", + "created_at": "2013-04-16T13:10:33.974", + "is_active": true, + "name": "First_Aoi", + "notes": "", + "source": "", + "user": 102 + }, + "model": "export.aoi", + "pk": 123 + } + ], + "export_set": [ + { + "datatype": "LAS 1.2", + "hsrs": 32642, + "name": "First_Aoi-UTMzone42N_2015-Oct-15.zip", + "pk": 1335, + "stated_at": "2015-10-15T18:06:13.272161", + "status": "SUCCESS", + "url": "http://127.0.0.1:8000/export/download/1335/" + }, + { + "datatype": "DSM", + "hsrs": 32642, + "name": "First_Aoi_WGS84-UTMzone42N_2015-Oct-15.zip", + "pk": 1328, + "stated_at": "2015-10-15T17:59:05.937854", + "status": "SUCCESS", + "url": "http://127.0.0.1:8000/export/download/1328/" + }, + ], + "pointcloud_collects": [ + { + "datatype": "LAS 1.2", + "name": "20110323_00_0_UFO", + "pk": 168 + } + ], + "raster_collects": [ + { + "datatype": "DSM", + "name": "20080407_00_0_UFO", + "pk": 228 + } + ] } ~~~~ @@ -232,7 +320,7 @@ Create a new AOI for the given geometry. #### Endpoint ~~~~ {.bash} -GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/aoi/add +GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/add ~~~~ #### Request Parameters @@ -241,6 +329,7 @@ GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/aoi/add ----------------- ----------------------------------------------------- name *Required*. The name for the AOI. geom *Required*. A WKT geometry describing the AOI. + source *Required*. Your GRiD generated API key. subscribe *Optional*. True, False, T, F, 1, 0. Default: false #### Response Format @@ -252,20 +341,35 @@ JSON format. #### Example ~~~~ {.bash} -curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/aoi/add/?name=test&geom=POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))&subscribe=True +curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/add/?source=grid&name=test&geom=POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))&subscribe=True ~~~~ ~~~~ {.json} { - "aoi": [ - { - "geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", - "pk": 2086, - "name": "uploadedAOI", - "subscribed": true - } - ], - "success": true + "1592": { + "aoi": [ + { + "fields": { + "clip_geometry": "SRID=4326;POLYGON ((30.0000000000000000 10.0000000000000000, 40.0000000000000000 40.0000000000000000, 20.0000000000000000 40.0000000000000000, 10.0000000000000000 20.0000000000000000, 30.0000000000000000 10.0000000000000000))", + "created_at": "2015-11-13T12:58:28.040", + "is_active": true, + "name": "test", + "notes": "", + "source": "api", + "user": 102 + }, + "model": "export.aoi", + "pk": 1592 + } + ], + "export_set": [], + "pointcloud_collects": [], + "raster_collects": [] + }, + "GRiD API": { + "API Version": "v1" + }, + "success": true } ~~~~ @@ -276,14 +380,18 @@ Get information for a single export. #### Endpoint ~~~~ {.bash} -GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/export/{pk} +GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/export/{pk} ~~~~ #### Request Parameters Path parameter Value ---------------- --------------------------------- - pk The primary key for the export. + pk *Required*.The primary key for the export. + + Query parameter Value + ----------------- ------------------------------------------------ + source *Required*. Your GRiD generated API key. #### Response Format @@ -294,11 +402,14 @@ object](#export-detail-object) in JSON format. #### Example ~~~~ {.bash} -curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/export/3124 +curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/export/1335?source=grid ~~~~ ~~~~ {.json} { + "GRiD API": { + "API Version": "v1" + } "exportfiles": [ { "url": "http://gridte.rsgis.erdc.dren.mil/te_ba/export/download/file/30359/", @@ -312,7 +423,7 @@ curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/export/3124 "tda_type": "Los", "name": "LineOfSightResult", "url": "http://gridte.rsgis.erdc.dren.mil/te_ba/tda/download/1069/", - "created_at": "2015-05-12 18:25:05.082077", + "created_at": "2015-05-12T18:25:05.082077", "pk": 1069, "notes": "" }, { @@ -320,7 +431,7 @@ curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/export/3124 "tda_type": "Hlz", "name": "HelicopterLandingZoneResult", "url": "http://gridte.rsgis.erdc.dren.mil/te_ba/tda/download/1068/", - "created_at": "2015-05-12 18:24:20.701910", + "created_at": "2015-05-12T18:24:20.701910", "pk": 1068, "notes": "" } @@ -335,7 +446,7 @@ Get suggested AOI name based on geographic coordinates of the geometry. #### Endpoint ~~~~ {.bash} -GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/geoname +GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/geoname ~~~~ #### Request Parameters @@ -343,6 +454,7 @@ GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/geoname Query parameter Value ----------------- ------------------------------------------------ geom *Required*. A WKT geometry describing the AOI. + source *Required*. Your GRiD generated API key. #### Response Format @@ -353,13 +465,16 @@ format. #### Example ~~~~ {.bash} -curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/geoname/?geom=POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) +curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/geoname/?geom=POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))&source=grid ~~~~ ~~~~ {.json} { - "name": "Some Place", - "provided_geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))" + "GRiD API": { + "API Version": "v1" + }, + "name": "Great Sand Sea", + "provided_geometry": "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))" } ~~~~ @@ -370,14 +485,18 @@ Get task status/details for the provided task\_id. #### Endpoint ~~~~ {.bash} -GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/task/{task_id} +GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/task/{task_id} ~~~~ #### Request Parameters Path parameter Value ---------------- --------------------- - task\_id The ID of the task. + task\_id *Required*. The ID of the task. + + Query parameter Value + ----------------- ------------------------------------------------ + source *Required*. Your GRiD generated API key. #### Response Format @@ -388,11 +507,14 @@ JSON format. #### Example ~~~~ {.bash} -curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/task/bacb736e-e900-457c-9b24-fd409bc3019d/ +curl -u http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/task/bacb736e-e900-457c-9b24-fd409bc3019d/?source=grid ~~~~ ~~~~ {.json} { + "GRiD API": { + "API Version": "v1" + }, "task_traceback": "", "task_state": "SUCCESS", "task_tstamp": "2015-09-09T14:19:36.080", @@ -409,7 +531,62 @@ primary keys. #### Endpoint ~~~~ {.bash} -GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/aoi/{pk}/generate/pointcloud +GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/{pk}/generate/pointcloud +~~~~ + +#### Request Parameters + + Path parameter Value + ---------------- ----------------------------- + pk The primary key of the AOI. + + Query parameter Value + ----------------------- --------------------------------------------------------------------------------------------------------------------------------- + collects *Required*. A list of collection primary keys to include in the export, separated by `+` or `,`. + source *Required*. Your GRiD generated API key. + intensity *Optional*. Whther or not to export intensity. Default: True. + dim\_classification *Optional*. Wthere or not to export classification. Default: True + hsrs *Optional*. Accepts an EPSG code. Defaults to AOI SRS + file\_export\n_options *Optional*. Determmine file merging strategy. Accepts ``individual`` and ``collect``. Default ``individual`` + compressed *Optional*. Whether or not to export compressed data. Default: True. + send\_email *Optional*. Whether or not to notify user via email upon completion. Default: False. + generate\_dem *Optional*. Whether or not to generate a DEM from the export. Default: False. + cell\_spacing *Optional*. Used together with ``generate\_dem``. Default: 1.0 + pcl\_terrain *Optional*. Used to trigger a PMF Bare Earth export. Accepts ``ubran``, ``suburban``, ``mountainous``, and ``foliated``. Default: None + sri\_hres *Optional*. Used to trigger a Sarnoff Bare Earth export. Accespts the horizontal resolution. Default: None + +#### Response Format + +On success, the HTTP status code in the header response is `200` OK and +the response body contains a [Generate export +object](#generate-export-object) in JSON format. + +#### Example + +~~~~ {.bash} +curl -u http://gridte.rsgis.erdc.dren.mil/api/v1/aoi/2389/generate/pointcloud/?collects=100+102&source=grid +~~~~ + +~~~~ {.json} +{ + "GRiD API": { + "API Version": "v1" + }, + "started" : true, + "task_id" : "774b4666-5706-4237-8661-df0f96cd7b9c" +} +~~~~ + + +### Generate Raster Export + +Generate point cloud export for the given AOI primary key and collect +primary keys. + +#### Endpoint + +~~~~ {.bash} +GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v1/aoi/{pk}/generate/raster ~~~~ #### Request Parameters @@ -421,6 +598,11 @@ GET http://gridte.rsgis.erdc.dren.mil/te_ba/api/v0/aoi/{pk}/generate/pointcloud Query parameter Value ----------------------- --------------------------------------------------------------------------------------------------------------------------------- collects *Required*. A list of collection primary keys to include in the export, separated by `+` or `,`. + source *Required*. Your GRiD generated API key. + hsrs *Optional*. Accepts an EPSG code. Defaults to AOI SRS + file\_export\n_options *Optional*. Determmine file merging strategy. Accepts ``individual`` and ``collect``. Default ``individual`` + compressed *Optional*. Whether or not to export compressed data. Default: True. + send\_email *Optional*. Whether or not to notify user via email upon completion. Default: False. #### Response Format @@ -431,11 +613,14 @@ object](#generate-export-object) in JSON format. #### Example ~~~~ {.bash} -curl -u http://gridte.rsgis.erdc.dren.mil/api/v0/aoi/2389/generate/pointcloud/?collects=100+102 +curl -u http://gridte.rsgis.erdc.dren.mil/api/v1/aoi/2389/generate/raster/?collects=100+102&source=grid ~~~~ ~~~~ {.json} { + "GRiD API": { + "API Version": "v1" + }, "started" : true, "task_id" : "774b4666-5706-4237-8661-df0f96cd7b9c" }