Get started with the Astra DevOps API

Use the DevOps API to perform lifecycle actions on organizations and databases in Astra DB Serverless.

Prerequisites

To use the DevOps API, you need the following:

Access control endpoints

You can use the DevOps API to manage access to databases and other resources in your organization, including application tokens, users, roles, and IP access lists. For private endpoints, custom domains, and customer keys, see Private link and encryption endpoints.

Roles and users

You can use the DevOps API to manage roles and manage users in your Astra DB organizations, including:

  • Creating, editing, and deleting custom roles

  • Creating custom roles with more granular permissions than are available in the Astra Portal.

  • Adding and removing users

  • Changing users' assigned roles

Authentication tokens

You can use the DevOps API to manage application tokens, and you can get your organization ID from an application token.

Access lists

You can use the DevOps API to manage IP access lists for databases and the IP access list for the DevOps API.

Secure Connect Bundle

You can use the DevOps API to download Secure Connect Bundles for your databases.

Database endpoints

Create and delete databases

Use the DevOps API to create databases and delete databases.

Get database information

Use the DevOps API to get information about all databases in an organization or get information about one database.

Get all database IDs

You can use the DevOps API List databases endpoint to get all database IDs at once:

curl -sS --location -X GET "https://api.astra.datastax.com/v2/databases" \
--header "Authorization: Bearer APPLICATION_TOKEN" \
--header "Accept: application/json"

Make sure the application token has View DB permission for all relevant databases. For example, the Organization Administrator role can view all databases within an Astra DB organization. If the supplied token doesn’t have permission to view a particular database, the response won’t include any information for that database.

Response

A successful response contains an array of database objects. In each object, the id field contains the database ID.

The following example is truncated for clarity.

[
  {
    "id": "FIRST_DB_ID",
    "orgId": "organizations/ORG_ID",
    "ownerId": "users/ADMIN_USER_ID",
    "info": { ... },
    "creationTime": "2012-11-01T22:08:41+00:00",
    "terminationTime": "2019-11-01T22:08:41+00:00",
    "status": "ACTIVE",
    "storage": { ... },
    "availableActions": [ ... ],
    ...
  },
  {
    "id": "SECOND_DB_ID",
    "orgId": "organizations/ORG_ID",
    "ownerId": "users/ADMIN_USER_ID",
    "info": { ... },
    "creationTime": "2012-11-01T22:08:41+00:00",
    "terminationTime": "2019-11-01T22:08:41+00:00",
    "status": "ACTIVE",
    "storage": { ... },
    "availableActions": [ ... ],
    ...
  }
]
Multi-region databases

Use the DevOps API to manage regions for multi-region databases.

Namespaces and keyspaces

Use the DevOps API to create and delete keyspaces and namespaces in your databases.

Astra DB APIs use the term keyspace to refer to both namespaces and keyspaces.

Telemetry endpoints

You can use the DevOps API Telemetry endpoints to export database health metrics and stream Astra DB Serverless audit logs.

Other DevOps API endpoints

The DevOps API supports both Astra DB Serverless and Classic databases. Some endpoints, including the Park, Unpark, Resize, and VPC Peering endpoints are for Astra DB Classic databases only. For information about these endpoints, see the DevOps API reference.

DevOps API status codes

The DevOps API can return the following status codes:

200 OK
201 Created
202 Accepted
400 Bad request
401 Unauthorized
403 Forbidden
404 Not found
409 Conflict
500 Server error

Error responses include additional information about the specific error conditions.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

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.

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