List table names (HTTP)
|
For details about additional languages, see: |
|
Tables with the Data API are currently in public preview. Development is ongoing, and the features and functionality are subject to change. Hyper-Converged Database (HCD), and the use of such, is subject to the DataStax Preview Terms. |
Gets the names of the tables in a keyspace.
|
Ready to write code? See the examples for this method to get started. |
Result
Returns the table names as an unordered list of strings in the status.tables field of the response.
Example response:
{
"status": {
"tables":[
"quickstart_table",
"another_table"
]
}
}
Signature
Use the listTables command.
curl -sS -L -X POST "API_ENDPOINT/api/json/v1/KEYSPACE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"listTables": {
"options": {
"explain": false
}
}
}'
Parameters
| Name | Type | Summary |
|---|---|---|
|
|
Must be |
Examples
The following examples demonstrate how to list table names.
List table names
curl -sS -L -X POST "API_ENDPOINT/v1/KEYSPACE_NAME" \
--header "Token: APPLICATION_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"listTables": {
"options": {
"explain": false
}
}
}'