• Glossary
  • Support
  • Downloads
  • DataStax Home
Get Live Help
Expand All
Collapse All

DataStax Astra DB Serverless Documentation

    • Overview
      • Release notes
      • Astra DB FAQs
      • Astra DB glossary
      • Get support
    • Getting Started
      • Grant a user access
      • Load and retrieve data
        • Use DSBulk to load data
        • Use Data Loader in Astra Portal
      • Connect a driver
      • Build sample apps
      • Use integrations
        • Connect with DataGrip
        • Connect with DBSchema
        • Connect with JanusGraph
        • Connect with Strapi
    • Planning
      • Plan options
      • Database regions
    • Securing
      • Security highlights
      • Security guidelines
      • Default user permissions
      • Change your password
      • Reset your password
      • Authentication and Authorization
      • Astra DB Plugin for HashiCorp Vault
    • Connecting
      • Connecting private endpoints
        • AWS Private Link
        • Azure Private Link
        • GCP Private Endpoints
        • Connecting custom DNS
      • Connecting Change Data Capture (CDC)
      • Connecting CQL console
      • Connect the Spark Cassandra Connector to Astra
      • Drivers for Astra DB
        • Connecting C++ driver
        • Connecting C# driver
        • Connecting Java driver
        • Connecting Node.js driver
        • Connecting Python driver
        • Drivers retry policies
      • Connecting Legacy drivers
      • Get Secure Connect Bundle
    • Migrating
      • FAQs
      • Preliminary steps
        • Feasibility checks
        • Deployment and infrastructure considerations
        • Create target environment for migration
        • Understand rollback options
      • Phase 1: Deploy ZDM Proxy and connect client applications
        • Set up the ZDM Automation with ZDM Utility
        • Deploy the ZDM Proxy and monitoring
          • Configure Transport Layer Security
        • Connect client applications to ZDM Proxy
        • Manage your ZDM Proxy instances
      • Phase 2: Migrate and validate data
      • Phase 3: Enable asynchronous dual reads
      • Phase 4: Change read routing to Target
      • Phase 5: Connect client applications directly to Target
      • Additional resources
        • Glossary
        • Troubleshooting
          • Troubleshooting tips
          • Troubleshooting scenarios
        • Contribution guidelines
        • Release Notes
    • Managing
      • Managing your organization
        • User permissions
        • Pricing and billing
        • Audit Logs
        • Bring Your Own Key
          • BYOK AWS Astra DB console
          • BYOK GCP Astra DB console
          • BYOK AWS DevOps API
          • BYOK GCP DevOps API
        • Configuring SSO
          • Configure SSO for Microsoft Azure AD
          • Configure SSO for Okta
          • Configure SSO for OneLogin
      • Managing your database
        • Create your database
        • View your databases
        • Database statuses
        • Use DSBulk to load data
        • Use Data Loader in Astra Portal
        • Monitor your databases
        • Export metrics to third party
          • Export metrics via Astra Portal
          • Export metrics via DevOps API
        • Manage access lists
        • Manage multiple keyspaces
        • Using multiple regions
        • Terminate your database
      • Managing with DevOps API
        • Managing database lifecycle
        • Managing roles
        • Managing users
        • Managing tokens
        • Managing BYOK AWS
        • Managing BYOK GCP
        • Managing access list
        • Managing multiple regions
        • Get private endpoints
        • AWS PrivateLink
        • Azure PrivateLink
        • GCP Private Service
    • Astra CLI
    • DataStax Astra Block
      • FAQs
      • About NFTs
      • DataStax Astra Block for Ethereum quickstart
    • Developing with Stargate APIs
      • Develop with REST
      • Develop with Document
      • Develop with GraphQL
        • Develop with GraphQL (CQL-first)
        • Develop with GraphQL (Schema-first)
      • Develop with gRPC
        • gRPC Rust client
        • gRPC Go client
        • gRPC Node.js client
        • gRPC Java client
      • Develop with CQL
      • Tooling Resources
      • Node.js Document API client
      • Node.js REST API client
    • Stargate QuickStarts
      • Document API QuickStart
      • REST API QuickStart
      • GraphQL API CQL-first QuickStart
    • API References
      • DevOps REST API v2
      • Stargate Document API v2
      • Stargate REST API v2
  • DataStax Astra DB Serverless Documentation
  • Stargate Document API reference

