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
-
In the Astra Portal navigation menu, click Streaming, and then select your tenant.
-
Click the Connect tab.
-
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.
The Web Service URL is not the same as the Pulsar Broker Service URL.
Web Service URLs start with
http
. Broker Service URLs start withpulsar(+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
-
Set your environment variables:
PULSAR_TOKEN="PULSAR_TOKEN" WEB_SERVICE_URL="TENANT_WEB_SERVICE_URL"
-
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.