Simple utility function to build an Astra endpoint from a database ID and region.
Useful if you're trying to use DataAPIClient.db or something along those lines, which require a full endpoint URL, but you only have an ID and region to work with.
import { buildAstraEndpoint } from '@datastax/astra-db-ts';// 'https://<id>-<region>.apps.astra.datastax.com'const endpoint = buildAstraEndpoint('<id>', '<region>'); Copy
import { buildAstraEndpoint } from '@datastax/astra-db-ts';// 'https://<id>-<region>.apps.astra.datastax.com'const endpoint = buildAstraEndpoint('<id>', '<region>');
Overview
Simple utility function to build an Astra endpoint from a database ID and region.
Useful if you're trying to use DataAPIClient.db or something along those lines, which require a full endpoint URL, but you only have an ID and region to work with.