Stargate Document API reference

Table of Contents
  • 1. Endpoints
    • 1.1. Auth
      • 1.1.1. apiRestV1AuthPost
    • 1.2. Keyspaces
      • 1.2.1. apiRestV2KeyspacesKeyspaceIdTableIdGet
      • 1.2.2. apiRestV2KeyspacesKeyspaceIdTableIdPost
      • 1.2.3. apiRestV2KeyspacesKeyspaceIdTableIdPrimaryKeyDelete
      • 1.2.4. apiRestV2KeyspacesKeyspaceIdTableIdPrimaryKeyGet
      • 1.2.5. apiRestV2KeyspacesKeyspaceIdTableIdPrimaryKeyPatch
      • 1.2.6. apiRestV2KeyspacesKeyspaceIdTableIdPrimaryKeyPut
    • 1.3. Namespaces
      • 1.3.1. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDelete
      • 1.3.2. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDocumentPathDelete
      • 1.3.3. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDocumentPathGet
      • 1.3.4. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDocumentPathPatch
      • 1.3.5. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDocumentPathPut
      • 1.3.6. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdGet
      • 1.3.7. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdPatch
      • 1.3.8. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdPut
      • 1.3.9. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdGet
      • 1.3.10. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdPost
    • 1.4. Schemas
      • 1.4.1. apiRestV2NamespacesNamespaceIdCollectionsGet
      • 1.4.2. apiRestV2NamespacesNamespaceIdCollectionsPost
      • 1.4.3. apiRestV2SchemasKeyspacesGet
      • 1.4.4. apiRestV2SchemasKeyspacesKeyspaceIdGet
      • 1.4.5. apiRestV2SchemasKeyspacesKeyspaceIdTablesGet
      • 1.4.6. apiRestV2SchemasKeyspacesKeyspaceIdTablesPost
      • 1.4.7. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsColumnIdDelete
      • 1.4.8. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsColumnIdGet
      • 1.4.9. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsColumnIdPut
      • 1.4.10. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsGet
      • 1.4.11. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsPost
      • 1.4.12. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdDelete
      • 1.4.13. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdGet
      • 1.4.14. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdPut
      • 1.4.15. apiRestV2SchemasNamespacesGet
      • 1.4.16. apiRestV2SchemasNamespacesNamespaceIdCollectionsCollectionIdDelete
      • 1.4.17. apiRestV2SchemasNamespacesNamespaceIdCollectionsCollectionIdGet
      • 1.4.18. apiRestV2SchemasNamespacesNamespaceIdDelete
      • 1.4.19. apiRestV2SchemasNamespacesNamespaceIdGet
      • 1.4.20. apiRestV2SchemasNamespacesPost
  • 2. Models
    • 2.1. Credentials
Abstract
The Stargate REST API provides CRUD operations on table data managed by Stargate.

1. Endpoints

1.1. Auth

1.1.1. apiRestV1AuthPost

POST /api/rest/v1/auth

Create an auth token

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

Body Parameter
Name Description Required Default Pattern

Credentials

Credentials

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 1. http response codes
Code Message Datatype

201

Created

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.2. Keyspaces

1.2.1. apiRestV2KeyspacesKeyspaceIdTableIdGet

GET /api/rest/v2/keyspaces/{keyspace-id}/{table-id}

search a table

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

where

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

$ne

Not Equal To

$in

Contained In

$exists

A value is set for the key

$select

This matches a value for a key in the result of a different query

$dontSelect

Requires that a key’s value not match a value for a key in the result of a different query

$all

Contains all of the given values

$regex

Requires that a key’s value match a regular expression

$text

Performs a full text search on indexed fields

-

null

fields

URL escaped, comma delimited list of keys to include

-

null

page-size

restrict the number of returned items (max 100)

-

null

page-state

move the cursor to a particular result

-

null

sort

keys to sort by

-

null

raw

unwrap results

-

Return Type

-

Content Type
  • application/json

Responses
Table 2. http response codes
Code Message Datatype

