You can use the {devops-api}s and {pulsar-reg} REST APIs to programmatically interact with your tenants and related {product} configurations. Each API supports different functionalities.
Depending on the API you use, you need certain information to form HTTP requests:
-
To use the {product} {pulsar-short} Admin API and {pulsar-short} REST APIs, you need the tenant’s Web Service URL and {pulsar-short} token.
-
To use the {devops-api}s, you need an {astra-db} application token.
-
In the {astra-ui} navigation menu, click Streaming, and then select your tenant.
-
Click the Connect tab.
-
Locate the Tenant Details section. Here you can find the essential information you need to communicate with your {pulsar-short} tenant, including the Web Service URL.
TipThe Web Service URL is not the same as the {pulsar-short} Broker Service URL.
Web Service URLs start with
http. Broker Service URLs start withpulsar(+ssl).
|
Important
|
An {astra-db} application token is not the same as a {pulsar-short} token. |
For information about creating {pulsar-short} tokens, see operations:astream-token-gen.adoc.
-
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"
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.
