The following steps describe how to authenticate with the Control Plane API and create a new Redpanda cluster.
Note: Redpanda Cloud uses a control plane and data plane architecture. To view the available endpoints for managing resources within your clusters, such as topics, users, access control lists (ACLs), and connectors, see the Data Plane API Reference. For more information on the Control Plane API, see the Cloud API Overview.
Requirements
To use the Control Plane API:
- You must be a customer with an existing organization in Redpanda Cloud.
- You can only use one organization for authentication.
BYOC only: BYOC clusters require running the rpk cloud byoc
command to install and start the Redpanda Cloud agent service. See Install or Update rpk
.
Authenticate to the API from API Explorer
The API Explorer lets you interact with the API directly from the documentation. You can quickly explore available endpoints and try requests without setting up your own test environment.
To make Cloud API requests in your browser, you must obtain an access token. You can do so by clicking Get token on the API endpoint you want to call.
If you successfully retrieve an access token, it is valid for one hour.
Warning: API requests from the API Explorer are executed against your actual environment and data, not a sandbox.
Create a new cluster
BYOC or Dedicated
In the subheader of this page, open API Explorer.
In the Choose an operation dropdown, select Create resource group.
Click Get token. You may be prompted to log in to the Redpanda Cloud UI. After you log in, the browser automatically redirects you back to the Create resource group endpoint in the API Explorer.
Prepare your Create resource group request.
- Under Body, click Add and provide a name for your resource group. A resource group is a container to organize your Redpanda Cloud resources, such as clusters and networks.
In the request panel, click Send request. If successful, the response returns a resource group ID. Copy the ID and use it later when you make a Create network request.
{ "resource_group": { "id": "d61b4c7f-95da-4d62-a237-9fd9f20a0c19", "name": "test-resource-group", ... } }
In the operation dropdown, select Create network.
Prepare your Create network request.
- Include the ID of the resource group you created in the previous step.
Click Send request. Note that this endpoint returns a long-running operation. The response returns a network ID in
metadata.network_id
. Copy the ID and pass it later when you call the Create cluster endpoint. To check the operation state, make a Get operation request with theoperation.id
.{ "operation": { "id": "d3505t2rmm68sqlgj4u0", "metadata": { "@type": "type.googleapis.com/redpanda.api.controlplane.v1.CreateNetworkMetadata", "network_id": "d3505ta2691o0l3484ng" }, "state": "STATE_IN_PROGRESS", ... } }
When the Create network operation is complete, make a Create cluster request. Use the resource group and network IDs you just created. Note that this endpoint also returns a long-running operation.
For BYOC, run
rpk cloud byoc <cloud-provider> apply
in the shell, passing themetadata.cluster_id
from the Create cluster response as a flag:AWS:
rpk cloud byoc aws apply --redpanda-id=<metadata.cluster_id>
Azure:
rpk cloud byoc azure apply --redpanda-id=<metadata.cluster_id> --subscription-id=<redpanda-cluster-azure-subscription-id>
GCP:
rpk cloud byoc gcp apply --redpanda-id=<metadata.cluster_id> --project-id=<gcp-project-id>
Serverless
In the subheader of this page, open API Explorer.
In the Choose an operation dropdown, select Create resource group.
Click Get token. You may be prompted to log in to the Redpanda Cloud UI. After you log in, the browser automatically redirects you back to the Create resource group endpoint in the API Explorer.
Prepare your Create resource group request.
- Under Body, click Add and provide a name for your resource group. A resource group is a container to organize your Redpanda Cloud resources, such as clusters and networks.
In the request panel, click Send request. If successful, the response returns a resource group ID. Copy the ID and use it later when you make a Create Serverless cluster request.
{ "resource_group": { "id": "d61b4c7f-95da-4d62-a237-9fd9f20a0c19", "name": "test-resource-group", ... } }
In the operation dropdown, scroll to Serverless Clusters and select Create Serverless cluster.
Prepare your Create Serverless cluster request.
- In the request body, use the resource group ID and enter a serverless region (for example,
us-east-1
). - Click Send request. Note that this endpoint returns a long-running operation. The response returns a Serverless cluster ID in
metadata.cluster_id
. To check the operation state, make a Get operation request with theoperation.id
.
- In the request body, use the resource group ID and enter a serverless region (for example,
Next steps: try the Data Plane APIs
- Retrieve your cluster's data plane API URL by making a Get cluster (BYOC, Dedicated) or Get Serverless cluster (Serverless) request in the API Explorer.
- From the value of
dataplane_api.url
in the response body, save the subdomain (the part betweenhttps://
and.cloud.redpanda.com
). - From the Redpanda APIs selector, go to Cloud Data Plane API.
- Select an operation, for example Create topic or List users.
- In the URL field, add the data plane API URL. You can now make Data Plane API requests to your target cluster.
See also: Data Plane API Quickstart
Suggested reading
- Learn about Redpanda Cloud network security and connectivity for BYOC and Dedicated clusters.
- Manage authentication and authorization in Redpanda Cloud.
- Create a Kafka client or generate a sample application to interact with your Serverless cluster.