200

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.2.2. apiRestV2KeyspacesKeyspaceIdTableIdPost

POST /api/rest/v2/keyspaces/{keyspace-id}/{table-id}

add a new row

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

Body Parameter
Name Description Required Default Pattern

body

row [object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 3. http response codes
Code Message Datatype

201

resource created

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

409

Conflict

<<>>

500

Internal server error

<<>>

Samples

1.2.3. apiRestV2KeyspacesKeyspaceIdTableIdPrimaryKeyDelete

DELETE /api/rest/v2/keyspaces/{keyspace-id}/{table-id}/{primary-key}

delete a row(s)

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

primary-key

Value from the primary key column for the table. Define composite keys by separating values with slashes (`val1/val2…​`) in the order they were defined. </br> For example, if the composite key was defined as `PRIMARY KEY(race_year, race_name)` then the primary key in the path would be `race_year/race_name`

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 4. http response codes
Code Message Datatype

204

resource deleted

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.2.4. apiRestV2KeyspacesKeyspaceIdTableIdPrimaryKeyGet

GET /api/rest/v2/keyspaces/{keyspace-id}/{table-id}/{primary-key}

get a row(s)

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

primary-key

Value from the primary key column for the table. Define composite keys by separating values with slashes (`val1/val2…​`) in the order they were defined. </br> For example, if the composite key was defined as `PRIMARY KEY(race_year, race_name)` then the primary key in the path would be `race_year/race_name`

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

fields

URL escaped, comma delimited list of keys to include

-

null

page-size

restrict the number of returned items (max 100)

-

null

page-state

move the cursor to a particular result

-

null

sort

keys to sort by

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 5. http response codes
Code Message Datatype

200

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.2.5. apiRestV2KeyspacesKeyspaceIdTableIdPrimaryKeyPatch

PATCH /api/rest/v2/keyspaces/{keyspace-id}/{table-id}/{primary-key}

update part of a row(s)

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

primary-key

Value from the primary key column for the table. Define composite keys by separating values with slashes (`val1/val2…​`) in the order they were defined. </br> For example, if the composite key was defined as `PRIMARY KEY(race_year, race_name)` then the primary key in the path would be `race_year/race_name`

X

null

Body Parameter
Name Description Required Default Pattern

body

document [object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 6. http response codes
Code Message Datatype

200

resource updated

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.2.6. apiRestV2KeyspacesKeyspaceIdTableIdPrimaryKeyPut

PUT /api/rest/v2/keyspaces/{keyspace-id}/{table-id}/{primary-key}

replace a row(s)

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

primary-key

Value from the primary key column for the table. Define composite keys by separating values with slashes (`val1/val2…​`) in the order they were defined. </br> For example, if the composite key was defined as `PRIMARY KEY(race_year, race_name)` then the primary key in the path would be `race_year/race_name`

X

null

Body Parameter
Name Description Required Default Pattern

body

document [object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 7. http response codes
Code Message Datatype

200

resource updated

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.3. Namespaces

1.3.1. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDelete

DELETE /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}/{document-id}

delete a document

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

document-id

the id of the document

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 8. http response codes
Code Message Datatype

204

resource deleted

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.3.2. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDocumentPathDelete

DELETE /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}/{document-id}/{document-path}

delete a sub document

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

document-id

the id of the document

X

null

document-path

a JSON path

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 9. http response codes
Code Message Datatype

204

resource deleted

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.3.3. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDocumentPathGet

GET /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}/{document-id}/{document-path}

get a sub document by path

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

document-id

the id of the document

X

null

document-path

a JSON path

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

fields

URL escaped, comma delimited list of keys to include

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 10. http response codes
Code Message Datatype

200

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.3.4. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDocumentPathPatch

PATCH /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}/{document-id}/{document-path}

update part of a sub document

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

document-id

the id of the document

X

null

document-path

a JSON path

X

null

Body Parameter
Name Description Required Default Pattern

body

document [object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 11. http response codes
Code Message Datatype

200

resource updated

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.3.5. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdDocumentPathPut

PUT /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}/{document-id}/{document-path}

replace a sub document

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

document-id

the id of the document

X

null

document-path

a JSON path

