The cql-run command executes the specified statement against the cluster.

JSON Input Data Format
{
    "id": string,
    "cql": string
}
id * Specifies the ID of the cluster.
cql * Specifies the CQL statement.
* Indicates a mandatory field.

Code Snippets
Here are several code snippets provided for your direct use. Simply select your preferred tool/language by clicking on it.


Successful Response
{
    "result": "OK",
    "payload": "\r\n keyspace_name                 | durable_writes | replication\r\n-------------------------------+----------------+-------------------------------------------------------------------------------------\r\n                    jibcollect |           True | {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1'}\r\n                   system_auth |           True | {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1'}\r\n                 system_schema |           True |                             {'class': 'org.apache.cassandra.locator.LocalStrategy'}\r\n                    cibcollect |           True | {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1'}\r\n            system_distributed |           True | {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '3'}\r\n                        system |           True |                             {'class': 'org.apache.cassandra.locator.LocalStrategy'}\r\n                 system_traces |           True | {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '2'}\r\n system_distributed_everywhere |           True |                        {'class': 'org.apache.cassandra.locator.EverywhereStrategy'}\r\n\r\n(8 rows)\r\n"
}

Failed Response
{
    "result": "ERR",
    "message": "Error message ..."
}