Class SubjectsResourceImpl
- java.lang.Object
-
- io.apicurio.registry.ccompat.rest.impl.AbstractResource
-
- io.apicurio.registry.ccompat.rest.impl.SubjectsResourceImpl
-
- All Implemented Interfaces:
SubjectsResource
@Counted(name="rest_request_count", description="Total number of REST requests.", tags={"group=REST","metric=rest_request_count"}) @ConcurrentGauge(name="concurrent_request_count", description="Number of concurrent REST requests.", tags={"group=REST","metric=concurrent_request_count"}) @Timed(name="rest_response_time", description="Time of a request-response interval.", tags={"group=REST","metric=rest_response_time"}, unit="milliseconds") public class SubjectsResourceImpl extends AbstractResource implements SubjectsResource
- Author:
- Ales Justin, Jakub Senko 'jsenko@redhat.com'
-
-
Field Summary
-
Fields inherited from class io.apicurio.registry.ccompat.rest.impl.AbstractResource
log
-
-
Constructor Summary
Constructors Constructor Description SubjectsResourceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Integer>
deleteSubject(String subject)
Deletes the specified subject and its associated compatibility level if registered.Schema
findSchemaByContent(String subject, SchemaContent request)
Check if a schema has already been registered under the specified subject.List<String>
listSubjects()
Get a list of registered subjects.
-
-
-
Method Detail
-
listSubjects
public List<String> listSubjects()
Description copied from interface:SubjectsResource
Get a list of registered subjects. Response JSON Array of Objects: name (string) – Subject Status Codes: 500 Internal Server Error – Error code 50001 – Error in the backend datastore- Specified by:
listSubjects
in interfaceSubjectsResource
-
findSchemaByContent
public Schema findSchemaByContent(String subject, SchemaContent request) throws Exception
Description copied from interface:SubjectsResource
Check if a schema has already been registered under the specified subject. If so, this returns the schema string along with its globally unique identifier, its version under this subject and the subject name. Parameters: subject (string) – Subject under which the schema will be registered Response JSON Object: subject (string) – Name of the subject that this schema is registered under globalId (int) – Globally unique identifier of the schema version (int) – Version of the returned schema schema (string) – The schema string Status Codes: 404 Not Found – Error code 40401 – Subject not found Error code 40403 – Schema not found 500 Internal Server Error – Internal server error- Specified by:
findSchemaByContent
in interfaceSubjectsResource
- Throws:
Exception
-
deleteSubject
public List<Integer> deleteSubject(String subject) throws Exception
Description copied from interface:SubjectsResource
Deletes the specified subject and its associated compatibility level if registered. It is recommended to use this API only when a topic needs to be recycled or in development environment. Parameters: subject (string) – the name of the subject Response JSON Array of Objects: version (int) – version of the schema deleted under this subject Status Codes: 404 Not Found – Error code 40401 – Subject not found 500 Internal Server Error – Error code 50001 – Error in the backend datastore- Specified by:
deleteSubject
in interfaceSubjectsResource
- Throws:
Exception
-
-