-
Notifications
You must be signed in to change notification settings - Fork 23
REST documentation
REST APIs for Pravega Schema Registry.
Version : 0.0.1
BasePath : /v1
Schemes : HTTP
- Group : Group related APIs
- Schema : Schema related APIs
- Encoding : Encoding related APIs
Create a new Group
Type | Name | Description | Schema |
---|---|---|---|
Body |
CreateGroupRequest required |
The Group configuration | CreateGroupRequest |
Name | Description | Schema |
---|---|---|
groupName optional |
Example : "string"
|
string |
properties optional |
Example : {<br> "string" : "string"<br>}
|
< string, string > map |
schemaType optional |
Example : "[schematype](#schematype)"
|
SchemaType |
validationRules optional |
Example : "[schemavalidationrules](#schemavalidationrules)"
|
SchemaValidationRules |
versionBySchemaName optional |
Example : true
|
boolean |
HTTP Code | Description | Schema |
---|---|---|
201 | Successfully added group | No Content |
409 | Group with given name already exists | No Content |
500 | Internal server error while creating a Group | No Content |
application/json
- Group
/groups
{
"groupName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"validationRules" : {
"rules" : {
"string" : "[schemavalidationrule](#schemavalidationrule)"
}
},
"properties" : {
"string" : "string"
},
"versionBySchemaName" : true
}
List all groups
Type | Name | Description | Schema |
---|---|---|---|
Query |
continuationToken optional |
Continuation token | string |
Query |
limit optional |
The numbers of items to return | integer |
HTTP Code | Description | Schema |
---|---|---|
200 | List of all groups | ListGroupsResponse |
500 | Internal server error while fetching the list of Groups | No Content |
application/json
- Group
/groups
{
"groups" : {
"string" : "[groupproperties](#groupproperties)"
},
"continuationToken" : "string"
}
Fetch the properties of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | Found Group properties | GroupProperties |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Group
/groups/string
{
"schemaValidationRules" : {
"rules" : {
"string" : "[schemavalidationrule](#schemavalidationrule)"
}
},
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"versionBySchemaName" : true,
"properties" : {
"string" : "string"
}
}
Delete a Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
HTTP Code | Description | Schema |
---|---|---|
204 | Successfully deleted the Group | No Content |
500 | Internal server error while deleting the Group | No Content |
- Group
/groups/string
Adds a new codec to the group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Body |
AddCodec required |
The codec | AddCodec |
Name | Description | Schema |
---|---|---|
codec optional |
Example : "[codectype](#codectype)"
|
CodecType |
HTTP Code | Description | Schema |
---|---|---|
201 | Successfully added codec to group | No Content |
404 | Group not found | No Content |
500 | Internal server error while creating a Group | No Content |
application/json
- Group
/groups/string/codecs
{
"codec" : {
"codecType" : "string",
"customTypeName" : "string",
"properties" : {
"string" : "string"
}
}
}
Fetch the properties of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | Found Codecs | CodecsList |
404 | Group or encoding id with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Encoding
/groups/string/codecs
{
"codecTypes" : [ {
"codecType" : "string",
"customTypeName" : "string",
"properties" : {
"string" : "string"
}
} ]
}
Fetch the properties of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Body |
GetEncodingIdRequest required |
Get schema corresponding to the version | GetEncodingIdRequest |
Name | Description | Schema |
---|---|---|
codecType optional |
Example : "[codectype](#codectype)"
|
CodecType |
versionInfo optional |
Example : "[versioninfo](#versioninfo)"
|
VersionInfo |
HTTP Code | Description | Schema |
---|---|---|
200 | Found Encoding | EncodingId |
404 | Group or encoding id with given name not found | No Content |
412 | Codec not registered | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
application/json
- Encoding
/groups/string/encodings
{
"versionInfo" : {
"schemaName" : "string",
"version" : 0,
"ordinal" : 0
},
"codecType" : {
"codecType" : "string",
"customTypeName" : "string",
"properties" : {
"string" : "string"
}
}
}
{
"encodingId" : 0
}
Fetch the properties of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
encodingId required |
Encoding id that identifies a unique combination of schema and codec | integer (int32) |
Path |
groupName required |
Group name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | Found Encoding | EncodingInfo |
404 | Group or encoding id with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Encoding
/groups/string/encodings/0
{
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
},
"versionInfo" : {
"schemaName" : "string",
"version" : 0,
"ordinal" : 0
},
"codecType" : {
"codecType" : "string",
"customTypeName" : "string",
"properties" : {
"string" : "string"
}
}
}
Fetch the history of schema evolution of a Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | Found Group history | GroupHistory |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Group
/groups/string/history
{
"history" : [ {
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
},
"version" : {
"schemaName" : "string",
"version" : 0,
"ordinal" : 0
},
"validationRules" : {
"rules" : {
"string" : "[schemavalidationrule](#schemavalidationrule)"
}
},
"timestamp" : 0,
"schemaString" : "string"
} ]
}
Fetch the properties of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | Found Group schema validation rules | SchemaValidationRules |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Group
/groups/string/rules
{
"rules" : {
"string" : "[schemavalidationrule](#schemavalidationrule)"
}
}
update schema validation rules of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Body |
UpdateValidationRulesPolicyRequest required |
update group policy | UpdateValidationRulesPolicyRequest |
UpdateValidationRulesPolicyRequest
Name | Description | Schema |
---|---|---|
previousRules optional |
Example : "[schemavalidationrules](#schemavalidationrules)"
|
SchemaValidationRules |
validationRules optional |
Example : "[schemavalidationrules](#schemavalidationrules)"
|
SchemaValidationRules |
HTTP Code | Description | Schema |
---|---|---|
200 | Updated schema validation policy | No Content |
404 | Group with given name not found | No Content |
409 | Write conflict | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Group
/groups/string/rules
{
"validationRules" : {
"rules" : {
"string" : "[schemavalidationrule](#schemavalidationrule)"
}
},
"previousRules" : {
"rules" : {
"string" : "[schemavalidationrule](#schemavalidationrule)"
}
}
}
Fetch all different objects identified by schema names under a Group. This api will return schema types.
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | List of objects identified by schema names under the group | SchemaNamesList |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Schema
/groups/string/schemas
{
"objects" : [ "string" ]
}
adds a new schema to the group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Body |
AddSchemaToGroupRequest required |
Add new schema to group | AddSchemaToGroupRequest |
Name | Description | Schema |
---|---|---|
schemaInfo optional |
Example : "[schemainfo](#schemainfo)"
|
SchemaInfo |
HTTP Code | Description | Schema |
---|---|---|
201 | Successfully added schema to the group | VersionInfo |
404 | Group not found | No Content |
409 | Incompatible schema | No Content |
417 | Invalid schema type | No Content |
500 | Internal server error while creating a Group | No Content |
application/json
application/json
- Schema
/groups/string/schemas/versions
{
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
}
}
{
"schemaName" : "string",
"version" : 0,
"ordinal" : 0
}
Fetch the properties of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | Versioned history of schemas registered under the group | SchemaVersionsList |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Schema
/groups/string/schemas/versions
{
"schemas" : [ {
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
},
"version" : {
"schemaName" : "string",
"version" : 0,
"ordinal" : 0
}
} ]
}
check if given schema can be used for reads subject to compatibility policy in the schema validation rules.
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Body |
CanReadRequest required |
Checks if schema can be used to read the data in the stream based on compatibility rules. | CanReadRequest |
Name | Description | Schema |
---|---|---|
schemaInfo optional |
Example : "[schemainfo](#schemainfo)"
|
SchemaInfo |
HTTP Code | Description | Schema |
---|---|---|
200 | Schema can be used to read | No Content |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
application/json
- Schema
/groups/string/schemas/versions/canRead
{
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
}
}
Fetch the properties of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | Found Group properties | SchemaWithVersion |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Schema
/groups/string/schemas/versions/latest
{
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
},
"version" : {
"schemaName" : "string",
"version" : 0,
"ordinal" : 0
}
}
check if given schema is compatible with schemas in the registry for current policy setting.
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Body |
ValidateRequest required |
Checks if schema is valid with respect to supplied validation rules | ValidateRequest |
Name | Description | Schema |
---|---|---|
schemaInfo optional |
Example : "[schemainfo](#schemainfo)"
|
SchemaInfo |
validationRules optional |
Example : "[schemavalidationrules](#schemavalidationrules)"
|
SchemaValidationRules |
HTTP Code | Description | Schema |
---|---|---|
200 | Schema is valid | No Content |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
application/json
- Schema
/groups/string/schemas/versions/validate
{
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
},
"validationRules" : {
"rules" : {
"string" : "[schemavalidationrule](#schemavalidationrule)"
}
}
}
Get the version for the schema if it is registered.
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Body |
GetSchemaVersion required |
Get schema corresponding to the version | GetSchemaVersion |
Name | Description | Schema |
---|---|---|
schemaInfo optional |
Example : "[schemainfo](#schemainfo)"
|
SchemaInfo |
HTTP Code | Description | Schema |
---|---|---|
200 | Schema version | VersionInfo |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
application/json
- Schema
/groups/string/schemas/versions/version
{
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
}
}
{
"schemaName" : "string",
"version" : 0,
"ordinal" : 0
}
Fetch the properties of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Path |
version required |
version ordinal | integer (int32) |
HTTP Code | Description | Schema |
---|---|---|
200 | Schema corresponding to the version | SchemaInfo |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Schema
/groups/string/schemas/versions/{versionOrdinal}
{
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
}
Fetch all schemas registered with the given schema name
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Path |
schemaName required |
Schema name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | Versioned history of schemas registered under the group of specified schema type | SchemaVersionsList |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Schema
/groups/string/schemas/string/versions
{
"schemas" : [ {
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
},
"version" : {
"schemaName" : "string",
"version" : 0,
"ordinal" : 0
}
} ]
}
Fetch the properties of an existing Group
Type | Name | Description | Schema |
---|---|---|---|
Path |
groupName required |
Group name | string |
Path |
schemaName required |
Schema name | string |
HTTP Code | Description | Schema |
---|---|---|
200 | Found latest schema in name | SchemaWithVersion |
404 | Group with given name not found | No Content |
500 | Internal server error while fetching Group details | No Content |
application/json
- Schema
/groups/string/schemas/string/versions/latest
{
"schemaInfo" : {
"schemaName" : "string",
"schemaType" : {
"schemaType" : "string",
"customTypeName" : "string"
},
"schemaData" : "string",
"properties" : {
"string" : "string"
}
},
"version" : {
"schemaName" : "string",
"version" : 0,
"ordinal" : 0
}
}