Interface SchemagroupsResource

  • All Known Implementing Classes:
    SchemagroupsResourceImpl

    @Path("/cncf/v0/schemagroups")
    public interface SchemagroupsResource
    A JAX-RS interface. An implementation of this interface must be provided.
    • Method Detail

      • getGroups

        @GET
        @Produces("application/json")
        List<String> getGroups()
        Get all schema groups in namespace.
      • getGroup

        @Path("/{group-id}")
        @GET
        @Produces("application/json")
        SchemaGroup getGroup​(@PathParam("group-id")
                             String groupId)
        Get schema group description in registry namespace.
      • createGroup

        @Path("/{group-id}")
        @PUT
        @Consumes("application/json")
        void createGroup​(@PathParam("group-id")
                         String groupId,
                         SchemaGroup data)
        Create schema group with specified format in registry namespace.
      • deleteGroup

        @Path("/{group-id}")
        @DELETE
        void deleteGroup​(@PathParam("group-id")
                         String groupId)
        Delete schema group in schema registry namespace.
      • getSchemasByGroup

        @Path("/{group-id}/schemas")
        @GET
        @Produces("application/json")
        List<String> getSchemasByGroup​(@PathParam("group-id")
                                       String groupId)
        Returns schema by group id.
      • deleteSchemasByGroup

        @Path("/{group-id}/schemas")
        @DELETE
        void deleteSchemasByGroup​(@PathParam("group-id")
                                  String groupId)
        Deletes all schemas under specified group id.
      • getLatestSchema

        @Path("/{group-id}/schemas/{schema-id}")
        @GET
        @Produces("application/json;format=avro")
        javax.ws.rs.core.Response getLatestSchema​(@PathParam("group-id")
                                                  String groupId,
                                                  @PathParam("schema-id")
                                                  String schemaId)
        Get latest version of schema.
      • createSchema

        @Path("/{group-id}/schemas/{schema-id}")
        @POST
        @Produces({"application/json;format=avro","application/json;format=protobuf"})
        @Consumes("application/json;format=avro")
        CompletionStage<SchemaId> createSchema​(@PathParam("group-id")
                                               String groupId,
                                               @PathParam("schema-id")
                                               String schemaId,
                                               InputStream data)
        Register schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. If schema with identical content already exists, existing schema's ID is returned.
      • deleteSchema

        @Path("/{group-id}/schemas/{schema-id}")
        @DELETE
        void deleteSchema​(@PathParam("group-id")
                          String groupId,
                          @PathParam("schema-id")
                          String schemaId)
      • getSchemaVersions

        @Path("/{group-id}/schemas/{schema-id}/versions")
        @GET
        @Produces("application/json;format=avro")
        List<Integer> getSchemaVersions​(@PathParam("group-id")
                                        String groupId,
                                        @PathParam("schema-id")
                                        String schemaId)
        Get list of versions for specified schema
      • getSchemaVersion

        @Path("/{group-id}/schemas/{schema-id}/versions/{version-number}")
        @GET
        @Produces("application/json;format=avro")
        javax.ws.rs.core.Response getSchemaVersion​(@PathParam("group-id")
                                                   String groupId,
                                                   @PathParam("schema-id")
                                                   String schemaId,
                                                   @PathParam("version-number")
                                                   Integer versionNumber)
      • deleteSchemaVersion

        @Path("/{group-id}/schemas/{schema-id}/versions/{version-number}")
        @DELETE
        void deleteSchemaVersion​(@PathParam("group-id")
                                 String groupId,
                                 @PathParam("schema-id")
                                 String schemaId,
                                 @PathParam("version-number")
                                 Integer versionNumber)