Interface QueueApi


  • @Consumes("application/json")
    @Path("/queue")
    public interface QueueApi
    • Method Detail

      • queue

        @Named("queue:queue")
        @Path("/api/json")
        @GET
        List<QueueItem> queue()
      • queueItem

        @Named("queue:item")
        @Path("/item/{queueId}/api/json")
        @GET
        QueueItem queueItem​(@PathParam("queueId")
                            int queueId)
        Get a specific queue item. Queue items are builds that have been scheduled to run, but are waiting for a slot. You can poll the queueItem that corresponds to a build to detect whether the build is still pending or is executing.
        Parameters:
        queueId - The queue id value as returned by the JobsApi build or buildWithParameters methods.
        Returns:
        The queue item corresponding to the queue id.
      • cancel

        @Named("queue:cancel")
        @Path("/cancelItem")
        @POST
        RequestStatus cancel​(@FormParam("id")
                             int id)
        Cancel a queue item before it gets built.
        Parameters:
        id - The queue id value of the queue item to cancel. This is the value is returned by the JobsApi build or buildWithParameters methods.
        Returns:
        Always returns true due to JENKINS-21311.