Use the Data Plane APIs

Beta

The Redpanda Cloud API is a collection of REST APIs that allow you to interact with different parts of Redpanda Cloud. The Data Plane APIs enable you to programmatically manage the resources within your clusters, including topics, users, access control lists (ACLs), and connectors. You can call the API endpoints directly, or use tools like Terraform or Python scripts to automate resource management.

For the full Cloud API reference documentation, see Redpanda Cloud API Reference.

The data plane contains the actual Redpanda clusters. Every cluster is its own data plane, and so it has its own distinct Data Plane API URL.

Get Data Plane API URL

  • BYOC or Dedicated

  • Serverless

To retrieve the Data Plane API URL of a cluster, make a request to GET /v1beta2/clusters/{id}.

To retrieve the Data Plane API URL of a cluster, make a request to GET /v1beta2/serverless/clusters/{id}.

The response includes a dataplane_api.url value:

  "id": "....",
  "name": "my-cluster",
....
  "dataplane_api": {
    "url": "https://api-xyz.abc.fmc.ppd.cloud.redpanda.com"
  },
...

Data Plane APIs

Create a user

To create a new user in your Redpanda cluster, make a POST request to the /v1alpha1/users endpoint, including the SASL mechanism, username, and password in the request body:

curl -X POST "https://api-aeb32d9b.cn20bu40d061nvem7sv0.fmc.prd.cloud.redpanda.com/v1alpha1/users" \
 -H "Authorization: Bearer <token>" \
 -H "accept: application/json" \
 -H "content-type: application/json" \
 -d '{"mechanism":"SASL_MECHANISM_SCRAM_SHA_256","name":"payment-service","password":"secure-password"}'
When using a shell substitution variable for the token, use double quotes to wrap the header value.

The success response returns the newly-created username and SASL mechanism:

{
  "user": {
    "name": "payment-service",
    "mechanism": "SASL_MECHANISM_SCRAM_SHA_256"
  }
}

Create an ACL

To create a new ACL in your Redpanda cluster, make a POST /v1alpha1/acls request. The following example ACL allows all operations on any Redpanda topic for a user with the name payment-service.

curl -X POST "https://api-aeb32d9b.cn20bu40d061nvem7sv0.fmc.prd.cloud.redpanda.com/v1alpha1/acls" \
 -H "Authorization: Bearer <token>" \
 -H "accept: application/json" \
 -H "content-type: application/json" \
 -d '{"host":"*","operation":"OPERATION_ALL","permission_type":"PERMISSION_TYPE_ALLOW","principal":"User:payment-service","resource_name":"*","resource_pattern_type":"RESOURCE_PATTERN_TYPE_LITERAL","resource_type":"RESOURCE_TYPE_TOPIC"}'

The success response is empty, with a 201 status code.

{}

Create a topic

To create a new Redpanda topic without specifying any further parameters, such as the desired topic-level configuration or partition count, make a POST request to /v1alpha1/topics endpoint:

curl -X POST "https://api-aeb32d9b.cn20bu40d061nvem7sv0.fmc.prd.cloud.redpanda.com/v1alpha1/topics" \
 -H "Authorization: Bearer <token>" \
 -H "accept: application/json" \
 -H "content-type: application/json" \
 -d '{"name":"my-simple-test-topic"}'

Create a connector

Connector management is supported in BYOC and Dedicated clusters only.

To create a managed connector, make a POST request to /v1alpha1/connect/clusters/{cluster_name}/connectors. The following example shows how to create an S3 sink connector with the name my-connector:

curl -X POST "https://api-aeb32d9b.cn20bu40d061nvem7sv0.fmc.prd.cloud.redpanda.com/v1alpha1/connect/clusters/redpanda/connectors" \
 -H "Authorization: Bearer <token>" \
 -H "accept: application/json" \
 -H "content-type: application/json" \
 -d '{"config":{"connector.class":"com.redpanda.kafka.connect.s3.S3SinkConnector","topics":"test-topic","aws.secret.access.key":"secret-key","aws.s3.bucket.name":"bucket-name","aws.access.key.id":"access-key","aws.s3.bucket.check":"false","region":"us-east-1"},"name":"my-sample-connector"}'

Example success response:

{
  "name": "my-sample-connector",
  "config": {
    "aws.access.key.id": "access-key",
    "aws.s3.bucket.check": "false",
    "aws.s3.bucket.name": "bucket-name",
    "aws.secret.access.key": "secret-key",
    "connector.class": "com.redpanda.kafka.connect.s3.S3SinkConnector",
    "name": "my-sample-connector",
    "region": "us-east-1",
    "topics": "test-topic"
  },
  "tasks": [],
  "type": "sink"
}

Restart a connector

Connector management is supported in BYOC and Dedicated clusters only.

To restart a connector, make a POST request to the /v1alpha1/connect/clusters/{cluster_name}/connectors/{name}/restart endpoint:

curl -X POST "https://api-aeb32d9b.cn20bu40d061nvem7sv0.fmc.prd.cloud.redpanda.com/v1alpha1/connect/clusters/redpanda/connectors/my-connector/restart" \
 -H "Authorization: Bearer <token>" \
 -H "accept: application/json"\
 -H "content-type: application/json" \
 -d '{"include_tasks":false,"only_failed":false}'

Limitations

  • Client SDKs are not available.