POST /subjects/(string: subject)
GET /subjects/(string: subject)[?field={name|description}]
GET /subjects
PUT /subjects/(string: subject)
DELETE /subjects/(string: subject)
POST /subjects/(string: subject)/versions
POST /subjects/(string: subject)/schema/lookup
POST /subjects(string: subject)/schema/lookupAll
GET /schemas/ids/(int: id)
GET /subjects/(string: subject)/versions/(version)
GET /subjects/(string: subject)/versions
POST /compatibility/subjects/(string: subject)/versions/(version)
PUT /config/(string: subject)
PUT /config/(string: subject)/properties/(string: property)
GET /config/(string: subject)
GET /config/(string: subject)/properties/(string: property)
DELETE /config/(string: subject)
DELETE /config/(string: subject)/properties/(string: property)
{
"error_code": (int: error code),
"message": (string: error message)
}
Register a new subject with the posted description.
Its name might be equal to a topic name in Kafka.
(string: description)
status | response | when |
---|---|---|
201 | (Long: 0L) | succeeded |
500 | ErrorResponse | some errors occurred in the backend |
Read the subject by the given name.
status | response | when |
---|---|---|
200 | json or string (details below) | succeeded |
404 | ErrorResponse | specified subject is not existing |
500 | ErrorResponse | some errors occurred in the backend |
Without specifying field
, returning full information of the subject
{
"name": (string),
"description": (string)
}
otherwise, returning the value of specified field ("name" or "description")
test-topic
Read a list of all subjects
status | response | when |
---|---|---|
200 | json array (details below) | succeeded |
500 | ErrorResponse | some errors occurred in the backend |
[
"test-topic",
"test-topic2",
"test-topic3"
]
Update the description of the specified subject
(string: description)
status | response | when |
---|---|---|
200 | (Long: 0L) | succeeded |
500 | ErrorResponse | some errors occurred in the backend |
Delete the specified subject
status | response | when |
---|---|---|
200 | (Long: 0L) | succeeded |
500 | ErrorResponse | some errors occurred in the backend |
Register a new schema under the specified subject
NOTE Deleting or updating a schema is prohibited in this registry to avoid the confusing situation that there exists some different schemas that has the same id, subject and version. Add it as a new schema instead.
(schema: Avro Schema)
status | response | when |
---|---|---|
200 | (int: SchemaId in a json format (details below)) | the same with the latest schema |
201 | (int: SchemaId in a json format (details below)) | succeeded |
400 | ErrorResponse | the posted schema is not valid |
409 | ErrorResponse | the posted schema violates the restriction on schema compatibility |
500 | ErrorResponse | some errors occurred in the backend |
Response for successful registration is
{
"id": (int: schema id)
}
Check if the posted schema is existing.
(schema: Avro Schema)
status | response | when |
---|---|---|
200 | json (details below) | succeeded |
404 | ErrorResponse | the posted schema is not registered |
422 | ErrorResponse | the posted schema is invalid as an Avro schema |
500 | ErrorResponse | some errors occurred in the backend |
When the posted schema is existing, following is returned.
{
"id": (int),
"subject": (string),
"version": (string: semantic version),
"schema": (json: avro schema)
}
Lookup the all schemas who have the same definition as the posted one.
(schema: Avro Schema)
status | response | when |
---|---|---|
200 | json (details below) | succeeded |
422 | ErrorResponse | the posted schema is invalid as an Avro schema |
500 | ErrorResponse | some errors occurred in the backend |
Following response is returned
[
{
"id": (int),
"subject": (string),
"version": (string: semantic version),
"schema": (json: avro schema)
},
{
"id": (int),
"subject": (string),
"version": (string: semantic version),
"schema": (json: avro schema)
},...
]
Read the schema identified by the given id.
status | response | when |
---|---|---|
200 | json including schema definition (details below) | succeeded |
404 | ErrorResponse | schema not found |
422 | ErrorResponse | invalid id |
500 | ErrorResponse | some errors occurred in the backend |
{
"id": (int: schemaId),
"subject": (string: subject),
"version": (string: semantic version),
"schema": (json: avro schema)
}
Read a specific version of schema under the specified subject Version can take a one of the following format, "latest", "v1", "v1.0.0", In the first case, the latest schema under the specified subject will be returned. Second case, the given major version of latest schema will be returned. The last case, the one with specified version is returned.
status | response | when |
---|---|---|
200 | json including schema definition (details below) | succeeded |
404 | ErrorResponse | specified version of schema is not found under the subject |
422 | ErrorResponse | invalid value is passed as the version |
500 | ErrorResponse | some errors occurred in the backend |
{
"id": (int: schemaId),
"subject": (string: subject),
"version": (string: semantic version),
"schema": (json: avro schema)
}
Read all versions under the specified subject. Versions are in the form of semantic version.
Each part of the version is updated when
part | when |
---|---|
major | forward compatible change, or not compatible change |
minor | backward compatible change |
patch | full compatible change |
More details, refer
status | response | when |
---|---|---|
200 | json array (details below) | succeeded |
500 | ErrorResponse | some errors occurred in the backend |
Example response is following,
[
"v1.0.0", "v1.0.1", "v1.1.0", "v2.0.0"
]
Check if the posted schema is compatible with the specified version of schema under the subject
Avro schema
status | response | when |
---|---|---|
200 | json (details below) | succeeded |
400 | ErrorResponse | the posted schema or version is invalid |
404 | ErrorResponse | the specified version of schema does not exist under the subject |
500 | ErrorResponse | some errors occurred in the backend |
When succeeded,
{
"is_compatible": (bool)
}
Set a compatibility restriction to the specified subject
{
"compatibility": (string: {"FULL"|"BACKWARD"|"FORWARD"|"NONE"})
}
status | response | when |
---|---|---|
200 | (long: the number of affected properties) | succeeded |
422 | ErrorResponse | invalid json or invalid compatibility value |
500 | ErrorResponse | some errors occurred in the backend |
Set a value to the specific configuration property under the subject
a value for the property
status | response | when |
---|---|---|
200 | (Long: the number of affected properties) | succeeded |
422 | ErrorResponse | an invalid compatibility value |
500 | ErrorResponse | some errors occurred in the backend |
Read all configuration properties of the specified subject
status | response | when |
---|---|---|
200 | json (details below) | succeeded |
404 | ErrorResponse | try to read non existent subject |
500 | ErrorResponse | some errors occurred in the backend |
When succeeded, config is returned in a json format as follows,
{
"compatibility": (string: {"FULL"|"BACKWARD"|"FORWARD"|"NONE"})
}
Read a value of the specified property of the subject
status | response | when |
---|---|---|
200 | (string: property value) | succeeded |
400 | ErrorResponse | try to read not defined property |
500 | ErrorResponse | some errors occurred in the backend |
Delete all configuration properties that has been registered for the specified subject
status | response | when |
---|---|---|
200 | (Long: the number of deleted configs) | succeeded |
500 | ErrorResponse | some errors occurred in the backend |
Delete a specific property of the subject
status | response | when |
---|---|---|
200 | (Long: the number of deleted configs) | succeeded |
500 | ErrorResponse | some errors occurred in the backend |