Skip to content

Commit e95e723

Browse files
committed
Ensure data plane quickstart reflects one-click OAuth flow
1 parent 7b8b08f commit e95e723

1 file changed

Lines changed: 25 additions & 16 deletions

File tree

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,47 @@
11
# Redpanda Cloud Data Plane API Quickstart
22

3-
The following steps describe how to authenticate with the Data Plane API. For more information on the Data Plane API, see the Redpanda Cloud API Overview.
3+
The following steps describe how to authenticate with the Data Plane APIs and create a new topic. For more information on the Data Plane APIs, see the Cloud API Overview.
44

55
> **Note:** Redpanda Cloud uses a control plane and data plane architecture. To see the available endpoints for managing your clusters, networks, and resource groups, see the Control Plane API Reference.
66
77
## Requirements
88

9-
To use the Data Plane API:
9+
To use the Data Plane APIs:
1010

1111
1. You must be a customer with an existing organization in Redpanda Cloud.
1212
2. You can only use one organization for authentication.
13-
3. You must have a running cluster in Redpanda Cloud.
13+
3. You must have a running cluster in Redpanda Cloud. If you don't have an existing cluster, follow the Control Plane API Quickstart to create one.
1414

1515
### Authenticate to the API from API Explorer
1616

17-
You can issue requests against the Data Plane API from your browser when viewing the API Explorer:
17+
To make 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.
1818

19-
1. In the Redpanda Cloud UI, create a [service account (client)](https://cloud.redpanda.com/organization-iam?tab=service-accounts). Save the client ID and secret.
20-
1. Go to the "Get access token" endpoint and click **Run in API Explorer**.
21-
1. In the request body:
22-
1. For `grant_type`, select `client_credentials`.
23-
1. Enter the `client_id` and `client_secret` values you generated using the service account.
24-
1. For `audience`, select `cloudv2-production.redpanda.cloud`.
25-
1. Click **Send Request** on the code example to the right.
19+
If you successfully retrieve an access token, it is valid for one hour. You can use the same token in requests to both Control Plane and Data Plane API endpoints, for as long as the token is valid.
2620

27-
The Response block should populate with an `access_token` value. Copy the string value without the quotes. To you make your next request on a different endpoint in the API Explorer, add the access token in the Authentication field.
21+
## Create a topic
2822

2923
> **Warning:** API requests from this page are executed against your actual environment and data, not a sandbox.
3024
31-
## Create a topic
25+
1. In the page header, click **API Explorer**.
26+
1. If you don't already have the data plane API URL for your target cluster, make a Get Cluster (BYOC, Dedicated) or Get Serverless Cluster (Serverless) request with the Control Plane API. The response contains the data plane API URL. Copy the value of `dataplane_api.url` from the response body, and enter it in the URL field.
27+
1. On the **Choose an operation** dropdown, select **Create topic**.
28+
1. 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.
29+
1. Enter a name for your topic and click **Send request**.
30+
1. Confirm that your topic is successfully created by making a List topics request.
31+
32+
## Next steps
33+
34+
The quickest ways to produce to and consume from the topic are to use [`rpk`](https://docs.redpanda.com/redpanda-cloud/manage/rpk/rpk-install/) or the [Redpanda HTTP Proxy](https://docs.redpanda.com/api/doc/http-proxy) (BYOC and Dedicated clusters only).
35+
36+
For example, to use `rpk` to produce to a topic named `test-topic`, run:
3237

33-
1. If you don't already have the data plane API URL for your target cluster, make a Get Cluster (BYOC, Dedicated) or Get Serverless Cluster (Serverless) request against the Control Plane API. The response contains the Data Plane API URL. Copy the value of `dataplane_api.url` from the response body.
34-
1. Go to **API Servers** in the sidebar and select “\{dataplane_api_url} - Data Plane API”. Paste the URL into the `dataplane_api_url` field.
35-
1. To create a new Redpanda topic, make a Create Topic request.
38+
```
39+
echo "hello" | rpk topic produce test-topic
40+
```
3641

42+
## Suggested reading
3743

44+
- Use the Data Plane APIs to do [common tasks](https://docs.redpanda.com/redpanda-cloud/manage/api/cloud-dataplane-api) in your cluster such as create a user or use Redpanda Connect.
45+
- [`rpk topic produce`](https://docs.redpanda.com/redpanda-cloud/reference/rpk/rpk-topic/rpk-topic-produce/)
46+
- [`rpk topic consume`](https://docs.redpanda.com/redpanda-cloud/reference/rpk/rpk-topic/rpk-topic-consume/)
3847

0 commit comments

Comments
 (0)