X

null

Body Parameter
Name Description Required Default Pattern

body

document [object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 12. http response codes
Code Message Datatype

201

resource created

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.3.6. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdGet

GET /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}/{document-id}

get a document by id

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

document-id

the id of the document

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

fields

URL escaped, comma delimited list of keys to include

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 13. http response codes
Code Message Datatype

200

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.3.7. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdPatch

PATCH /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}/{document-id}

update part of a document

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

document-id

the id of the document

X

null

Body Parameter
Name Description Required Default Pattern

body

document [object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 14. http response codes
Code Message Datatype

200

resource updated

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.3.8. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdDocumentIdPut

PUT /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}/{document-id}

replace a document

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

document-id

the id of the document

X

null

Body Parameter
Name Description Required Default Pattern

body

document [object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 15. http response codes
Code Message Datatype

200

resource updated

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.3.9. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdGet

GET /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}

search for documents in {collection-id}

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

where

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

$ne

Not Equal To

$in

Contained In

$exists

A value is set for the key

$select

This matches a value for a key in the result of a different query

$dontSelect

Requires that a key’s value not match a value for a key in the result of a different query

$all

Contains all of the given values

$regex

Requires that a key’s value match a regular expression

$text

Performs a full text search on indexed fields

-

null

fields

URL escaped, comma delimited list of keys to include

-

null

page-size

restrict the number of returned items (max 100)

-

null

page-state

move the cursor to a particular result

-

null

sort

keys to sort by

-

null

raw

unwrap results

-

Return Type

-

Content Type
  • application/json

Responses
Table 16. http response codes
Code Message Datatype

200

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.3.10. apiRestV2NamespacesNamespaceIdCollectionsCollectionIdPost

POST /api/rest/v2/namespaces/{namespace-id}/collections/{collection-id}

add a new document to {collection-id}

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

Body Parameter
Name Description Required Default Pattern

body

