Stargate REST API reference (1.0.0)

Download OpenAPI specification:Download

License: Apache 2.0

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.

Schemas

The Schema API allows you to interact with keyspaces and tables in your database

Get all keyspaces

Retrieve all available keyspaces in the specific database.

query Parameters
raw
boolean
Default: false

unwrap results

header Parameters
X-Cassandra-Token
required
string

The application token for serverless databases or the token returned from the authorization endpoint for classic databases. Use this token in each request.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a table

path Parameters
keyspace-id
required
string

keyspace name

header Parameters
X-Cassandra-Token
required
string

The application token for serverless databases or the token returned from the authorization endpoint for classic databases. Use this token in each request.

Request Body schema: application/json
name
required
string
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)
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)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "ifNotExists": false,
  • "columnDefinitions": [
    ],
  • "primaryKey": {
    },
  • "tableOptions": {
    }
}

Response samples

Content type
application/json
{
  • "name": "string"
}

Get tables

path Parameters
keyspace-id
required
string

keyspace name

query Parameters
raw
boolean
Default: false

unwrap results

header Parameters
X-Cassandra-Token
required
string

The application token for serverless databases or the token returned from the authorization endpoint for classic databases. Use this token in each request.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a table by {table-id}

path Parameters
keyspace-id
required
string

keyspace name

table-id
required
string

table name

header Parameters
X-Cassandra-Token
required
string

The application token for serverless databases or the token returned from the authorization endpoint for classic databases. Use this token in each request.

Request Body schema: application/json
name
required
string
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)
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)

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "ifNotExists": false,
  • "columnDefinitions": [
    ],
  • "primaryKey": {
    },
  • "tableOptions": {
    }
}

Response samples

Content type
application/json
{
  • "name": "string"
}

Get tables by {table-id}

path Parameters
keyspace-id
required
string

keyspace name

table-id
required
string

table name

query Parameters
raw
boolean
Default: false

unwrap results

header Parameters
X-Cassandra-Token
required
string

The application token for serverless databases or the token returned from the authorization endpoint for classic databases. Use this token in each request.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Delete a table

path Parameters
keyspace-id
required
string

keyspace name

table-id
required
string

table name

header Parameters
X-Cassandra-Token
required
string

The application token for serverless databases or the token returned from the authorization endpoint for classic databases. Use this token in each request.

Responses