Astra DevOps API (2.2.0)

Download OpenAPI specification:Download

Use the DevOps API to perform lifecycle actions for DataStax Astra databases.

Authentication

Bearer

Pass an application token in header to access the API. See https://docs.datastax.com/en/astra/docs/manage-application-tokens.html

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

Database Operations

The Astra DB DevOps APIs are for interacting with Astra databases and all aspects of their lifecycle.

Returns a list of databases

Get a list of databases visible to the user.

Authorizations:
Bearer (org-db-view)
query Parameters
include
string
Default: "nonterminated"
Enum: "nonterminated" "all" "active" "pending" "preparing" "prepared" "initializing" "parked" "parking" "unparking" "terminating" "terminated" "resizing" "error" "maintenance" "hibernating" "hibernated" "resuming"

Allows filtering so that databases in listed states are returned.

provider
string
Default: "ALL"
Enum: "ALL" "GCP" "AWS" "Azure"

Allows filtering so that databases from a given provider are returned.

starting_after
string

Optional parameter for pagination purposes. Used as this value for starting retrieving a specific page of results.

limit
integer [ 1 .. 100 ]
Default: 25

Optional parameter for pagination purposes. Specify the number of items for one page of data.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new database

Takes a user provided databaseInfo and returns the uuid for a new database.

Authorizations:
Bearer (org-db-create)
Request Body schema: application/json

Definition of new database.

name
required
string

Name of the database--user friendly identifier.

keyspace
required
string

Keyspace name in database.

cloudProvider
required
string
Enum: "AWS" "GCP"

This is the cloud provider where the database lives.

tier
required
string
Value: "serverless"

With the exception of classic databases, all databases are serverless. Classic databases can no longer be created with the DevOps API.

capacityUnits
required
integer [ 1 .. 1 ]

Capacity units were used for classic databases, but are not used for serverless databases. Enter 1 CU for serverless databases. Classic databases can no longer be created with the DevOps API.

region
required
string

Region refers to the cloud region.

Responses

Request samples

Content type
application/json
{
  • "name": "mySplendidDatabase",
  • "keyspace": "myKeyspace",
  • "cloudProvider": "AWS",
  • "tier": "serverless",
  • "capacityUnits": 1,
  • "region": "us-west-2"
}

Response samples

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

Finds database by ID

Returns specified database.

Authorizations:
Bearer (org-db-view)
path Parameters
databaseID
required
string

String representation of the database ID

Responses

Response samples

Content type
application/json
{
  • "id": "1234-5678-91011121-3141",
  • "orgId": "organizations/7142-1283-54249566-3707",
  • "ownerId": "users/8243-2404-85664728-0889",
  • "info": {
    },
  • "creationTime": "2012-11-01T22:08:41+00:00",
  • "terminationTime": "2019-11-01T22:08:41+00:00",
  • "status": "ACTIVE",
  • "storage": {
    },
  • "availableActions": [
    ],
  • "message": "Auto parked due to inactivity",
}

Adds keyspace into database

Adds the specified keyspace to the database.

Authorizations:
Bearer (db-keyspace-create)
path Parameters
databaseID
required
string

String representation of the database ID

keyspaceName
required
string

Name of database keyspace

Responses