Query parameters
-
If true, makes this request a dry run; everything is validated but no topics are actually created.
Body
Required
The topic to create.
-
An array of key-value config pairs for a topic. These correspond to Kafka topic-level configs.
-
Name of topic.
-
The number of partitions to give the topic. If specifying partitions manually (see
replica_assignments
), set to -1. Or, to use the cluster default partition count, set to null. -
Manually specify broker ID assignments for partition replicas. If manually assigning replicas, both
replication_factor
andpartition_count
must be -1. -
The number of replicas every partition must have. If specifying partitions manually (see
replica_assignments
), set to -1. Or, to use the cluster default replication factor, set to null.
POST
/v1/topics
curl \
--request POST 'https://{dataplane_api_subdomain}.cloud.redpanda.com/v1/topics' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"configs":[{"name":"string","value":"string"}],"name":"string","partition_count":42,"replica_assignments":[{"partition_id":42,"replica_ids":[42]}],"replication_factor":42}'
Request examples
{
"configs": [
{
"name": "string",
"value": "string"
}
],
"name": "string",
"partition_count": 42,
"replica_assignments": [
{
"partition_id": 42,
"replica_ids": [
42
]
}
],
"replication_factor": 42
}
Response examples (201)
{
"partition_count": 42,
"replication_factor": 42,
"topic_name": "string"
}
Response examples (401)
{
"code": "OK",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"field_violations": [
{
"description": "string",
"field": "string"
}
]
}
],
"message": "string"
}
Response examples (500)
{
"code": "OK",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"field_violations": [
{
"description": "string",
"field": "string"
}
]
}
],
"message": "string"
}
Response examples (default)
{
"code": "OK",
"details": [
{
"@type": "type.googleapis.com/google.rpc.BadRequest",
"field_violations": [
{
"description": "string",
"field": "string"
}
]
}
],
"message": "string"
}