List schema IDs
GET /artifacts
Returns an array containing the schema IDs of all of the schemas that are stored in the registry.
Request
Response
200 - The list schema IDs request was successful. The response body is a JSON array containing a list of schema IDs.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Create a new schema
POST /artifacts
Create a new schema and populate it with an initial schema version containing the AVRO document in the request body.
Request
Request Body
avroSchema
The AVRO schema to use as the first version of this new schema.
schema
object
The AVRO schema
Path Parameters
Query Parameters
Response
200 - The schema was successfully created. Information about the newly created schema is included in the response body.
createdOn
integer
Creation timestamp of the schema in UNIX epoc format.
globalId
integer
Globally unique ID assigned to the initial version of the schema.
id
string
The ID of the schema. This is either taken from the `X-Registry-ArtifactId` header when the request is made to create the schema or is an automatically assigned UUID value.
modifiedOn
integer
Last modification timestamp of the schema in UNIX epoc format.
type
string
Type of the schema. Always the string `AVRO`.
version
integer
Version number assigned to this version of the schema.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
409 - A schema with the specified schema ID already exists.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Get the latest version of a schema
GET /artifacts/{id}
Retrieves the lastest version of the specified schema.
Request
Path Parameters
id
Required *
string
The ID of a schema.
Query Parameters
Response
200 - The latest version of the schema was successfully retrieved. This schema version is included in the response body.
schema
object
The AVRO schema
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - The registry does not contain a schema with the specified schema ID.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Delete a schema
DELETE /artifacts/{id}
Deletes a schema and all of its versions from the schema registry.
Request
Path Parameters
id
Required *
string
The ID of the schema to delete.
Query Parameters
Response
204 - The schema was successfully deleted from the registry.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - The registry does not contain a schema with the specified schema ID.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Update a schema
PUT /artifacts/{id}
Updates a schema
Request
Request Body
avroSchema
The AVRO schema to update
schema
object
The AVRO schema
Path Parameters
id
Required *
string
The ID of the schema to update.
Query Parameters
Response
200 - The schema was successfully updated
createdOn
integer
Creation timestamp of the schema in UNIX epoc format.
globalId
integer
Globally unique ID assigned to the initial version of the schema.
id
string
The ID of the schema. This is either taken from the `X-Registry-ArtifactId` header when the request is made to create the schema or is an automatically assigned UUID value.
modifiedOn
integer
Last modification timestamp of the schema in UNIX epoc format.
type
string
Type of the schema. Always the string `AVRO`.
version
integer
Version number assigned to this version of the schema.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - The registry does not contain a schema with the specified schema ID.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
List the versions of a schema
GET /artifacts/{id}/versions
Returns an array containing the version numbers of all of the versions of the specified schema.
Request
Path Parameters
id
Required *
string
The schema ID for which the list of versions will be returned.
Query Parameters
Response
200 - The request to list the versions of a schema was successful. The body of the response contains an array of schema version numbers.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - The registry does not contain a schema with the specified schema ID.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Create a new schema version
POST /artifacts/{id}/versions
Creates a new version of a schema using the AVRO schema supplied in the request body.
Request
Request Body
avroSchema
The AVRO schema to use for the new schema version.
schema
object
The AVRO schema
Path Parameters
id
Required *
string
A schema ID. This identifies the schema for which a new version will be created.
Query Parameters
Response
200 - The new schema version was successfully created. Information about the newly created schema is returned in the response body.
createdOn
integer
Creation timestamp of the schema in UNIX epoc format.
globalId
integer
Globally unique ID assigned to the initial version of the schema.
id
string
The ID of the schema. This is either taken from the `X-Registry-ArtifactId` header when the request is made to create the schema or is an automatically assigned UUID value.
modifiedOn
integer
Last modification timestamp of the schema in UNIX epoc format.
type
string
Type of the schema. Always the string `AVRO`.
version
integer
Version number assigned to this version of the schema.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - The registry does not contain a schema with the specified schema ID.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
409 - Either the schema already has the maximum number of permitted versions, or creating a new schema version would fail the required compatibility checks based on existing versions of the schema. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Get a version of the schema
GET /artifacts/{id}/versions/{version}
Retrieve a particular version of the schema.
Request
Path Parameters
id
Required *
string
The schema ID identifying which schema to return a version from.
version
Required *
integer
The version number that identifies the particular schema version to return.
Query Parameters
Response
200 - The AVRO schema corresponding to the requested schema version.
schema
object
The AVRO schema
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - Either the registry does not contain a schema with the specified schema ID, or the schema identified by the schema ID does not contain a version corresponding to the specified version number.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Delete a version of the schema
DELETE /artifacts/{id}/versions/{version}
Delete a version of the schema. If this was the only version of the schema then the whole schema will be deleted.
Request
Path Parameters
id
Required *
string
A schema ID that identifies the schema to delete a version from.
version
Required *
integer
The schema version number to delete.
Query Parameters
Response
204 - The schema version was successfully deleted.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - Either the registry does not contain a schema with the specified schema ID, or the schema identified by the schema ID does not contain a version corresponding to the specified version number.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Create a schema rule
POST /artifacts/{id}/rules
Create a new rule that controls compatibility checks for a particular schema. Schema rules override the registries global compatibility rule setting.
Request
Request Body
rule
A JSON object representing the schema rule to create.
type
Required *
string
The type of the rule. Currently only one type is supported (`COMPATIBILITY`).
config
Required *
object
The configuration value for the rule. Which values are valid depends on the value of this object's `type` property.
Path Parameters
id
Required *
string
The ID of the schema that the rule is to be associated with.
Query Parameters
Response
200 - The schema rule was created successfully. The value of the schema rule is returned in the body of the response.
type
string
The type of the rule. Currently only one type is supported (`COMPATIBILITY`).
config
object
The configuration value for the rule. Which values are valid depends on the value of this object's `type` property.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - The registry does not contain a schema with the specified schema ID.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
409 - A schema rule with the same type already exists for this schema. Use the REST request that specifies the `PUT` verb to a path of `/artifacts/{id}/rules/{rule}` to update the rule.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Get a schema rule configuration
GET /artifacts/{id}/rules/{rule}
Retrieves the current configuration for a schema rule. If a schema rule exists then it overrides the corresponding global rule that would otherwise be applied.
Request
Path Parameters
id
Required *
string
The ID of the schema to retrieve the rule for.
rule
Required *
string
The type of rule to retrieve. Currently only the value that can be specified is `COMPATIBILITY`.
Query Parameters
Response
200 - The schema rule was successfully retrieved. The value of the schema rule is returned in the body of the response.
type
string
The type of the rule. Currently only one type is supported (`COMPATIBILITY`).
config
object
The configuration value for the rule. Which values are valid depends on the value of this object's `type` property.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - Either the registry does not contain a schema with the specified schema ID, or the schema is not configured with the specified type of rule.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Update the configuration of a schema rule.
PUT /artifacts/{id}/rules/{rule}
Updates the configuration of an existing schema rule. The updated rule will be applied to the specified schema, overriding the value set for the corresponding global rule.
Request
Request Body
rule
A JSON object representing the updated values to use for the schema rule.
type
Required *
string
The type of the rule. Currently only one type is supported (`COMPATIBILITY`).
config
Required *
object
The configuration value for the rule. Which values are valid depends on the value of this object's `type` property.
Path Parameters
id
Required *
string
The ID of the schema for which to update the rule configuration.
rule
Required *
string
The type of rule to update. Currently only the value that can be specified is `COMPATIBILITY`.
Query Parameters
Response
200 - The schema rule was successfully retrieved. The value of the schema rule is returned in the body of the response.
type
string
The type of the rule. Currently only one type is supported (`COMPATIBILITY`).
config
object
The configuration value for the rule. Which values are valid depends on the value of this object's `type` property.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
409 - This schema does not have a rule of the specified type. Use the REST request that specifies the `POST` verb to a path of `/artifacts/{id}/rules` to create a schema rule.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Delete a schema rule
DELETE /artifacts/{id}/rules/{rule}
Delete a rule that controls compatibility checks for a particular schema. After this operation completes the schema will be subject to compatibility checking defined by the global compatibility rule setting for the registry.
Request
Path Parameters
id
Required *
string
The ID of the schema that the rule is to be deleted from.
rule
Required *
string
The type of rule to delete. Currently only the value that can be specified is `COMPATIBILITY`.
Query Parameters
Response
204 - The schema rule was successfully deleted.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
404 - Either the registry does not contain a schema with the specified schema ID, or the schema is not configured with the specified type of rule.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Retrieve the configuration for a global rule.
GET /rules/{rule}
Retrieves the configuration for the specified global rule. The value of the global rule is used as the default when a schema does not have a corresponding schema compatibility rule defined.
Request
Path Parameters
rule
Required *
string
The type of the global rule to retrieve. Currently only `COMPATIBILITY` is supported.
Query Parameters
Response
200 - The global rule was successfully retrieved. The value of the global rule is returned in the body of the response.
type
string
The type of the rule. Currently only one type is supported (`COMPATIBILITY`).
config
object
The configuration value for the rule. Which values are valid depends on the value of this object's `type` property.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
Update the configuration for a global rule
PUT /rules/{rule}
Update the configuration for the specified global rule. The value of the global rule is used as the default when a schema does not have a corresponding schema compatibility rule defined.
Request
Request Body
rule
A JSON object representing the schema rule to update.
type
Required *
string
The type of the rule. Currently only one type is supported (`COMPATIBILITY`).
config
Required *
object
The configuration value for the rule. Which values are valid depends on the value of this object's `type` property.
Path Parameters
rule
Required *
string
The type of the global rule to update. Currently only `COMPATIBILITY` is supported.
Query Parameters
Response
200 - The global rule was successfully updated. The new value for the global rule is returned in the body of the response.
type
string
The type of the rule. Currently only one type is supported (`COMPATIBILITY`).
config
object
The configuration value for the rule. Which values are valid depends on the value of this object's `type` property.
400 - The request was not valid. Consult the error information returned in the response body for details.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.
403 - The client is not authorized to perform this request.
error_code
integer
HTTP Status code of the response.
message
string
Error message.
incident
string
Optional incident ID. IBM support can use this to correlate the error response with the underlying cause.