API and CLI for Confluent Cloud for Government¶
The supported Confluent Cloud for Government APIs and CLI function the same way as the commercial Confluent Cloud APIs and CLI, except the APIs require a different base URL and the CLI requires a special login flag.
APIs use the following base URL:
confluentgov.com
The CLI requires the following flag to log in to Confluent Cloud for Government:
confluent login --us-gov
API usage examples¶
This section provides example requests for creating a cluster and topic.
Create Kafka cluster request¶
Creates a Kafka cluster.
POST /cmk/v2/clusters
Host: api.confluentgov.com
Create a topic request¶
Creates a topic.
POST /kafka/v3/clusters/lkc-l7ypl/topics
Host: pkc-12345.us-gov-west-1.aws.confluentgov.com:443
CLI usage example¶
Log in to Confluent Cloud for Government:
confluent login --us-gov
For more information, see Confluent CLI Command Reference.