Stargate Document API reference (2.0.0)

Download OpenAPI specification:Download

License: Apache 2.0

The Stargate Document API provides CRUD operations on document data managed by Stargate.

Schemas

storage configuration

Get all namespaces

Retrieve all available namespaces.

query Parameters
raw
boolean

unwrap results

header Parameters
X-Cassandra-Request-Id
required
string <uuid>

Unique identifier (UUID) for the request. Use any valid UUID.

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": [
    ]
}

Get a namespace

path Parameters
namespace-id
required
string

namespace name

query Parameters
raw
boolean

unwrap results

header Parameters
X-Cassandra-Request-Id
required
string <uuid>

Unique identifier (UUID) for the request. Use any valid UUID.

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": {
    }
}

Documents

document data

List collections in a namespace

path Parameters
namespace-id
required
string

namespace name

query Parameters
raw
boolean

unwrap results

header Parameters
X-Cassandra-Request-Id
required
string <uuid>

Unique identifier (UUID) for the request. Use any valid UUID.

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": [
    ]
}

Get a collection

path Parameters
namespace-id
required
string

namespace name

collection-id
required
string

name of the document collection

query Parameters
raw
boolean

unwrap results

header Parameters
X-Cassandra-Request-Id
required
string <uuid>

Unique identifier (UUID) for the request. Use any valid UUID.

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 collection

path Parameters
namespace-id
required
string

namespace name

collection-id
required
string

name of the document collection

header Parameters
X-Cassandra-Request-Id
required
string <uuid>

Unique identifier (UUID) for the request. Use any valid UUID.

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
{ }

Search for documents in {collection-id}

path Parameters
namespace-id
required
string

namespace name

collection-id
required
string

name of the document collection

query Parameters
where
object
Examples:
  • author.name=Cliff Wicklow&createTime=[object Object]&$or=[object Object],[object Object] -

URL escaped JSON query using the following keys:

Key Operation
$lt Less Than
$lte Less Than Or Equal To
$gt Greater Than
$gte Greater Than Or Equal To
$eq Equal To
$ne Not Equal To
$in Contained In
$nin Not Contained In
$exists A value is set for the key
fields
string
Examples:
  • fields=name, email -

URL escaped, comma delimited list of keys to include

page-size
integer <int32>
Examples:
  • page-size=10 -

restrict the number of returned items (max 100)

page-state
string
Examples:
  • page-state= -

move the cursor to a particular result

sort
object
Examples:
  • documentId=asc&name=desc -

keys to sort by

raw
boolean

unwrap results

header Parameters
X-Cassandra-Request-Id
required
string <uuid>

Unique identifier (UUID) for the request. Use any valid UUID.

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
{
  • "count": 1,
  • "pageState": "2f4acd34",
  • "data": [
    ]
}

Add a new document to {collection-id}

path Parameters
namespace-id
required
string

namespace name

collection-id
required
string

name of the document collection

header Parameters
X-Cassandra-Request-Id
required
string <uuid>

Unique identifier (UUID) for the request. Use any valid UUID.

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

document

object

Responses

Request samples

Content type
application/json
{
  • "title": "Hello World",
  • "author": {
    }
}

Response samples

Content type
application/json
{
  • "documentId": "e73c77ec-002d-457a-8b65-8ce7cfb15fc7"
}

Get a document by {document-id}

path Parameters
namespace-id
required
string

namespace name

collection-id
required
string

name of the document collection

document-id
required
string

the id of the document

query Parameters
fields
string
Examples:
  • fields=name, email -

URL escaped, comma delimited list of keys to include

raw
boolean

unwrap results

header Parameters