Interface GroupsResource
-
Method Summary
Modifier and TypeMethodDescriptionaddArtifactVersionComment(String groupId, String artifactId, String version, @NotNull NewComment data) Adds a new comment to the artifact version.createArtifact(String groupId, String xRegistryArtifactType, String xRegistryArtifactId, String xRegistryVersion, IfExists ifExists, Boolean canonical, String xRegistryDescription, String xRegistryDescriptionEncoded, String xRegistryName, String xRegistryNameEncoded, String xRegistryContentHash, String xRegistryHashAlgorithm, @NotNull ArtifactContent data) Creates a new artifact by posting the artifact content.createArtifact(String groupId, String xRegistryArtifactType, String xRegistryArtifactId, String xRegistryVersion, IfExists ifExists, Boolean canonical, String xRegistryDescription, String xRegistryDescriptionEncoded, String xRegistryName, String xRegistryNameEncoded, String xRegistryContentHash, String xRegistryHashAlgorithm, @NotNull InputStream data) Creates a new artifact by posting the artifact content.voidcreateArtifactRule(String groupId, String artifactId, @NotNull Rule data) Adds a rule to the list of rules that get applied to the artifact when adding new versions.createArtifactVersion(String groupId, String artifactId, String xRegistryVersion, String xRegistryName, String xRegistryDescription, String xRegistryDescriptionEncoded, String xRegistryNameEncoded, @NotNull ArtifactContent data) Creates a new version of the artifact by uploading new content.createArtifactVersion(String groupId, String artifactId, String xRegistryVersion, String xRegistryName, String xRegistryDescription, String xRegistryDescriptionEncoded, String xRegistryNameEncoded, @NotNull InputStream data) Creates a new version of the artifact by uploading new content.createGroup(@NotNull CreateGroupMetaData data) Creates a new group.voiddeleteArtifact(String groupId, String artifactId) Deletes an artifact completely, resulting in all versions of the artifact also being deleted.voiddeleteArtifactRule(String groupId, String artifactId, RuleType rule) Deletes a rule from the artifact.voiddeleteArtifactRules(String groupId, String artifactId) Deletes all of the rules configured for the artifact.voiddeleteArtifactsInGroup(String groupId) Deletes all of the artifacts that exist in a given group.voiddeleteArtifactVersion(String groupId, String artifactId, String version) Deletes a single version of the artifact.voiddeleteArtifactVersionComment(String groupId, String artifactId, String version, String commentId) Deletes a single comment in an artifact version.voiddeleteArtifactVersionMetaData(String groupId, String artifactId, String version) Deletes the user-editable metadata properties of the artifact version.voiddeleteGroupById(String groupId) Deletes a group by identifier.getArtifactMetaData(String groupId, String artifactId) Gets the metadata for an artifact in the registry, based on the latest version.getArtifactOwner(String groupId, String artifactId) Gets the owner of an artifact in the registry.getArtifactRuleConfig(String groupId, String artifactId, RuleType rule) Returns information about a single rule configured for an artifact.jakarta.ws.rs.core.ResponsegetArtifactVersion(String groupId, String artifactId, String version, HandleReferencesType references) Retrieves a single version of the artifact content.getArtifactVersionComments(String groupId, String artifactId, String version) Retrieves all comments for a version of an artifact.getArtifactVersionMetaData(String groupId, String artifactId, String version) Retrieves the metadata for a single version of the artifact.getArtifactVersionMetaDataByContent(String groupId, String artifactId, Boolean canonical, @NotNull ArtifactContent data) Gets the metadata for an artifact that matches the raw content.getArtifactVersionMetaDataByContent(String groupId, String artifactId, Boolean canonical, @NotNull InputStream data) Gets the metadata for an artifact that matches the raw content.getArtifactVersionReferences(String groupId, String artifactId, String version, ReferenceType refType) Retrieves all references for a single version of an artifact.getGroupById(String groupId) Returns a group using the specified id.jakarta.ws.rs.core.ResponsegetLatestArtifact(String groupId, String artifactId, HandleReferencesType references) Returns the latest version of the artifact in its raw form.listArtifactRules(String groupId, String artifactId) Returns a list of all rules configured for the artifact.listArtifactsInGroup(String groupId, BigInteger limit, BigInteger offset, SortOrder order, SortBy orderby) Returns a list of all artifacts in the group.listArtifactVersions(String groupId, String artifactId, BigInteger offset, BigInteger limit) Returns a list of all versions of the artifact.listGroups(BigInteger limit, BigInteger offset, SortOrder order, SortBy orderby) Returns a list of all groups.voidtestUpdateArtifact(String groupId, String artifactId, @NotNull InputStream data) Tests whether an update to the artifact's content would succeed for the provided content.updateArtifact(String groupId, String artifactId, String xRegistryVersion, String xRegistryName, String xRegistryNameEncoded, String xRegistryDescription, String xRegistryDescriptionEncoded, @NotNull ArtifactContent data) Updates an artifact by uploading new content.updateArtifact(String groupId, String artifactId, String xRegistryVersion, String xRegistryName, String xRegistryNameEncoded, String xRegistryDescription, String xRegistryDescriptionEncoded, @NotNull InputStream data) Updates an artifact by uploading new content.voidupdateArtifactMetaData(String groupId, String artifactId, @NotNull EditableMetaData data) Updates the editable parts of the artifact's metadata.voidupdateArtifactOwner(String groupId, String artifactId, @NotNull ArtifactOwner data) Changes the ownership of an artifact.updateArtifactRuleConfig(String groupId, String artifactId, RuleType rule, @NotNull Rule data) Updates the configuration of a single rule for the artifact.voidupdateArtifactState(String groupId, String artifactId, @NotNull UpdateState data) Updates the state of the artifact.voidupdateArtifactVersionComment(String groupId, String artifactId, String version, String commentId, @NotNull NewComment data) Updates the value of a single comment in an artifact version.voidupdateArtifactVersionMetaData(String groupId, String artifactId, String version, @NotNull EditableMetaData data) Updates the user-editable portion of the artifact version's metadata.voidupdateArtifactVersionState(String groupId, String artifactId, String version, @NotNull UpdateState data) Updates the state of a specific version of an artifact.
-
Method Details
-
updateArtifactState
@Path("/{groupId}/artifacts/{artifactId}/state") @PUT @Consumes("application/json") void updateArtifactState(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @NotNull @NotNull UpdateState data) Updates the state of the artifact. For example, you can use this to mark the latest version of an artifact as
DEPRECATED. The operation changes the state of the latest version of the artifact, even if this version isDISABLED. If multiple versions exist, only the most recent is changed.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
getArtifactVersionMetaData
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}/meta") @GET @Produces("application/json") VersionMetaData getArtifactVersionMetaData(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version) Retrieves the metadata for a single version of the artifact. The version metadata is a subset of the artifact metadata and only includes the metadata that is specific to the version (for example, this doesn't include
modifiedOn).This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
updateArtifactVersionMetaData
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}/meta") @PUT @Consumes("application/json") void updateArtifactVersionMetaData(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version, @NotNull @NotNull EditableMetaData data) Updates the user-editable portion of the artifact version's metadata. Only some of the metadata fields are editable by the user. For example,
descriptionis editable, butcreatedOnis not.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
deleteArtifactVersionMetaData
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}/meta") @DELETE void deleteArtifactVersionMetaData(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version) Deletes the user-editable metadata properties of the artifact version. Any properties that are not user-editable are preserved.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
getArtifactVersion
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}") @GET @Produces("*/*") jakarta.ws.rs.core.Response getArtifactVersion(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version, @QueryParam("references") HandleReferencesType references) Retrieves a single version of the artifact content. Both the
artifactIdand the uniqueversionnumber must be provided. TheContent-Typeof the response depends on the artifact type. In most cases, this isapplication/json, but for some types it may be different (for example,PROTOBUF).This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
deleteArtifactVersion
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}") @DELETE void deleteArtifactVersion(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version) Deletes a single version of the artifact. Parameters
groupId,artifactIdand the uniqueversionare needed. If this is the only version of the artifact, this operation is the same as deleting the entire artifact.This feature is disabled by default and it's discouraged for normal usage. To enable it, set the
registry.rest.artifact.deletion.enabledproperty to true. This operation can fail for the following reasons:- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - Feature is disabled (HTTP error
405) - A server error occurred (HTTP error
500)
- No artifact with this
-
updateArtifactVersionState
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}/state") @PUT @Consumes("application/json") void updateArtifactVersionState(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version, @NotNull @NotNull UpdateState data) Updates the state of a specific version of an artifact. For example, you can use this operation to disable a specific version.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
listArtifactRules
@Path("/{groupId}/artifacts/{artifactId}/rules") @GET @Produces("application/json") List<RuleType> listArtifactRules(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId) Returns a list of all rules configured for the artifact. The set of rules determines how the content of an artifact can evolve over time. If no rules are configured for an artifact, the set of globally configured rules are used. If no global rules are defined, there are no restrictions on content evolution.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
createArtifactRule
@Path("/{groupId}/artifacts/{artifactId}/rules") @POST @Consumes("application/json") void createArtifactRule(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @NotNull @NotNull Rule data) Adds a rule to the list of rules that get applied to the artifact when adding new versions. All configured rules must pass to successfully add a new artifact version.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - Rule (named in the request body) is unknown (HTTP error
400) - A server error occurred (HTTP error
500)
- No artifact with this
-
deleteArtifactRules
@Path("/{groupId}/artifacts/{artifactId}/rules") @DELETE void deleteArtifactRules(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId) Deletes all of the rules configured for the artifact. After this is done, the global rules apply to the artifact again.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
getArtifactRuleConfig
@Path("/{groupId}/artifacts/{artifactId}/rules/{rule}") @GET @Produces("application/json") Rule getArtifactRuleConfig(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("rule") RuleType rule) Returns information about a single rule configured for an artifact. This is useful when you want to know what the current configuration settings are for a specific rule.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No rule with this name/type is configured for this artifact (HTTP error
404) - Invalid rule type (HTTP error
400) - A server error occurred (HTTP error
500)
- No artifact with this
-
updateArtifactRuleConfig
@Path("/{groupId}/artifacts/{artifactId}/rules/{rule}") @PUT @Produces("application/json") @Consumes("application/json") Rule updateArtifactRuleConfig(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("rule") RuleType rule, @NotNull @NotNull Rule data) Updates the configuration of a single rule for the artifact. The configuration data is specific to each rule type, so the configuration of the
COMPATIBILITYrule is in a different format from the configuration of theVALIDITYrule.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No rule with this name/type is configured for this artifact (HTTP error
404) - Invalid rule type (HTTP error
400) - A server error occurred (HTTP error
500)
- No artifact with this
-
deleteArtifactRule
@Path("/{groupId}/artifacts/{artifactId}/rules/{rule}") @DELETE void deleteArtifactRule(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("rule") RuleType rule) Deletes a rule from the artifact. This results in the rule no longer applying for this artifact. If this is the only rule configured for the artifact, this is the same as deleting all rules, and the globally configured rules now apply to this artifact.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No rule with this name/type is configured for this artifact (HTTP error
404) - Invalid rule type (HTTP error
400) - A server error occurred (HTTP error
500)
- No artifact with this
-
getArtifactVersionReferences
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}/references") @GET @Produces("application/json") List<ArtifactReference> getArtifactVersionReferences(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version, @QueryParam("refType") ReferenceType refType) Retrieves all references for a single version of an artifact. Both the
artifactIdand the uniqueversionnumber must be provided. Using therefTypequery parameter, it is possible to retrieve an array of either the inbound or outbound references.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
getLatestArtifact
@Path("/{groupId}/artifacts/{artifactId}") @GET @Produces("*/*") jakarta.ws.rs.core.Response getLatestArtifact(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @QueryParam("references") HandleReferencesType references) Returns the latest version of the artifact in its raw form. The
Content-Typeof the response depends on the artifact type. In most cases, this isapplication/json, but for some types it may be different (for example,PROTOBUF). If the latest version of the artifact is marked asDISABLED, the next available non-disabled version will be used.This operation may fail for one of the following reasons:
- No artifact with this
artifactIdexists or all versions areDISABLED(HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
updateArtifact
@Path("/{groupId}/artifacts/{artifactId}") @PUT @Produces("application/json") @Consumes("*/*") ArtifactMetaData updateArtifact(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @HeaderParam("X-Registry-Version") String xRegistryVersion, @HeaderParam("X-Registry-Name") String xRegistryName, @HeaderParam("X-Registry-Name-Encoded") String xRegistryNameEncoded, @HeaderParam("X-Registry-Description") String xRegistryDescription, @HeaderParam("X-Registry-Description-Encoded") String xRegistryDescriptionEncoded, @NotNull @NotNull InputStream data) Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. This is typically in JSON format for most of the supported types, but may be in another format for a few (for example,
PROTOBUF). The type of the content should be compatible with the artifact's type (it would be an error to update anAVROartifact with newOPENAPIcontent, for example).The update could fail for a number of reasons including:
- Provided content (request body) was empty (HTTP error
400) - No artifact with the
artifactIdexists (HTTP error404) - The new content violates one of the rules configured for the artifact
(HTTP error
409) - A server error occurred (HTTP error
500)
When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact.
- Provided content (request body) was empty (HTTP error
-
updateArtifact
@Path("/{groupId}/artifacts/{artifactId}") @PUT @Produces("application/json") @Consumes({"application/vnd.create.extended+json","application/create.extended+json"}) ArtifactMetaData updateArtifact(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @HeaderParam("X-Registry-Version") String xRegistryVersion, @HeaderParam("X-Registry-Name") String xRegistryName, @HeaderParam("X-Registry-Name-Encoded") String xRegistryNameEncoded, @HeaderParam("X-Registry-Description") String xRegistryDescription, @HeaderParam("X-Registry-Description-Encoded") String xRegistryDescriptionEncoded, @NotNull @NotNull ArtifactContent data) Updates an artifact by uploading new content. The body of the request can be the raw content of the artifact or a JSON object containing both the raw content and a set of references to other artifacts.. This is typically in JSON format for most of the supported types, but may be in another format for a few (for example,
PROTOBUF). The type of the content should be compatible with the artifact's type (it would be an error to update anAVROartifact with newOPENAPIcontent, for example).The update could fail for a number of reasons including:
- Provided content (request body) was empty (HTTP error
400) - No artifact with the
artifactIdexists (HTTP error404) - The new content violates one of the rules configured for the artifact
(HTTP error
409) - A server error occurred (HTTP error
500)
When successful, this creates a new version of the artifact, making it the most recent (and therefore official) version of the artifact.
- Provided content (request body) was empty (HTTP error
-
deleteArtifact
@Path("/{groupId}/artifacts/{artifactId}") @DELETE void deleteArtifact(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId) Deletes an artifact completely, resulting in all versions of the artifact also being deleted. This may fail for one of the following reasons:
- No artifact with the
artifactIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with the
-
listArtifactsInGroup
@Path("/{groupId}/artifacts") @GET @Produces("application/json") ArtifactSearchResults listArtifactsInGroup(@PathParam("groupId") String groupId, @QueryParam("limit") BigInteger limit, @QueryParam("offset") BigInteger offset, @QueryParam("order") SortOrder order, @QueryParam("orderby") SortBy orderby) Returns a list of all artifacts in the group. This list is paged.
-
createArtifact
@Path("/{groupId}/artifacts") @POST @Produces("application/json") @Consumes("*/*") ArtifactMetaData createArtifact(@PathParam("groupId") String groupId, @HeaderParam("X-Registry-ArtifactType") String xRegistryArtifactType, @HeaderParam("X-Registry-ArtifactId") String xRegistryArtifactId, @HeaderParam("X-Registry-Version") String xRegistryVersion, @QueryParam("ifExists") IfExists ifExists, @QueryParam("canonical") Boolean canonical, @HeaderParam("X-Registry-Description") String xRegistryDescription, @HeaderParam("X-Registry-Description-Encoded") String xRegistryDescriptionEncoded, @HeaderParam("X-Registry-Name") String xRegistryName, @HeaderParam("X-Registry-Name-Encoded") String xRegistryNameEncoded, @HeaderParam("X-Registry-Content-Hash") String xRegistryContentHash, @HeaderParam("X-Registry-Hash-Algorithm") String xRegistryHashAlgorithm, @NotNull @NotNull InputStream data) Creates a new artifact by posting the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for most of the supported types, but may be in another format for a few (for example,
PROTOBUF).The registry attempts to figure out what kind of artifact is being added from the following supported list:
- Avro (
AVRO) - Protobuf (
PROTOBUF) - JSON Schema (
JSON) - Kafka Connect (
KCONNECT) - OpenAPI (
OPENAPI) - AsyncAPI (
ASYNCAPI) - GraphQL (
GRAPHQL) - Web Services Description Language (
WSDL) - XML Schema (
XSD)
Alternatively, you can specify the artifact type using the
X-Registry-ArtifactTypeHTTP request header, or include a hint in the request'sContent-Type. For example:Content-Type: application/json; artifactType=AVROAn artifact is created using the content provided in the body of the request. This content is created under a unique artifact ID that can be provided in the request using the
X-Registry-ArtifactIdrequest header. If not provided in the request, the server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavior is for the server to reject the content with a 409 error. However, the caller can supply the
ifExistsquery parameter to alter this default behavior. TheifExistsquery parameter can have one of the following values:FAIL(default) - server rejects the content with a 409 errorUPDATE- server updates the existing artifact and returns the new metadataRETURN- server does not create or add content to the server, but instead returns the metadata for the existing artifactRETURN_OR_UPDATE- server returns an existing version that matches the provided content if such a version exists, otherwise a new version is created
This operation may fail for one of the following reasons:
- An invalid
ArtifactTypewas indicated (HTTP error400) - No
ArtifactTypewas indicated and the server could not determine one from the content (HTTP error400) - Provided content (request body) was empty (HTTP error
400) - An artifact with the provided ID already exists (HTTP error
409) - The content violates one of the configured global rules (HTTP error
409) - A server error occurred (HTTP error
500)
- Avro (
-
createArtifact
@Path("/{groupId}/artifacts") @POST @Produces("application/json") @Consumes({"application/vnd.create.extended+json","application/create.extended+json"}) ArtifactMetaData createArtifact(@PathParam("groupId") String groupId, @HeaderParam("X-Registry-ArtifactType") String xRegistryArtifactType, @HeaderParam("X-Registry-ArtifactId") String xRegistryArtifactId, @HeaderParam("X-Registry-Version") String xRegistryVersion, @QueryParam("ifExists") IfExists ifExists, @QueryParam("canonical") Boolean canonical, @HeaderParam("X-Registry-Description") String xRegistryDescription, @HeaderParam("X-Registry-Description-Encoded") String xRegistryDescriptionEncoded, @HeaderParam("X-Registry-Name") String xRegistryName, @HeaderParam("X-Registry-Name-Encoded") String xRegistryNameEncoded, @HeaderParam("X-Registry-Content-Hash") String xRegistryContentHash, @HeaderParam("X-Registry-Hash-Algorithm") String xRegistryHashAlgorithm, @NotNull @NotNull ArtifactContent data) Creates a new artifact by posting the artifact content. The body of the request should be the raw content of the artifact. This is typically in JSON format for most of the supported types, but may be in another format for a few (for example,
PROTOBUF).The registry attempts to figure out what kind of artifact is being added from the following supported list:
- Avro (
AVRO) - Protobuf (
PROTOBUF) - JSON Schema (
JSON) - Kafka Connect (
KCONNECT) - OpenAPI (
OPENAPI) - AsyncAPI (
ASYNCAPI) - GraphQL (
GRAPHQL) - Web Services Description Language (
WSDL) - XML Schema (
XSD)
Alternatively, you can specify the artifact type using the
X-Registry-ArtifactTypeHTTP request header, or include a hint in the request'sContent-Type. For example:Content-Type: application/json; artifactType=AVROAn artifact is created using the content provided in the body of the request. This content is created under a unique artifact ID that can be provided in the request using the
X-Registry-ArtifactIdrequest header. If not provided in the request, the server generates a unique ID for the artifact. It is typically recommended that callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavior is for the server to reject the content with a 409 error. However, the caller can supply the
ifExistsquery parameter to alter this default behavior. TheifExistsquery parameter can have one of the following values:FAIL(default) - server rejects the content with a 409 errorUPDATE- server updates the existing artifact and returns the new metadataRETURN- server does not create or add content to the server, but instead returns the metadata for the existing artifactRETURN_OR_UPDATE- server returns an existing version that matches the provided content if such a version exists, otherwise a new version is created
This operation may fail for one of the following reasons:
- An invalid
ArtifactTypewas indicated (HTTP error400) - No
ArtifactTypewas indicated and the server could not determine one from the content (HTTP error400) - Provided content (request body) was empty (HTTP error
400) - An artifact with the provided ID already exists (HTTP error
409) - The content violates one of the configured global rules (HTTP error
409) - A server error occurred (HTTP error
500)
- Avro (
-
deleteArtifactsInGroup
@Path("/{groupId}/artifacts") @DELETE void deleteArtifactsInGroup(@PathParam("groupId") String groupId) Deletes all of the artifacts that exist in a given group.
-
testUpdateArtifact
@Path("/{groupId}/artifacts/{artifactId}/test") @PUT @Consumes("*/*") void testUpdateArtifact(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @NotNull @NotNull InputStream data) Tests whether an update to the artifact's content would succeed for the provided content. Ultimately, this applies any rules configured for the artifact against the given content to determine whether the rules would pass or fail, but without actually updating the artifact content.
The body of the request should be the raw content of the artifact. This is typically in JSON format for most of the supported types, but may be in another format for a few (for example,
PROTOBUF).The update could fail for a number of reasons including:
- Provided content (request body) was empty (HTTP error
400) - No artifact with the
artifactIdexists (HTTP error404) - The new content violates one of the rules configured for the artifact
(HTTP error
409) - The provided artifact type is not recognized (HTTP error
404) - A server error occurred (HTTP error
500)
When successful, this operation simply returns a No Content response. This response indicates that the content is valid against the configured content rules for the artifact (or the global rules if no artifact rules are enabled).
- Provided content (request body) was empty (HTTP error
-
listArtifactVersions
@Path("/{groupId}/artifacts/{artifactId}/versions") @GET @Produces("application/json") VersionSearchResults listArtifactVersions(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @QueryParam("offset") BigInteger offset, @QueryParam("limit") BigInteger limit) Returns a list of all versions of the artifact. The result set is paged.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
createArtifactVersion
@Path("/{groupId}/artifacts/{artifactId}/versions") @POST @Produces("application/json") @Consumes("*/*") VersionMetaData createArtifactVersion(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @HeaderParam("X-Registry-Version") String xRegistryVersion, @HeaderParam("X-Registry-Name") String xRegistryName, @HeaderParam("X-Registry-Description") String xRegistryDescription, @HeaderParam("X-Registry-Description-Encoded") String xRegistryDescriptionEncoded, @HeaderParam("X-Registry-Name-Encoded") String xRegistryNameEncoded, @NotNull @NotNull InputStream data) Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.
The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact's type (for example if the artifact type is
AVROthen the content of the request should be an Apache Avro document).This operation can fail for the following reasons:
- Provided content (request body) was empty (HTTP error
400) - No artifact with this
artifactIdexists (HTTP error404) - The new content violates one of the rules configured for the artifact
(HTTP error
409) - A server error occurred (HTTP error
500)
- Provided content (request body) was empty (HTTP error
-
createArtifactVersion
@Path("/{groupId}/artifacts/{artifactId}/versions") @POST @Produces("application/json") @Consumes({"application/vnd.create.extended+json","application/create.extended+json"}) VersionMetaData createArtifactVersion(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @HeaderParam("X-Registry-Version") String xRegistryVersion, @HeaderParam("X-Registry-Name") String xRegistryName, @HeaderParam("X-Registry-Description") String xRegistryDescription, @HeaderParam("X-Registry-Description-Encoded") String xRegistryDescriptionEncoded, @HeaderParam("X-Registry-Name-Encoded") String xRegistryNameEncoded, @NotNull @NotNull ArtifactContent data) Creates a new version of the artifact by uploading new content. The configured rules for the artifact are applied, and if they all pass, the new content is added as the most recent version of the artifact. If any of the rules fail, an error is returned.
The body of the request can be the raw content of the new artifact version, or the raw content and a set of references pointing to other artifacts, and the type of that content should match the artifact's type (for example if the artifact type is
AVROthen the content of the request should be an Apache Avro document).This operation can fail for the following reasons:
- Provided content (request body) was empty (HTTP error
400) - No artifact with this
artifactIdexists (HTTP error404) - The new content violates one of the rules configured for the artifact
(HTTP error
409) - A server error occurred (HTTP error
500)
- Provided content (request body) was empty (HTTP error
-
getArtifactOwner
@Path("/{groupId}/artifacts/{artifactId}/owner") @GET @Produces("application/json") ArtifactOwner getArtifactOwner(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId) Gets the owner of an artifact in the registry.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
updateArtifactOwner
@Path("/{groupId}/artifacts/{artifactId}/owner") @PUT @Consumes("application/json") void updateArtifactOwner(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @NotNull @NotNull ArtifactOwner data) Changes the ownership of an artifact.
This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
getGroupById
@Path("/{groupId}") @GET @Produces("application/json") GroupMetaData getGroupById(@PathParam("groupId") String groupId) Returns a group using the specified id.
This operation can fail for the following reasons:
- No group exists with the specified ID (HTTP error
404) - A server error occurred (HTTP error
500)
- No group exists with the specified ID (HTTP error
-
deleteGroupById
Deletes a group by identifier.
This operation can fail for the following reasons:
- A server error occurred (HTTP error
500) - The group does not exist (HTTP error
404)
- A server error occurred (HTTP error
-
listGroups
@GET @Produces("application/json") GroupSearchResults listGroups(@QueryParam("limit") BigInteger limit, @QueryParam("offset") BigInteger offset, @QueryParam("order") SortOrder order, @QueryParam("orderby") SortBy orderby) Returns a list of all groups. This list is paged.
-
createGroup
@POST @Produces("application/json") @Consumes("application/json") GroupMetaData createGroup(@NotNull @NotNull CreateGroupMetaData data) Creates a new group.
This operation can fail for the following reasons:
- A server error occurred (HTTP error
500) - The group already exist (HTTP error
409)
- A server error occurred (HTTP error
-
getArtifactMetaData
@Path("/{groupId}/artifacts/{artifactId}/meta") @GET @Produces("application/json") ArtifactMetaData getArtifactMetaData(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId) Gets the metadata for an artifact in the registry, based on the latest version. If the latest version of the artifact is marked as
DISABLED, the next available non-disabled version will be used. The returned metadata includes both generated (read-only) and editable metadata (such as name and description).This operation can fail for the following reasons:
- No artifact with this
artifactIdexists or all versions areDISABLED(HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
updateArtifactMetaData
@Path("/{groupId}/artifacts/{artifactId}/meta") @PUT @Consumes("application/json") void updateArtifactMetaData(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @NotNull @NotNull EditableMetaData data) Updates the editable parts of the artifact's metadata. Not all metadata fields can be updated. For example,
createdOnandcreatedByare both read-only properties.This operation can fail for the following reasons:
- No artifact with the
artifactIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with the
-
getArtifactVersionMetaDataByContent
@Path("/{groupId}/artifacts/{artifactId}/meta") @POST @Produces("application/json") @Consumes("*/*") VersionMetaData getArtifactVersionMetaDataByContent(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @QueryParam("canonical") Boolean canonical, @NotNull @NotNull InputStream data) Gets the metadata for an artifact that matches the raw content. Searches the registry for a version of the given artifact matching the content provided in the body of the POST.
This operation can fail for the following reasons:
- Provided content (request body) was empty (HTTP error
400) - No artifact with the
artifactIdexists (HTTP error404) - No artifact version matching the provided content exists (HTTP error
404) - A server error occurred (HTTP error
500)
- Provided content (request body) was empty (HTTP error
-
getArtifactVersionMetaDataByContent
@Path("/{groupId}/artifacts/{artifactId}/meta") @POST @Produces("application/json") @Consumes({"application/vnd.get.extended+json","application/get.extended+json"}) VersionMetaData getArtifactVersionMetaDataByContent(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @QueryParam("canonical") Boolean canonical, @NotNull @NotNull ArtifactContent data) Gets the metadata for an artifact that matches the raw content. Searches the registry for a version of the given artifact matching the content provided in the body of the POST.
This operation can fail for the following reasons:
- Provided content (request body) was empty (HTTP error
400) - No artifact with the
artifactIdexists (HTTP error404) - No artifact version matching the provided content exists (HTTP error
404) - A server error occurred (HTTP error
500)
- Provided content (request body) was empty (HTTP error
-
getArtifactVersionComments
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}/comments") @GET @Produces("application/json") List<Comment> getArtifactVersionComments(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version) Retrieves all comments for a version of an artifact. Both the
artifactIdand the uniqueversionnumber must be provided.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
addArtifactVersionComment
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}/comments") @POST @Produces("application/json") @Consumes("application/json") Comment addArtifactVersionComment(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version, @NotNull @NotNull NewComment data) Adds a new comment to the artifact version. Both the
artifactIdand the uniqueversionnumber must be provided.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
updateArtifactVersionComment
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}/comments/{commentId}") @PUT @Consumes("application/json") void updateArtifactVersionComment(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version, @PathParam("commentId") String commentId, @NotNull @NotNull NewComment data) Updates the value of a single comment in an artifact version. Only the owner of the comment can modify it. The
artifactId, uniqueversionnumber, andcommentIdmust be provided.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - No comment with this
commentIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
deleteArtifactVersionComment
@Path("/{groupId}/artifacts/{artifactId}/versions/{version}/comments/{commentId}") @DELETE void deleteArtifactVersionComment(@PathParam("groupId") String groupId, @PathParam("artifactId") String artifactId, @PathParam("version") String version, @PathParam("commentId") String commentId) Deletes a single comment in an artifact version. Only the owner of the comment can delete it. The
artifactId, uniqueversionnumber, andcommentIdmust be provided.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - No comment with this
commentIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-