Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions modules/manage/partials/controlplane-api.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// GCP region for the create-network and create-cluster examples below.
// Defined once per environment so the network and cluster regions can't drift
// (a mismatch is rejected with REASON_CLUSTER_NETWORK_REGION_MISMATCH).
ifdef::env-dedicated[:gcp-region: us-central1]
ifdef::env-byoc[:gcp-region: us-west1]

The Redpanda Cloud API is a collection of REST APIs that allow you to interact with different parts of Redpanda Cloud. The Control Plane API enables you to programmatically manage your organization's Redpanda infrastructure outside of the Cloud UI. You can call the API endpoints directly, or use tools like Terraform or Python scripts to automate cluster management.

See link:/api/doc/cloud-controlplane/[Control Plane API] for the full API reference documentation.
Expand Down Expand Up @@ -95,7 +101,7 @@ Create a network by making a request to link:/api/doc/cloud-controlplane/operati
Choose a xref:networking:cidr-ranges.adoc[CIDR range] that does not overlap with your existing VPCs or your Redpanda network.

ifdef::env-dedicated[]
[,bash]
[,bash,subs="+attributes"]
----
curl -d \
'{
Expand All @@ -105,14 +111,14 @@ curl -d \
"cluster_type": "TYPE_DEDICATED",
"name": "<network-name>",
"resource_group_id": "<resource-group-id>",
"region": "us-west1"
"region": "{gcp-region}"
}
}' -H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" -X POST https://api.redpanda.com/v1/networks
----
endif::[]
ifdef::env-byoc[]
[,bash]
[,bash,subs="+attributes"]
----
curl -d \
'{
Expand All @@ -122,7 +128,7 @@ curl -d \
"cluster_type": "TYPE_BYOC",
"name": "<network-name>",
"resource_group_id": "<resource-group-id>",
"region": "us-west1"
"region": "{gcp-region}"
}
}' -H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" -X POST https://api.redpanda.com/v1/networks
Expand Down Expand Up @@ -245,7 +251,7 @@ This endpoint returns a <<lro,long-running operation>>.
After the network is created, make a request to the link:/api/doc/cloud-controlplane/operation/operation-clusterservice_createcluster[`POST /v1/clusters`] with the resource group ID and network ID in the request body.

ifdef::env-dedicated[]
[,bash]
[,bash,subs="+attributes"]
----
curl -d \
'{
Expand All @@ -255,13 +261,13 @@ curl -d \
"name": "my-new-cluster",
"resource_group_id": "<resource-group-id>",
"network_id": "<network-id>",
"region": "us-west1",
"throughput_tier": "tier-1-gcp-um4g",
"region": "{gcp-region}",
"throughput_tier": "<throughput-tier>",
"type": "TYPE_DEDICATED",
"zones": [
"us-west1-a",
"us-west1-b",
"us-west1-c"
"{gcp-region}-a",
"{gcp-region}-b",
"{gcp-region}-c"
],
"cluster_configuration": {
"custom_properties": {
Expand All @@ -272,9 +278,11 @@ curl -d \
}' -H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" -X POST https://api.redpanda.com/v1/clusters
----

Replace `<throughput-tier>` with a usage tier that is valid for your region and cluster type. For example, `tier-1-gcp-v2-x86`. See the link:/api/doc/cloud-controlplane/topic/topic-regions-and-usage-tiers[Control Plane API reference] for the full list of regions, zones, and tiers.
endif::[]
ifdef::env-byoc[]
[,bash]
[,bash,subs="+attributes"]
----
curl -d \
'{
Expand All @@ -284,13 +292,13 @@ curl -d \
"name": "my-new-cluster",
"resource_group_id": "<resource-group-id>",
"network_id": "<network-id>",
"region": "us-west1",
"throughput_tier": "tier-1-gcp-um4g",
"region": "{gcp-region}",
"throughput_tier": "<throughput-tier>",
"type": "TYPE_BYOC",
"zones": [
"us-west1-a",
"us-west1-b",
"us-west1-c"
"{gcp-region}-a",
"{gcp-region}-b",
"{gcp-region}-c"
],
"cluster_configuration": {
"custom_properties": {
Expand All @@ -301,6 +309,8 @@ curl -d \
}' -H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" -X POST https://api.redpanda.com/v1/clusters
----

Replace `<throughput-tier>` with a usage tier that is valid for your region and cluster type. For example, `tier-1-gcp-v2-x86`. See the link:/api/doc/cloud-controlplane/topic/topic-regions-and-usage-tiers[Control Plane API reference] for the full list of regions, zones, and tiers.
endif::[]

The Create Cluster endpoint returns a <<lro,long-running operation>>. When the operation completes, you can retrieve cluster details by calling link:/api/doc/cloud-controlplane/operation/operation-clusterservice_getcluster[`GET /v1/clusters/\{id}`], and passing the cluster ID as a parameter.
Expand Down
Loading