List index metadata (HTTP)
|
For details about additional languages, see: |
Gets information about the indexes associated with a specific table.
|
Ready to write code? See the examples for this method to get started. |
Result
The status.indexes field in the response describes each index in the table.
Example response:
{
"status": {
"indexes": [
{
"name": "summary_genres_vector_index",
"definition": {
"column": "summary_genres_vector",
"options": { "metric": "cosine", "sourceModel": "other" }
},
"indexType": "vector"
},
{
"name": "rating_index",
"definition": { "column": "rating", "options": {} },
"indexType": "regular"
}
]
}
}
Parameters
Use the listIndexes command.
Command signature
curl -sS -L -X POST "API_ENDPOINT/api/json/v1/KEYSPACE_NAME/TABLE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"listIndexes": {
"options": {
"explain": true
}
}
}'
| Name | Type | Summary |
|---|---|---|
|
|
Must be |
Examples
The following examples demonstrate how to get index metadata for a table.
List index metadata
curl -sS -L -X POST "API_ENDPOINT/api/json/v1/KEYSPACE_NAME/TABLE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"listIndexes": {
"options": {
"explain": true
}
}
}'