Skip to content

Latest commit

 

History

History
84 lines (70 loc) · 1.33 KB

sample.rest

File metadata and controls

84 lines (70 loc) · 1.33 KB

# -- restclient -- # # health check GET http://localhost:3000/ping

# list all subjects GET http://localhost:3000/

# create subject PUT http://localhost:3000/subject1

#register new schema PUT http://localhost:3000/subject1/register Content-Type: application/json

{

"namespace": "example.avro", "type": "record", "name": "User", "fields": [

{
"name": "name", "type": "string"

}

]

}

#get all schemas GET http://localhost:3000/subject1/all

#get latest schema GET http://localhost:3000/subject1/latest

#get schema with specific version GET http://localhost:3000/subject1/id/2

#register new schema - incompatible PUT http://localhost:3000/subject1/register Content-Type: application/json

{

"namespace": "example.avro", "type": "record", "name": "User", "fields": [

{
"name": "name", "type": "string"

}, {

"name": "favorite_number", "type": "int"

}

]

}

#register new schema - compatible PUT http://localhost:3000/subject1/register Content-Type: application/json

{

"namespace": "example.avro", "type": "record", "name": "User", "fields": [

{
"name": "name", "type": "string"

}, {

"name": "favorite_number", "type": [

"null", "int"

], "default": null

}

]

}

# 404 GET http://localhost:3000/invalid