POST
/
v2
/
kafka
/
credential
curl -X POST \
  https://api.upstash.com/v2/kafka/credential \
  -u 'EMAIL:API_KEY' \
  -d '{"credential_name": "mycreds", "cluster_id":"1793bfa1-d96e-46de-99ed-8f91f083209d", "topic": "testtopic", "permissions": "ALL"}'
{
  "credential_id": "27172269-da05-471b-9e8e-8fe4195871bc",
  "credential_name": "mycreds",
  "topic": "testtopic",
  "permissions": "ALL",
  "cluster_id": "1793bfa1-d96e-46de-99ed-8f91f083209d",
  "cluster_slug":"easy-haddock-7753",
  "username":"ZWFzeS1oYWRkb2NrLTc3NTMkeeOs0FG4DZ3GxK99cArT0slAC37KLJgbe0fs7dA",
  "creation_time": 1655886853,
  "password": "xE1ypRHMq50jAhpbzu8qBb8jHNAxzezn6bkuRUvc2RZr7X1sznbhampm9p-feT61jnz6ewHJjUd5N6cQHhs84zCjQiP5somCY17FTQ7t6n0uPhWeyf-Fcw==",
  "state": "active"
}

Request Parameters

credential_name
string
required

The ID of the kafka topic

cluster_id
string
required

ID of the kafka cluster

topic
string
required

Name of the kafka topic the credential will be used for

permissions
string
required

Permission scope of the credential
Options: ALL, PRODUCE or CONSUME

Response Parameters

credential_id
string

ID of the created Kafka credential

credential_name
string

Name of the created Kafka credential

topic
string

Name of the topic of the created Kafka credential

permissions
string

Permission scope given to the kafka credential

cluster_id
string

ID of the kafka cluster

username
string

Username to be used for the kafka credential

creation_time
int

Creation time of the credential

password
string

Password to be used in authenticating to the cluster

state
string

State of the credential\ active or deleted