document [object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 17. http response codes
Code Message Datatype

201

resource created

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

409

Conflict

<<>>

500

Internal server error

<<>>

Samples

1.4. Schemas

1.4.1. apiRestV2NamespacesNamespaceIdCollectionsGet

GET /api/rest/v2/namespaces/{namespace-id}/collections

list collections in a namespace

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 18. http response codes
Code Message Datatype

200

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.4.2. apiRestV2NamespacesNamespaceIdCollectionsPost

POST /api/rest/v2/namespaces/{namespace-id}/collections

create a collection

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

Body Parameter
Name Description Required Default Pattern

body

[object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 19. http response codes
Code Message Datatype

201

resource created

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

409

Conflict

<<>>

500

Internal server error

<<>>

Samples

1.4.3. apiRestV2SchemasKeyspacesGet

GET /api/rest/v2/schemas/keyspaces

list keyspaces

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 20. http response codes
Code Message Datatype

200

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.4.4. apiRestV2SchemasKeyspacesKeyspaceIdGet

GET /api/rest/v2/schemas/keyspaces/{keyspace-id}

get a keyspace

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 21. http response codes
Code Message Datatype

200

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.4.5. apiRestV2SchemasKeyspacesKeyspaceIdTablesGet

GET /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables

list tables

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 22. http response codes
Code Message Datatype

200

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.4.6. apiRestV2SchemasKeyspacesKeyspaceIdTablesPost

POST /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables

create a table

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

Body Parameter
Name Description Required Default Pattern

body

[object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 23. http response codes
Code Message Datatype

201

resource created

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

409

Conflict

<<>>

500

Internal server error

<<>>

Samples

1.4.7. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsColumnIdDelete

DELETE /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables/{table-id}/columns/{column-id}

delete a column

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

column-id

column name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 24. http response codes
Code Message Datatype

204

resource deleted

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.4.8. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsColumnIdGet

GET /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables/{table-id}/columns/{column-id}

get a column

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

column-id

column name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 25. http response codes
Code Message Datatype

200

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.4.9. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsColumnIdPut

PUT /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables/{table-id}/columns/{column-id}

replace a column definition

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

column-id

column name

X

null

Body Parameter
Name Description Required Default Pattern

body

[object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 26. http response codes
Code Message Datatype

200

resource updated

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

409

Conflict

<<>>

500

Internal server error

<<>>

Samples

1.4.10. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsGet

GET /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables/{table-id}/columns

list columns

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 27. http response codes
Code Message Datatype

200

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.4.11. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdColumnsPost

POST /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables/{table-id}/columns

create a column

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

Body Parameter
Name Description Required Default Pattern

body

[object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 28. http response codes
Code Message Datatype

201

resource created

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

409

Conflict

<<>>

500

Internal server error

<<>>

Samples

1.4.12. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdDelete

DELETE /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables/{table-id}

delete a table

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 29. http response codes
Code Message Datatype

204

resource deleted

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.4.13. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdGet

GET /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables/{table-id}

get a table

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 30. http response codes
Code Message Datatype

200

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.4.14. apiRestV2SchemasKeyspacesKeyspaceIdTablesTableIdPut

PUT /api/rest/v2/schemas/keyspaces/{keyspace-id}/tables/{table-id}

replace a table definition, except for columns

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

keyspace-id

keyspace name

X

null

table-id

table name

X

null

Body Parameter
Name Description Required Default Pattern

body

[object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 31. http response codes
Code Message Datatype

200

resource updated

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

409

Conflict

<<>>

500

Internal server error

<<>>

Samples

1.4.15. apiRestV2SchemasNamespacesGet

GET /api/rest/v2/schemas/namespaces

list namespaces

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 32. http response codes
Code Message Datatype

200

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.4.16. apiRestV2SchemasNamespacesNamespaceIdCollectionsCollectionIdDelete

DELETE /api/rest/v2/schemas/namespaces/{namespace-id}/collections/{collection-id}

delete a collection

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 33. http response codes
Code Message Datatype

204

resource deleted

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.4.17. apiRestV2SchemasNamespacesNamespaceIdCollectionsCollectionIdGet

GET /api/rest/v2/schemas/namespaces/{namespace-id}/collections/{collection-id}

get a collection

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

collection-id

name of the document collection

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 34. http response codes
Code Message Datatype

200

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.4.18. apiRestV2SchemasNamespacesNamespaceIdDelete

DELETE /api/rest/v2/schemas/namespaces/{namespace-id}

delete a namespace

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 35. http response codes
Code Message Datatype

204

resource deleted

<<>>

401

Unauthorized

<<>>

500

Internal server error

<<>>

Samples

1.4.19. apiRestV2SchemasNamespacesNamespaceIdGet

GET /api/rest/v2/schemas/namespaces/{namespace-id}

get a namespace

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

namespace-id

namespace name

X

null

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

raw

unwrap results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 36. http response codes
Code Message Datatype

200

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

404

Not Found

<<>>

500

Internal server error

<<>>

Samples

1.4.20. apiRestV2SchemasNamespacesPost

POST /api/rest/v2/schemas/namespaces

create a namespace

Description
Parameters
Path Parameters
Name Description Required Default Pattern

databaseId

UUID of your database from the Astra URL. </br> For example, `d341f349-e5db-46d2-9c90-bb9ebaa6f0fc`.

X

null

region

Cloud region where your database lives. </br> For example, `us-east-1`

X

null

Body Parameter
Name Description Required Default Pattern

body

[object]

X

Header Parameters
Name Description Required Default Pattern

X-Cassandra-Request-Id

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

X

null

X-Cassandra-Token

The token returned from the authorization endpoint. Use this token in each request to the database.

X

null

Query Parameters
Name Description Required Default Pattern

pretty

format results

-

null

Return Type

-

Content Type
  • application/json

Responses
Table 37. http response codes
Code Message Datatype

201

resource created

<<>>

400

Invalid input

<<>>

401

Unauthorized

<<>>

409

Conflict

<<>>

500

Internal server error

<<>>

Samples

2. Models

2.1. Credentials

User credentials for authenticating

Field Name Required Type Description Format

username

X

String

Username

password

X

String

Password

General Inquiries: +1 (650) 389-6000 info@datastax.com

© DataStax | Privacy policy | Terms of use

DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.

Kubernetes is the registered trademark of the Linux Foundation.

landing_page landingpage