All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.apicurio.registry.rest.v3.SearchResource Maven / Gradle / Ivy

The newest version!
package io.apicurio.registry.rest.v3;

import io.apicurio.registry.rest.v3.beans.ArtifactSearchResults;
import io.apicurio.registry.rest.v3.beans.ArtifactSortBy;
import io.apicurio.registry.rest.v3.beans.GroupSearchResults;
import io.apicurio.registry.rest.v3.beans.GroupSortBy;
import io.apicurio.registry.rest.v3.beans.SortOrder;
import io.apicurio.registry.rest.v3.beans.VersionSearchResults;
import io.apicurio.registry.rest.v3.beans.VersionSortBy;
import io.apicurio.registry.types.VersionState;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DefaultValue;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import java.io.InputStream;
import java.math.BigInteger;
import java.util.List;

/**
 * A JAX-RS interface. An implementation of this interface must be provided.
 */
@Path("/apis/registry/v3/search")
public interface SearchResource {
  /**
   * 

* Returns a paginated list of all artifacts that match the provided filter * criteria. *

*

* This operation can fail for the following reasons: *

*
    *
  • A server error occurred (HTTP error 500)
  • *
* */ @Path("/artifacts") @GET @Produces("application/json") ArtifactSearchResults searchArtifacts(@QueryParam("name") String name, @QueryParam("offset") @DefaultValue("0") BigInteger offset, @QueryParam("limit") @DefaultValue("20") BigInteger limit, @QueryParam("order") SortOrder order, @QueryParam("orderby") ArtifactSortBy orderby, @QueryParam("labels") List labels, @QueryParam("description") String description, @QueryParam("groupId") String groupId, @QueryParam("globalId") Long globalId, @QueryParam("contentId") Long contentId, @QueryParam("artifactId") String artifactId, @QueryParam("artifactType") String artifactType); /** *

* Returns a paginated list of all artifacts with at least one version that * matches the posted content. *

*

* This operation can fail for the following reasons: *

*
    *
  • Provided content (request body) was empty (HTTP error * 400)
  • *
  • A server error occurred (HTTP error 500)
  • *
* */ @Path("/artifacts") @POST @Produces("application/json") @Consumes("*/*") ArtifactSearchResults searchArtifactsByContent(@QueryParam("canonical") Boolean canonical, @QueryParam("artifactType") String artifactType, @QueryParam("groupId") String groupId, @QueryParam("offset") @DefaultValue("0") BigInteger offset, @QueryParam("limit") @DefaultValue("20") BigInteger limit, @QueryParam("order") SortOrder order, @QueryParam("orderby") ArtifactSortBy orderby, @NotNull InputStream data); /** *

* Returns a paginated list of all groups that match the provided filter * criteria. *

*

* This operation can fail for the following reasons: *

*
    *
  • A server error occurred (HTTP error 500)
  • *
* */ @Path("/groups") @GET @Produces("application/json") GroupSearchResults searchGroups(@QueryParam("offset") @DefaultValue("0") BigInteger offset, @QueryParam("limit") @DefaultValue("20") BigInteger limit, @QueryParam("order") SortOrder order, @QueryParam("orderby") GroupSortBy orderby, @QueryParam("labels") List labels, @QueryParam("description") String description, @QueryParam("groupId") String groupId); /** *

* Returns a paginated list of all versions that match the provided filter * criteria. *

*

* This operation can fail for the following reasons: *

*
    *
  • A server error occurred (HTTP error 500)
  • *
* */ @Path("/versions") @GET @Produces("application/json") VersionSearchResults searchVersions( @QueryParam("version") @Pattern(regexp = "^[a-zA-Z0-9._\\-+]{1,256}$") String version, @QueryParam("offset") @DefaultValue("0") BigInteger offset, @QueryParam("limit") @DefaultValue("20") BigInteger limit, @QueryParam("order") SortOrder order, @QueryParam("orderby") VersionSortBy orderby, @QueryParam("labels") List labels, @QueryParam("description") String description, @QueryParam("groupId") @Pattern(regexp = "^.{1,512}$") String groupId, @QueryParam("globalId") Long globalId, @QueryParam("contentId") Long contentId, @QueryParam("artifactId") @Pattern(regexp = "^.{1,512}$") String artifactId, @QueryParam("name") String name, @QueryParam("state") VersionState state, @QueryParam("artifactType") String artifactType); /** *

* Returns a paginated list of all versions that match the posted content. *

*

* This operation can fail for the following reasons: *

*
    *
  • Provided content (request body) was empty (HTTP error * 400)
  • *
  • A server error occurred (HTTP error 500)
  • *
* */ @Path("/versions") @POST @Produces("application/json") @Consumes("*/*") VersionSearchResults searchVersionsByContent(@QueryParam("canonical") Boolean canonical, @QueryParam("artifactType") String artifactType, @QueryParam("offset") @DefaultValue("0") BigInteger offset, @QueryParam("limit") @DefaultValue("20") BigInteger limit, @QueryParam("order") SortOrder order, @QueryParam("orderby") VersionSortBy orderby, @QueryParam("groupId") @Pattern(regexp = "^.{1,512}$") String groupId, @QueryParam("artifactId") @Pattern(regexp = "^.{1,512}$") String artifactId, @NotNull InputStream data); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy