Redpanda Cloud API Quickstart

Beta

The following steps describe how to authenticate with the Cloud API and create a new Redpanda cluster. For more information on the Cloud API, see the Redpanda Cloud API Overview.

Create a new cluster

  • BYOC or Dedicated

  • Serverless

  1. In the Redpanda Cloud UI, create a service account (client) and use the client ID and secret to request an API token. Use the token to authenticate to the API.

  2. Create a resource group by making a POST /v1beta2/resource-groups request.

  3. Create a network by making a POST /v1beta2/networks request. Note that this operation may be long-running.

  4. Create a cluster by making a POST /v1beta2/clusters request.

  5. For BYOC, run rpk cloud byoc, passing the metadata.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>
  1. In the Redpanda Cloud UI, create a service account (client) and use the client ID and secret to request an API token. Use the token to authenticate to the API.

  2. Make a GET request to the /v1beta2/resource-groups endpoint to retrieve the default resource group ID.

    curl -H "Authorization: Bearer <token>" https://api.redpanda.com/v1beta2/resource-groups
  3. Make a GET request to the /v1beta2/serverless/regions endpoint to see available regions.

    curl -H "Authorization: Bearer <token>" 'https://api.redpanda.com/v1beta2/serverless/regions?cloud_provider=CLOUD_PROVIDER_AWS'
  4. Create a cluster by making a POST request to the /v1beta2/serverless/clusters endpoint.

    curl -H 'Content-Type: application/json' \
    -H "Authorization: Bearer <token>" \
    -d '{
      "name": <serverless-cluster-name>,
      "resource_group_id": <resource-group-id>,
      "serverless_region": "pro-us-east-1"
    }' -X POST https://api.redpanda.com/v1beta2/serverless/clusters

Try the Cloud API

You can issue requests against the Cloud API from your browser when viewing the API reference.

Complete the following steps:

  1. Go to Authentication in the sidebar.

  2. Click Get Token.

  3. If successful, the text “1 API key applied” displays under the Authentication section of this page. The token is valid for an hour.

  4. Choose the correct API server for your request.

Your API requests are executed against your actual environment and data, not a sandbox.

Make a request to the Control Plane API

For requests to the Control Plane API endpoints:

  1. Click API Servers in the sidebar.

  2. Select “https://api.redpanda.com - Control Plane API”.

  3. From the Control Plane API endpoints, you can make a request by using the Try option. Make sure to enter any required parameter values, and provide the request body object if necessary.

Make a request to the Data Plane APIs

For requests to the Data Plane API endpoints:

  1. Make a Get Cluster (BYOC, Dedicated) or Get Serverless Cluster (Serverless) request for your target cluster.

  2. The Get Cluster response contains the Data Plane API URL. Copy the value of dataplane_api.url from the response body.

  3. Click API Servers in the sidebar and select “{dataplane_api_url} - Data Plane API”.

  4. Paste the URL into the dataplane_api_url input field.

  5. From the Data Plane API endpoints, you can make a request by using the Try option. Make sure to enter any required parameter values, and provide the request body object if necessary.