Interface GroupsResource
-
Method Summary
Modifier and TypeMethodDescriptionaddArtifactVersionComment(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression, @NotNull NewComment data) Adds a new comment to the artifact version.voidaddVersionToBranch(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId, @NotNull AddVersionToBranch data) Add a new version to an artifact branch.createArtifact(@Pattern(regexp="^.{1,512}$") String groupId, IfArtifactExists ifExists, Boolean canonical, Boolean dryRun, @NotNull CreateArtifact data) Creates a new artifact.voidcreateArtifactRule(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, @NotNull CreateRule data) Adds a rule to the list of rules that get applied to the artifact when adding new versions.createArtifactVersion(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, Boolean dryRun, @NotNull CreateVersion data) Creates a new version of the artifact by uploading new content.createBranch(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, @NotNull CreateBranch data) Creates a new branch for the artifact.createGroup(@NotNull CreateGroup data) Creates a new group.voidcreateGroupRule(@Pattern(regexp="^.{1,512}$") String groupId, @NotNull CreateRule data) Adds a rule to the list of rules that get applied to an artifact in the group when adding new versions.voiddeleteArtifact(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId) Deletes an artifact completely, resulting in all versions of the artifact also being deleted.voiddeleteArtifactRule(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, RuleType ruleType) Deletes a rule from the artifact.voiddeleteArtifactRules(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId) Deletes all of the rules configured for the artifact.voiddeleteArtifactsInGroup(@Pattern(regexp="^.{1,512}$") String groupId) Deletes all of the artifacts that exist in a given group.voiddeleteArtifactVersion(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression) Deletes a single version of the artifact.voiddeleteArtifactVersionComment(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression, String commentId) Deletes a single comment in an artifact version.voiddeleteBranch(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId) Deletes a single branch in the artifact.voiddeleteGroupById(@Pattern(regexp="^.{1,512}$") String groupId) Deletes a group by identifier.voiddeleteGroupRule(@Pattern(regexp="^.{1,512}$") String groupId, RuleType ruleType) Deletes a rule from the group.voiddeleteGroupRules(@Pattern(regexp="^.{1,512}$") String groupId) Deletes all of the rules configured for the group.getArtifactMetaData(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId) Gets the metadata for an artifact in the registry, based on the latest version.getArtifactRuleConfig(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, RuleType ruleType) Returns information about a single rule configured for an artifact.getArtifactVersionComments(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression) Retrieves all comments for a version of an artifact.jakarta.ws.rs.core.ResponsegetArtifactVersionContent(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression, HandleReferencesType references) Retrieves a single version of the artifact content.getArtifactVersionMetaData(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression) Retrieves the metadata for a single version of the artifact.getArtifactVersionReferences(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression, ReferenceType refType) Retrieves all references for a single version of an artifact.getArtifactVersionState(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression) Gets the current state of an artifact version.getBranchMetaData(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId) Returns the metaData of a branch.getGroupById(@Pattern(regexp="^.{1,512}$") String groupId) Returns a group using the specified id.getGroupRuleConfig(@Pattern(regexp="^.{1,512}$") String groupId, RuleType ruleType) Returns information about a single rule configured for a group.listArtifactRules(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId) Returns a list of all rules configured for the artifact.listArtifactsInGroup(@Pattern(regexp="^.{1,512}$") String groupId, BigInteger limit, BigInteger offset, SortOrder order, ArtifactSortBy orderby) Returns a list of all artifacts in the group.listArtifactVersions(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, BigInteger offset, BigInteger limit, SortOrder order, VersionSortBy orderby) Returns a list of all versions of the artifact.listBranches(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, BigInteger offset, BigInteger limit) Returns a list of all branches in the artifact.listBranchVersions(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId, BigInteger offset, BigInteger limit) Get a list of all versions in the branch.listGroupRules(@Pattern(regexp="^.{1,512}$") String groupId) Returns a list of all rules configured for the group.listGroups(BigInteger limit, BigInteger offset, SortOrder order, GroupSortBy orderby) Returns a list of all groups.voidreplaceBranchVersions(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId, @NotNull ReplaceBranchVersions data) Add a new version to an artifact branch.voidupdateArtifactMetaData(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, @NotNull EditableArtifactMetaData data) Updates the editable parts of the artifact's metadata.updateArtifactRuleConfig(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, RuleType ruleType, @NotNull Rule data) Updates the configuration of a single rule for the artifact.voidupdateArtifactVersionComment(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression, String commentId, @NotNull NewComment data) Updates the value of a single comment in an artifact version.voidupdateArtifactVersionContent(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression, @NotNull VersionContent data) Updates the content of a single version of an artifact.voidupdateArtifactVersionMetaData(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression, @NotNull EditableVersionMetaData data) Updates the user-editable portion of the artifact version's metadata.voidupdateArtifactVersionState(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, String versionExpression, Boolean dryRun, @NotNull WrappedVersionState data) Updates the state of an artifact version.voidupdateBranchMetaData(@Pattern(regexp="^.{1,512}$") String groupId, @Pattern(regexp="^.{1,512}$") String artifactId, @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId, @NotNull EditableBranchMetaData data) Updates the metadata of a branch.voidupdateGroupById(@Pattern(regexp="^.{1,512}$") String groupId, @NotNull EditableGroupMetaData data) Updates the metadata of a group using the specified id.updateGroupRuleConfig(@Pattern(regexp="^.{1,512}$") String groupId, RuleType ruleType, @NotNull Rule data) Updates the configuration of a single rule for the group.
-
Method Details
-
getArtifactVersionMetaData
@Path("/{groupId}/artifacts/{artifactId}/versions/{versionExpression}") @GET @Produces("application/json") VersionMetaData getArtifactVersionMetaData(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression) 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/{versionExpression}") @PUT @Consumes("application/json") void updateArtifactVersionMetaData(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression, @NotNull @NotNull EditableVersionMetaData 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
-
deleteArtifactVersion
@Path("/{groupId}/artifacts/{artifactId}/versions/{versionExpression}") @DELETE void deleteArtifactVersion(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression) 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
-
listArtifactRules
@Path("/{groupId}/artifacts/{artifactId}/rules") @GET @Produces("application/json") List<RuleType> listArtifactRules(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") 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, then the rules configured for the group is used. If no rules are configured at the group level, then 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") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @NotNull @NotNull CreateRule 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) - Rule is already configured (HTTP error
409) - A server error occurred (HTTP error
500)
- No artifact with this
-
deleteArtifactRules
@Path("/{groupId}/artifacts/{artifactId}/rules") @DELETE void deleteArtifactRules(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") 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/{ruleType}") @GET @Produces("application/json") Rule getArtifactRuleConfig(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("ruleType") RuleType ruleType) 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/{ruleType}") @PUT @Produces("application/json") @Consumes("application/json") Rule updateArtifactRuleConfig(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("ruleType") RuleType ruleType, @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/{ruleType}") @DELETE void deleteArtifactRule(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("ruleType") RuleType ruleType) 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/{versionExpression}/references") @GET @Produces("application/json") List<ArtifactReference> getArtifactVersionReferences(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression, @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
-
listArtifactsInGroup
@Path("/{groupId}/artifacts") @GET @Produces("application/json") ArtifactSearchResults listArtifactsInGroup(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @QueryParam("limit") BigInteger limit, @QueryParam("offset") BigInteger offset, @QueryParam("order") SortOrder order, @QueryParam("orderby") ArtifactSortBy orderby) Returns a list of all artifacts in the group. This list is paged.
-
createArtifact
@Path("/{groupId}/artifacts") @POST @Produces("application/json") @Consumes("application/json") CreateArtifactResponse createArtifact(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @QueryParam("ifExists") IfArtifactExists ifExists, @QueryParam("canonical") Boolean canonical, @QueryParam("dryRun") Boolean dryRun, @NotNull @NotNull CreateArtifact data) Creates a new artifact. The body of the request should be a
CreateArtifactobject, which includes the metadata of the new artifact and, optionally, the metadata and content of the first version.If the artifact type is not provided, 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)
An artifact will be created using the unique artifact ID that can optionally be provided in the request body. If not provided in the request, the server will generate a unique ID for the artifact. It is typically recommended that callers provide the ID, because it is typically a meaningful identifier, and as such 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 invalid version number was used for the optional included first
version (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)
Note that if the
dryRunquery parameter is set totrue, then this operation will not actually make any changes. Instead it will succeed or fail based on whether it would have worked. Use this option to, for example, check if an artifact is valid or if a new version passes configured compatibility checks. - Avro (
-
deleteArtifactsInGroup
@Path("/{groupId}/artifacts") @DELETE void deleteArtifactsInGroup(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId) Deletes all of the artifacts that exist in a given group.
-
listGroups
@GET @Produces("application/json") GroupSearchResults listGroups(@QueryParam("limit") BigInteger limit, @QueryParam("offset") BigInteger offset, @QueryParam("order") SortOrder order, @QueryParam("orderby") GroupSortBy orderby) Returns a list of all groups. This list is paged.
-
createGroup
@POST @Produces("application/json") @Consumes("application/json") GroupMetaData createGroup(@NotNull @NotNull CreateGroup 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
-
getArtifactVersionComments
@Path("/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/comments") @GET @Produces("application/json") List<Comment> getArtifactVersionComments(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression) 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/{versionExpression}/comments") @POST @Produces("application/json") @Consumes("application/json") Comment addArtifactVersionComment(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression, @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/{versionExpression}/comments/{commentId}") @PUT @Consumes("application/json") void updateArtifactVersionComment(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression, @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/{versionExpression}/comments/{commentId}") @DELETE void deleteArtifactVersionComment(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression, @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
-
listBranches
@Path("/{groupId}/artifacts/{artifactId}/branches") @GET @Produces("application/json") BranchSearchResults listBranches(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @QueryParam("offset") BigInteger offset, @QueryParam("limit") BigInteger limit) Returns a list of all branches in the artifact. Each branch is a list of version identifiers, ordered from the latest (tip of the branch) to the oldest.
This operation can fail for the following reasons:
- No artifact with this
groupIdandartifactIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
createBranch
@Path("/{groupId}/artifacts/{artifactId}/branches") @POST @Produces("application/json") @Consumes("application/json") BranchMetaData createBranch(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @NotNull @NotNull CreateBranch data) Creates a new branch for the artifact. A new branch consists of metadata and a list of versions.
This operation can fail for the following reasons:
- No artifact with this
groupIdandartifactIdexists (HTTP error404) - A branch with the given
branchIdalready exists (HTTP error409) - A server error occurred (HTTP error
500)
- No artifact with this
-
listArtifactVersions
@Path("/{groupId}/artifacts/{artifactId}/versions") @GET @Produces("application/json") VersionSearchResults listArtifactVersions(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @QueryParam("offset") BigInteger offset, @QueryParam("limit") BigInteger limit, @QueryParam("order") SortOrder order, @QueryParam("orderby") VersionSortBy orderby) 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("application/json") VersionMetaData createArtifactVersion(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @QueryParam("dryRun") Boolean dryRun, @NotNull @NotNull CreateVersion 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) - An invalid version number was provided (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
-
getBranchMetaData
@Path("/{groupId}/artifacts/{artifactId}/branches/{branchId}") @GET @Produces("application/json") BranchMetaData getBranchMetaData(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("branchId") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId) Returns the metaData of a branch.
This operation can fail for the following reasons:
- No artifact with this
groupIdandartifactIdexists (HTTP error404) - No branch with this
branchIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
updateBranchMetaData
@Path("/{groupId}/artifacts/{artifactId}/branches/{branchId}") @PUT @Consumes("application/json") void updateBranchMetaData(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("branchId") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId, @NotNull @NotNull EditableBranchMetaData data) Updates the metadata of a branch.
This operation can fail for the following reasons:
- No artifact with this
groupIdandartifactIdexists (HTTP error404) - No branch with this
branchIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
deleteBranch
@Path("/{groupId}/artifacts/{artifactId}/branches/{branchId}") @DELETE void deleteBranch(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("branchId") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId) Deletes a single branch in the artifact.
This operation can fail for the following reasons:
- No artifact with this
groupIdandartifactIdexists (HTTP error404) - No branch with this
branchIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
getGroupById
@Path("/{groupId}") @GET @Produces("application/json") GroupMetaData getGroupById(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") 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
-
updateGroupById
@Path("/{groupId}") @PUT @Consumes("application/json") void updateGroupById(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @NotNull @NotNull EditableGroupMetaData data) Updates the metadata of 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
@Path("/{groupId}") @DELETE void deleteGroupById(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId) Deletes a group by identifier. This operation also deletes all artifacts within the group, so should be used very carefully.
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
-
getArtifactMetaData
@Path("/{groupId}/artifacts/{artifactId}") @GET @Produces("application/json") ArtifactMetaData getArtifactMetaData(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") 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}") @PUT @Consumes("application/json") void updateArtifactMetaData(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @NotNull @NotNull EditableArtifactMetaData data) Updates the editable parts of the artifact's metadata. Not all metadata fields can be updated. Note that only the properties included will be updated. You can update only the name by including only the
nameproperty in the payload of the request. Properties that are allowed but not present will result in the artifact's metadata not being changed.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
-
deleteArtifact
@Path("/{groupId}/artifacts/{artifactId}") @DELETE void deleteArtifact(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") 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
-
getArtifactVersionContent
@Path("/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/content") @GET @Produces("*/*") jakarta.ws.rs.core.Response getArtifactVersionContent(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression, @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
-
updateArtifactVersionContent
@Path("/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/content") @PUT @Consumes("application/json") void updateArtifactVersionContent(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression, @NotNull @NotNull VersionContent data) Updates the content of a single version of an artifact.
NOTE: the artifact must be in
DRAFTstatus.Both the
artifactIdand the uniqueversionnumber must be provided to identify the version to update.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - Artifact version not in
DRAFTstatus (HTTP error409) - A server error occurred (HTTP error
500)
- No artifact with this
-
listBranchVersions
@Path("/{groupId}/artifacts/{artifactId}/branches/{branchId}/versions") @GET @Produces("application/json") VersionSearchResults listBranchVersions(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("branchId") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId, @QueryParam("offset") BigInteger offset, @QueryParam("limit") BigInteger limit) Get a list of all versions in the branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.
This operation can fail for the following reasons:
- No artifact with this
groupIdandartifactIdexists (HTTP error404) - No branch with this
branchIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
replaceBranchVersions
@Path("/{groupId}/artifacts/{artifactId}/branches/{branchId}/versions") @PUT @Consumes("application/json") void replaceBranchVersions(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("branchId") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId, @NotNull @NotNull ReplaceBranchVersions data) Add a new version to an artifact branch. Branch is created if it does not exist. Returns a list of version identifiers in the artifact branch, ordered from the latest (tip of the branch) to the oldest. This operation can fail for the following reasons:
- No artifact with this
groupIdandartifactIdexists (HTTP error404) - No branch with this
branchIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No artifact with this
-
addVersionToBranch
@Path("/{groupId}/artifacts/{artifactId}/branches/{branchId}/versions") @POST @Consumes("application/json") void addVersionToBranch(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("branchId") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") @Pattern(regexp="^[a-zA-Z0-9._\\-+]{1,256}$") String branchId, @NotNull @NotNull AddVersionToBranch data) Add a new version to an artifact branch. Returns a list of version identifiers in the branch, ordered from the latest (tip of the branch) to the oldest.
This operation can fail for the following reasons:
- No artifact with this
groupIdandartifactIdexists (HTTP error404) - No branch with this
branchIdexists (HTTP error404) - Branch already contains the given version. Artifact branches are
append-only, cycles and history rewrites, except by replacing the entire
branch using the replaceBranchVersions operation, are not supported. (HTTP
error
409) - A server error occurred (HTTP error
500)
- No artifact with this
-
listGroupRules
@Path("/{groupId}/rules") @GET @Produces("application/json") List<RuleType> listGroupRules(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId) Returns a list of all rules configured for the group. The set of rules determines how the content of an artifact in the group can evolve over time. If no rules are configured for a group, the set of globally configured rules are used.
This operation can fail for the following reasons:
- No group with this
groupIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No group with this
-
createGroupRule
@Path("/{groupId}/rules") @POST @Consumes("application/json") void createGroupRule(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @NotNull @NotNull CreateRule data) Adds a rule to the list of rules that get applied to an artifact in the group 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 group with this
groupIdexists (HTTP error404) - Rule (named in the request body) is unknown (HTTP error
400) - Rule is already configured (HTTP error
409) - A server error occurred (HTTP error
500)
- No group with this
-
deleteGroupRules
@Path("/{groupId}/rules") @DELETE void deleteGroupRules(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId) Deletes all of the rules configured for the group. After this is done, the global rules apply to artifacts in the group again.
This operation can fail for the following reasons:
- No group with this
groupIdexists (HTTP error404) - A server error occurred (HTTP error
500)
- No group with this
-
getGroupRuleConfig
@Path("/{groupId}/rules/{ruleType}") @GET @Produces("application/json") Rule getGroupRuleConfig(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("ruleType") RuleType ruleType) Returns information about a single rule configured for a group. 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 group with this
groupIdexists (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 group with this
-
updateGroupRuleConfig
@Path("/{groupId}/rules/{ruleType}") @PUT @Produces("application/json") @Consumes("application/json") Rule updateGroupRuleConfig(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("ruleType") RuleType ruleType, @NotNull @NotNull Rule data) Updates the configuration of a single rule for the group. 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 group with this
groupIdexists (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 group with this
-
deleteGroupRule
@Path("/{groupId}/rules/{ruleType}") @DELETE void deleteGroupRule(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("ruleType") RuleType ruleType) Deletes a rule from the group. This results in the rule no longer applying for this group. If this is the only rule configured for the group, this is the same as deleting all rules, and the globally configured rules now apply to this group.
This operation can fail for the following reasons:
- No group with this
groupIdexists (HTTP error404) - No rule with this name/type is configured for this group (HTTP error
404) - Invalid rule type (HTTP error
400) - A server error occurred (HTTP error
500)
- No group with this
-
getArtifactVersionState
@Path("/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/state") @GET @Produces("application/json") WrappedVersionState getArtifactVersionState(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression) Gets the current state of an artifact 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
-
updateArtifactVersionState
@Path("/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/state") @PUT @Consumes("application/json") void updateArtifactVersionState(@PathParam("groupId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String groupId, @PathParam("artifactId") @Pattern(regexp="^.{1,512}$") @Pattern(regexp="^.{1,512}$") String artifactId, @PathParam("versionExpression") String versionExpression, @QueryParam("dryRun") Boolean dryRun, @NotNull @NotNull WrappedVersionState data) Updates the state of an artifact version.
NOTE: There are some restrictions on state transitions. Notably a version cannot be transitioned to the
DRAFTstate from any other state. TheDRAFTstate can only be entered (optionally) when creating a new artifact/version. A version inDRAFTstate can only be transitioned toENABLED. When this happens, any configured content rules will be applied. This may result in a failure to change the state.This operation can fail for the following reasons:
- No artifact with this
artifactIdexists (HTTP error404) - No version with this
versionexists (HTTP error404) - An invalid new state was provided (HTTP error
400) - The draft content violates one or more of the rules configured for the
artifact (HTTP error
409) - A server error occurred (HTTP error
500)
- No artifact with this
-