Interface RestAgentService

  • All Known Implementing Classes:
    RestAgentServiceImpl

    public interface RestAgentService
    REST service layer for agents
    Since:
    5.10
    • Method Detail

      • getAgents

        @NotNull
        @NotNull RestPageModel<RestAgent> getAgents​(@NotNull
                                                    @NotNull javax.ws.rs.core.UriInfo uriInfo)
        Retrieve all agents on the bamboo server
        Parameters:
        uriInfo - Object that provides access to information of http request
        Returns:
        Collection of agents
        Throws:
        NotAuthorizedException - if the current user lacks restricted administration permission to get agents
      • getAgentById

        @NotNull
        @NotNull RestAgent getAgentById​(@NotNull
                                        @NotNull javax.ws.rs.core.UriInfo uriInfo,
                                        long agentId)
        Retrieve an agent definition
        Parameters:
        uriInfo - Object that provides access to information of http request
        agentId - Id of agent
        Returns:
        RestAgent object that contains the definition of the agent
        Throws:
        NotAuthorizedException - if the current user lacks restricted administration permission to get agents
        NotFoundException - if no agent exists with an id equal to agentId
      • updateAgent

        @NotNull
        @NotNull RestAgent updateAgent​(@NotNull
                                       @NotNull javax.ws.rs.core.UriInfo uriInfo,
                                       long agentId,
                                       @NotNull
                                       @NotNull RestAgent restAgent)
                                throws WebValidationException
        Update an agent
        Parameters:
        uriInfo - Object that provides access to information of http request
        agentId - Id of the agent to be updated
        restAgent - The updated agent definition
        Returns:
        The updated agent
        Throws:
        WebValidationException - If the agent definition is invalid
        NotFoundException - if no agent exists with an id equal to agentId