List Spark spatial indexes

get

/spatialviewer/api/v1/spark/indexes

List the spatial indexes that were created using the Spark API and that have their metadata in the directory spark_index_metadata contained in the SpatialViewer local working directory (see SpatialViewer configuration).

Request

There are no request parameters for this operation.

Back to Top

Response

Supported Media Types

200 Response

successful request
Body ()
List of indexes metadata.
Root Schema : ListHadoopIndexesResponse
Type: object
List of indexes metadata.
Show Source
Nested Schema : response
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : HadoopIndexMetadata
Type: object
Show Source
Nested Schema : attributesList
Type: array
Extra fields of the indexed records (see 2.8.2.1 Spatial Indexing Class Structure).
Show Source
Example:
[
    "followers_count",
    "friends_count",
    "location",
    "user_id"
]
Nested Schema : mbr
Type: array
MBR (Minimum Bounding Rectangle) of the indexed geometries.
Show Source
Example:
[
    -179.58998,
    -78.46628,
    179.3833,
    82.48332
]
Back to Top

Examples

The following example shows how to view all Spark indexes by submitting a GET request on the REST resource using cURL.

curl -v -X GET "http://localhost:8045/spatialviewer/api/v1/spark/indexes" -H  "accept: application/json" 

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK Date: Wed, 15 Nov 2017 17:50:38 GMT Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET, POST, DELETE, PUT Access-Control-Allow-Headers: Content-Type, Accept Transfer-Encoding: chunked  Content-Type: application/json

Example of Response Body

The following example shows the contents of the response body in JSON format, including one index:

{"status" : "success","title" : "Get Spark indexes.", "o:successCode" : "SV-05007", "response" : {"items" : [ {"name" : "tweetsJanuary", "indexPath" : "/user/oracle/tweetsJanuary", "userInputString" : "/user/oracle/tweetsJanuary.json", "srid" : 8307, "tolerance" : 0.05, "geodetic" : true, "mbr" : null, "attributesList" : [ "followers_count", "friends_count", "location", "user_id" ], "attributesListString" : "followers_count, friends_count, location, user_id"}]}} 
Back to Top