Form Astra Streaming HTTP requests

You can use the Astra Streaming APIs and Pulsar REST APIs to programmatically interact with your tenants and related Astra Streaming configurations. Each API supports different functionalities.

Depending on the API you use, you need certain information to form HTTP requests:

  • To use the Astra Streaming Pulsar Admin API and Pulsar REST APIs, you need the tenant’s Web Service URL and Pulsar token.

  • To use the Astra Streaming DevOps API, you need an Astra DB application token.

Get the tenant web service URL

  1. In the Astra Portal navigation menu, click Streaming, and then select your tenant.

  2. Click the Connect tab.

  3. In the Details section, locate the Tenant Details. Here you can find the essential information you need to communicate with your Pulsar tenant, including the Web Service URL.

    Tenant details in Astra Streaming

    The Web Service URL is not the same as the Pulsar Broker Service URL.

    Web Service URLs start with http. Broker Service URLs start with pulsar(+ssl).

Create a Astra Streaming Pulsar token

An Astra DB application token is not the same as a Pulsar token.

For information about creating Pulsar tokens, see Manage tokens.

Make a request

  1. Set your environment variables:

    PULSAR_TOKEN="PULSAR_TOKEN"
    WEB_SERVICE_URL="TENANT_WEB_SERVICE_URL"
  2. Run a curl command. The following example lists built-in sink connectors.

    curl -sS --location -X GET "$WEB_SERVICE_URL/admin/v3/sinks/builtinsinks" \
    --header "Authorization: $PULSAR_TOKEN" \
    --header "Content-Type: application/json"

Format responses

The default response is a single JSON string.

You can use modifications like | jq . or | python3 -mjson.tool to format the output for easier reading.

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