Create a Kafka user

Create a user with a generated password. We add the user to the cluster shortly after the response. The response includes the password, and betterstack kafka-user credentials gets it again later.

POST https://{availability_zone}.betterstackcloud.com/v1/kafka/{kafka_id}/users
kafka_id string required

The ID of the kafka the Kafka user belongs to.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

username string required

The name clients sign in with, unique in the cluster, up to 64 lowercase letters, digits, hyphens and underscores, starting with a letter or digit. Can't start with betterstack. Can't be changed later.

privileges array of objects or null

The topics the user can use and what it can do on them, up to 25 entries. Leave it out, or send null or an empty list, to create a user without privileges.

privileges[].topic_pattern string required

A topic name, or a prefix followed by a trailing *, made of letters, digits, dots, hyphens and underscores, up to 249 characters. * alone matches every topic.

privileges[].permission string required

What the user can do on the matching topics.
Valid values:
consume: Read and describe the matching topics, and join consumer groups.
produce: Write and describe the matching topics, and use transactions and the enable.idempotence producer setting.
produce_consume: Both consume and produce.

202 Accepted
{
  "password": "example"
}

Returns the newly created Kafka user.

password string

The generated password. Get it again later via betterstack kafka-user credentials.