curl -X POST https://{region}.api.konghq.com/v1/event-gateways/{eventGatewayId}/schema-registries \
--header "accept: application/json" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $KONNECT_TOKEN" \
--data '
{
"name": "my-schema-registry",
"type": "confluent",
"config": {
"schema_type": "avro",
"endpoint": "endpoint",
"timeout_seconds": 10,
"authentication": {
"type": "basic",
"username": "username",
"password": "'$MY_PASSWORD'"
}
}
}
'
Make sure to replace the following placeholders with your own values:
-
region: Geographic region where your Kong Konnect is hosted and operates.
-
KONNECT_TOKEN: Your Personal Access Token (PAT) associated with your Konnect account.
-
virtualClusterId: The id of the Virtual Cluster.
-
eventGatewayId: The id of the Event Gateway.
-
eventGatewayListenerId: The id of the Event Gateway Listener.
See the Konnect Event Gateway API reference to learn about region-specific URLs and personal access tokens.
The following creates a new schema registry called my-schema-registry.
Add this snippet to an event_gateways resource in your declarative configuration file, and then manage it with kongctl:
event_gateways:
- ref: eventGatewayName
name: eventGatewayName
schema_registries:
- ref: my-schema-registry
name: my-schema-registry
type: confluent
config:
schema_type: avro
endpoint: endpoint
timeout_seconds: 10
authentication:
type: basic
username: username
password: "$MY_PASSWORD"
Make sure to replace the following placeholders with your own values:
-
eventGatewayName: The name of your Event Gateway.