List collection names (HTTP)
|
For details about additional languages, see: |
Gets the names of the collections in a keyspace.
|
Ready to write code? See the examples for this method to get started. |
Result
Returns the collection names as an unordered list of strings in the status.collections field of the response.
Example response:
{
"status": {
"collections":[
"quickstart_collection",
"another_collection"
]
}
}
Parameters
Use the findCollections command.
Command signature
curl -sS -L -X POST "API_ENDPOINT/api/json/v1/KEYSPACE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"findCollections": {
"options": {
"explain": false
}
}
}'
| Name | Type | Summary |
|---|---|---|
|
|
Must be |
Examples
The following examples demonstrate how to get collection names.
curl -sS -L -X POST "API_ENDPOINT/api/json/v1/KEYSPACE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"findCollections": {
"options": {
"explain": false
}
}
}'