Class AgentResource
java.lang.Object
com.atlassian.bamboo.plugins.rest.resource.AgentResource
@Path("agent")
@Produces("application/json")
@Consumes("application/json")
@Singleton
public class AgentResource
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionAgentResource(AgentCapabilityService agentCapabilityService, AgentExecutableService agentExecutableService, AgentManager agentManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, RestHelperWrapper restHelperWrapper) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsecreateAgentCapability(long agentId, RestCapability createCapabilityRequest) javax.ws.rs.core.ResponsedeleteAgent(long agentId) javax.ws.rs.core.ResponsedeleteAgentCapability(long agentId, @NotNull String capabilityKey) javax.ws.rs.core.ResponsedeleteAllAgentCapabilities(long agentId) javax.ws.rs.core.ResponsedisableAgent(long agentId) javax.ws.rs.core.ResponseenableAgent(long agentId) getAgentCapabilities(long agentId, boolean includeShared) getAgentInformation(String expandParam, boolean includeShared, long agentId, javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.ResponsegetAgentStatus(long agentId) getRemoteAgents(Boolean online) javax.ws.rs.core.ResponseupdateAgentCapability(long agentId, String capabilityKey, RestRemoteAgentCapability updateCapabilityRequest)
-
Constructor Details
-
AgentResource
@Inject public AgentResource(AgentCapabilityService agentCapabilityService, AgentExecutableService agentExecutableService, AgentManager agentManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, RestHelperWrapper restHelperWrapper)
-
-
Method Details
-
getAgents
-
getAgentInformation
@GET @Path("{agentId}") public RestAgentInformation getAgentInformation(@QueryParam("expand") String expandParam, @QueryParam("includeShared") boolean includeShared, @PathParam("agentId") long agentId, @Context javax.ws.rs.core.UriInfo uriInfo) -
getRemoteAgents
@GET @Path("remote") public List<RestBuildAgent> getRemoteAgents(@QueryParam("online") Boolean online) -
getAgentStatus
@GET @Path("{agentId}/status") public javax.ws.rs.core.Response getAgentStatus(@PathParam("agentId") long agentId) throws org.acegisecurity.AccessDeniedException - Throws:
org.acegisecurity.AccessDeniedException
-
enableAgent
@PUT @Path("{agentId}/enable") public javax.ws.rs.core.Response enableAgent(@PathParam("agentId") long agentId) throws org.acegisecurity.AccessDeniedException, NotFoundException - Throws:
org.acegisecurity.AccessDeniedExceptionNotFoundException
-
disableAgent
@PUT @Path("{agentId}/disable") public javax.ws.rs.core.Response disableAgent(@PathParam("agentId") long agentId) throws org.acegisecurity.AccessDeniedException, NotFoundException - Throws:
org.acegisecurity.AccessDeniedExceptionNotFoundException
-
deleteAgent
@DELETE @Path("{agentId}") public javax.ws.rs.core.Response deleteAgent(@PathParam("agentId") long agentId) throws org.acegisecurity.AccessDeniedException, WebValidationException - Throws:
org.acegisecurity.AccessDeniedExceptionWebValidationException
-
getAgentCapabilities
@GET @Path("{agentId}/capability") public List<RestCapability> getAgentCapabilities(@PathParam("agentId") long agentId, @QueryParam("includeShared") boolean includeShared) -
createAgentCapability
@POST @Path("{agentId}/capability") public javax.ws.rs.core.Response createAgentCapability(@PathParam("agentId") long agentId, RestCapability createCapabilityRequest) throws WebValidationException - Throws:
WebValidationException
-
updateAgentCapability
@PUT @Path("{agentId}/capability/{capabilityKey : (.+)?}") public javax.ws.rs.core.Response updateAgentCapability(@PathParam("agentId") long agentId, @PathParam("capabilityKey") String capabilityKey, RestRemoteAgentCapability updateCapabilityRequest) throws WebValidationException - Throws:
WebValidationException
-
deleteAgentCapability
@DELETE @Path("{agentId}/capability/{capabilityKey : (.+)?}") public javax.ws.rs.core.Response deleteAgentCapability(@PathParam("agentId") long agentId, @NotNull @PathParam("capabilityKey") @NotNull String capabilityKey) throws NotFoundException - Throws:
NotFoundException
-
deleteAllAgentCapabilities
@DELETE @Path("{agentId}/capability") public javax.ws.rs.core.Response deleteAllAgentCapabilities(@PathParam("agentId") long agentId) throws NotFoundException - Throws:
NotFoundException
-