Download OpenAPI specification:Download
The Stargate REST API provides CRUD operations on table data managed by Stargate. Keep in mind that you will need information for the server ({databaseId} and {region}) for all of these operations.
Create an authorization token.
username required | string Username |
password required | string Password |
{- "username": "cassandra",
- "password": "cassandra"
}
{- "authToken": "5c90f769-8784-499c-83f7-b764822255f1"
}
Retrieve all available keyspaces in the specific database.
raw | boolean Default: false Unwrap results. |
X-Cassandra-Token required | string The token returned from the authorization endpoint. Use this token in each request. |
{- "name": "users_keyspace",
- "datacenters": [
- {
- "name": "DC1",
- "replicas": 2
}
]
}
X-Cassandra-Token required | string The token returned from the authorization endpoint. Use this token in each request. |
name required | string The name of the keyspace. |
Array of objects (Datacenter) The datacenters within a keyspace. Only applies for those keyspaces created with NetworkTopologyStrategy. |
{- "name": "users_keyspace",
- "datacenters": [
- {
- "name": "DC1",
- "replicas": 2
}
]
}
{- "name": "string"
}
keyspace-id required | string keyspace name |
raw | boolean Default: false Unwrap results. |
X-Cassandra-Token required | string The token returned from the authorization endpoint. Use this token in each request. |
{- "name": "users_keyspace",
- "datacenters": [
- {
- "name": "DC1",
- "replicas": 2
}
]
}
keyspace-id required | string keyspace name |
X-Cassandra-Token required | string The token returned from the authorization endpoint. Use this token in each request. |
name required | string Name of the table. |
ifNotExists | boolean Default: false Determines whether to create a new table if a table with the same name exists. Attempting to create an existing table returns an error unless this option is true. |
required | Array of objects (ColumnDefinition) Definition of columns that belong to the table to be added. |
required | object (PrimaryKey) Defines a column list for the primary key. Can be either a single column, compound primary key, or composite partition key. Provide multiple columns for the partition key to define a composite partition key. |
object (TableOptions) |
{- "name": "users",
- "ifNotExists": true,
- "columnDefinitions": [
- {
- "name": "emailaddress",
- "typeDefinition": "text",
- "static": false
}
], - "primaryKey": {
- "partitionKey": [
- "emailaddress"
], - "clusteringKey": [
- "age"
]
}, - "tableOptions": {
- "defaultTimeToLive": 0,
- "clusteringExpression": [
- {
- "column": "age",
- "order": "ASC"
}
]
}
}
{- "name": "string"
}
keyspace-id required | string keyspace name |
raw | boolean Default: false Unwrap results. |
X-Cassandra-Token required | string The token returned from the authorization endpoint. Use this token in each request. |
{- "data": [
- {
- "name": "users",
- "keyspace": "users_keyspace",
- "columnDefinitions": [
- {
- "name": "emailaddress",
- "typeDefinition": "text",
- "static": false
}
], - "primaryKey": {
- "partitionKey": [
- "emailaddress"
], - "clusteringKey": [
- "age"
]
},