A newer version of this documentation is available.

View Latest

Retrieve a GSI Statement

To retrieve a GSI statement, use GET /getIndexStatement.

Description

This endpoint returns a statement on Global Secondary Indexes. The specified IP address should be that of any cluster-node that is running the Index Service; and the specified port must be 9102.

HTTP Method and URI

GET http://<host>:9102/getIndexStatement

Response Codes

Response Code Description

200

Success.

401

Unauthorized.

Sample Curl Command

The following example retrieves a GSI statement from node 10.142.180.101; which is running the Index Service, at port 9102.

curl -u Administrator:password -v -X GET http://10.142.180.101:9102/getIndexStatement

Sample Response

200 OK

The body contains the statement: this features a definition for each index. For example:

["CREATE INDEX `def_airportname` ON `travel-sample`(`airportname`) WITH {  \"defer_build\":true }",
"CREATE INDEX `def_city` ON `travel-sample`(`city`) WITH {  \"defer_build\":true }","CREATE INDEX
`def_faa` ON `travel-sample`(`faa`) WITH {  \"defer_build\":true }","CREATE INDEX `def_icao` ON
`travel-sample`(`icao`) WITH {  \"defer_build\":true }","CREATE INDEX `def_name_type` ON
`travel-sample`(`name`) WHERE (`_type` = \"User\") WITH {  \"defer_build\":true }","CREATE INDEX
`def_route_src_dst_day` ON `travel-sample`(`sourceairport`,`destinationairport`,(distinct (array
(`v`.`day`) for `v` in `schedule` end))) WHERE (`type` = \"route\") WITH {  \"defer_build\":true }","CREATE INDEX
`def_schedule_utc` ON `travel-sample`(array (`s`.`utc`) for `s` in `schedule` end) WITH {  \"defer_build\":true }",
"CREATE INDEX `def_sourceairport` ON `travel-sample`(`sourceairport`) WITH {  \"defer_build\":true }",
"CREATE INDEX `def_type` ON `travel-sample`(`type`) WITH {  \"defer_build\":true }","CREATE PRIMARY INDEX
`def_primary` ON `travel-sample` WITH {  \"defer_build\":true }"]
401 Unauthorized

The body of the response is empty.