Interface HttpTreeApi

  • All Superinterfaces:
    TreeApi

    @Consumes("application/json")
    @Consumes("application/json")
    @Path("v1/trees")
    @Path("v1/trees")
    public interface HttpTreeApi
    extends TreeApi
    • Method Detail

      • getEntries

        @GET
        @GET
        @Produces("application/json")
        @Produces("application/json")
        @Path("tree/{ref}/entries")
        @Path("tree/{ref}/entries")
        EntriesResponse getEntries​(@PathParam("ref") @PathParam("ref")
                                   java.lang.String refName,
                                   @BeanParam @BeanParam
                                   EntriesParams params)
                            throws NessieNotFoundException
        Description copied from interface: TreeApi
        Retrieve objects for a ref, potentially truncated by the backend.

        Retrieves up to maxRecords objects for the given named reference (tag or branch). The backend may respect the given max records hint, but return less or more entries. Backends may also cap the returned entries at a hard-coded limit, the default REST server implementation has such a hard-coded limit.

        Invoking getEntries() does not guarantee to return all commit log entries of a given reference, because the result can be truncated by the backend.

        To implement paging, check EntriesResponse.isHasMore() and, if true, pass the value of EntriesResponse.getToken() in the next invocation of getEntries() as the pageToken parameter.

        See org.projectnessie.client.StreamingUtil in nessie-client.

        Specified by:
        getEntries in interface TreeApi
        Throws:
        NessieNotFoundException
      • getCommitLog

        @GET
        @GET
        @Produces("application/json")
        @Produces("application/json")
        @Path("tree/{ref}/log")
        @Path("tree/{ref}/log")
        LogResponse getCommitLog​(@PathParam("ref") @PathParam("ref")
                                 java.lang.String ref,
                                 @BeanParam @BeanParam
                                 CommitLogParams params)
                          throws NessieNotFoundException
        Description copied from interface: TreeApi
        Retrieve the commit log for a ref, potentially truncated by the backend.

        Retrieves up to maxRecords commit-log-entries starting at the HEAD of the given named reference (tag or branch). The backend may respect the given max records hint, but return less or more entries. Backends may also cap the returned entries at a hard-coded limit, the default REST server implementation has such a hard-coded limit.

        Invoking getCommitLog() does not guarantee to return all commit log entries of a given reference, because the result can be truncated by the backend.

        To implement paging, check LogResponse.isHasMore() and, if true, pass the value of LogResponse.getToken() in the next invocation of getCommitLog() as the pageToken parameter.

        See org.projectnessie.client.StreamingUtil in nessie-client.

        Specified by:
        getCommitLog in interface TreeApi
        Throws:
        NessieNotFoundException
      • commitMultipleOperations

        @POST
        @POST
        @Path("branch/{branchName}/commit")
        @Path("branch/{branchName}/commit")
        @Produces("application/json")
        @Produces("application/json")
        @Consumes("application/json")
        @Consumes("application/json")
        Branch commitMultipleOperations​(@PathParam("branchName") @PathParam("branchName")
                                        java.lang.String branchName,
                                        @QueryParam("expectedHash") @QueryParam("expectedHash")
                                        java.lang.String expectedHash,
                                        Operations operations)
                                 throws NessieNotFoundException,
                                        NessieConflictException
        Description copied from interface: TreeApi
        Commit multiple operations against the given branch expecting that branch to have the given hash as its latest commit. The hash in the successful response contains the hash of the commit that contains the operations of the invocation.
        Specified by:
        commitMultipleOperations in interface TreeApi
        Parameters:
        branchName - Branch to change, defaults to default branch.
        expectedHash - Expected hash of branch.
        operations - Operations to apply
        Returns:
        updated Branch objects with the hash of the new HEAD
        Throws:
        NessieNotFoundException - if branchName could not be found
        NessieConflictException - if the operations could not be applied to some conflict, which is either caused by a conflicting commit or concurrent commits.