Class AgentRulesResource

java.lang.Object
com.xebialabs.xlrelease.agentrules.api.AgentRulesResource

@Path("/agent-rules") @Produces("application/json") @Controller public class AgentRulesResource extends Object
Internal REST surface for the Agent Rules page. Rules themselves are ordinary shared configurations, CRUD-ed through the existing /api/v1/config endpoints and described by /metadata/type/agentic.Rule — this resource only serves what has no existing home: the run history.

Registered automatically: JaxRsApplication collects every Spring bean carrying @Path, and the classpath-wide component scan includes this module. Session-cookie authenticated via the catch-all security chain (this is a UI-facing resource, not an agent protocol surface).

  • Constructor Details

  • Method Details

    • runs

      @GET @Path("/runs") public List<AgentRuleRun> runs(@QueryParam("ruleId") String ruleId, @QueryParam("releaseId") String releaseId, @QueryParam("limit") Integer limit)
      Recent agent-rule runs, newest first.
      Parameters:
      ruleId - only runs of this rule, when given
      releaseId - only runs on this release, when given
      limit - maximum entries (default 100, capped by the store's retention window)
    • proposals

      @GET @Path("/proposals") public List<AgentRuleProposal> proposals(@QueryParam("limit") Integer limit, @QueryParam("taskId") String taskId)
      Pending and recently decided propose-mode actions, newest first. With taskId, only PENDING proposals for that task — the shape the in-flow decision card needs.
    • approve

      @POST @Path("/proposals/{proposalId}/approve") public Map<String,String> approve(@PathParam("proposalId") String proposalId, @Context jakarta.servlet.http.HttpServletRequest request, @Context jakarta.servlet.http.HttpServletResponse response)
      Approves one pending proposal and executes its action on this request thread — attributed to the approver. Answers with the execution result; an already-decided or expired proposal is reported, never executed twice.
    • reject

      @POST @Path("/proposals/{proposalId}/reject") public Map<String,String> reject(@PathParam("proposalId") String proposalId)