@GET @Path("/icon/{itemId}") @ApiOperation(value = "Return the icon for a given catalog entry (application/image or HTTP redirect)") @ApiErrors(value = { @ApiError(code = 404, reason = "Item not found") }) @Produces("application/image") public Response getIcon( @ApiParam(name = "itemId", value = "ID of catalog item (application, entity, policy)") final @PathParam("itemId") @DefaultValue("") String itemId ) ;
@GET @Path("/entities/{entityId}") @ApiOperation(value = "Fetch an entity's definition from the catalog", responseClass = "CatalogEntitySummary", multiValueResponse = true) @ApiErrors(value = { @ApiError(code = 404, reason = "Entity not found") }) public CatalogEntitySummary getEntity( @ApiParam(name = "entityId", value = "The ID of the entity or template to retrieve", required = true) @PathParam("entityId") String entityId) throws Exception ;
@GET @Path("/policies/{policyId}") @ApiOperation(value = "Fetch a policy's definition from the catalog", responseClass = "CatalogItemSummary", multiValueResponse = true) @ApiErrors(value = { @ApiError(code = 404, reason = "Entity not found") }) public CatalogItemSummary getPolicy( @ApiParam(name = "policyId", value = "The ID of the policy to retrieve", required = true) @PathParam("policyId") String policyId) throws Exception ;
@GET @Path("/{task}") @ApiOperation(value = "Fetch task details", responseClass = "brooklyn.rest.domain.TaskSummary") @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find task") }) // @Produces("text/json") public TaskSummary get( @ApiParam(value = "Task ID", required = true) @PathParam("task") String taskId );
@GET @Path("/{task}/children") @ApiOperation(value = "Fetch list of children tasks of this task") @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find task") }) public Iterable<TaskSummary> children( @ApiParam(value = "Task ID", required = true) @PathParam("task") String taskId);
@GET @ApiOperation(value = "Fetch the list of entities for a given application", responseClass = "brooklyn.rest.domain.EntitySummary", multiValueResponse = true) @ApiErrors(value = { @ApiError(code = 404, reason = "Application not found") }) public List<EntitySummary> list( @ApiParam(value = "Application ID or name", required = true) @PathParam("application") final String application) ;
@GET @Path("/{task}/stream/{streamId}") @ApiOperation(value = "Return the contents of the given stream") @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find task or stream") }) public String stream( @ApiParam(value = "Task ID", required = true) @PathParam("task") String taskId, @ApiParam(value = "Stream ID", required = true) @PathParam("streamId") String streamId);
@GET @Path("/{entity}/activities") @ApiOperation(value = "Fetch list of tasks for this entity") @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find application or entity") }) public Iterable<TaskSummary> listTasks( @ApiParam(value = "Entity ID or name", required = true) @PathParam("application") String applicationId, @ApiParam(value = "Application ID or name", required = true) @PathParam("entity") String entityId);
@GET @Path("/{entity}/activities/{task}") @ApiOperation(value = "Fetch task details", responseClass = "brooklyn.rest.domain.TaskSummary") @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find application, entity or task") }) @Produces("text/json") public TaskSummary getTask( @ApiParam(value = "Application ID or name", required = true) @PathParam("application") final String application, @ApiParam(value = "Entity ID or name", required = true) @PathParam("entity") final String entityToken, @ApiParam(value = "Task ID", required = true) @PathParam("task") String taskId );
@GET @Path("/{application}") @ApiOperation( value = "Fetch a specific application", responseClass = "brooklyn.rest.domain.ApplicationSummary" ) @ApiErrors(value = { @ApiError(code = 404, reason = "Application not found") }) public ApplicationSummary get( @ApiParam( value = "ID or name of application whose details will be returned", required = true) @PathParam("application") String application) ;
@GET @Path("/{entity}") @ApiOperation(value = "Fetch details about a specific application entity", responseClass = "brooklyn.rest.domain.EntitySummary") @ApiErrors(value = { @ApiError(code = 404, reason = "Application or entity missing") }) public EntitySummary get( @ApiParam(value = "Application ID or name", required = true) @PathParam("application") String application, @ApiParam(value = "Entity ID or name", required = true) @PathParam("entity") String entity ) ;
@DELETE @Path("/{application}") @ApiOperation( value = "Delete a specified application", responseClass = "brooklyn.rest.domain.TaskSummary" ) @ApiErrors(value = { @ApiError(code = 404, reason = "Application not found") }) public Response delete( @ApiParam( name = "application", value = "Application name", required = true ) @PathParam("application") String application) ;
@GET @ApiOperation(value = "Fetch the config keys for a specific application entity", responseClass = "brooklyn.rest.domain.ConfigSummary", multiValueResponse = true) @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find application or entity") }) public List<EntityConfigSummary> list( @ApiParam(value = "Application ID or name", required = true) @PathParam("application") final String application, @ApiParam(value = "Entity ID or name", required = true) @PathParam("entity") final String entityToken ) ;
@GET @ApiOperation(value = "Fetch the list of effectors", responseClass = "brooklyn.rest.domain.EffectorSummary", multiValueResponse = true) @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find application or entity") }) public List<EffectorSummary> list( @ApiParam(name = "application", value = "Application name", required = true) @PathParam("application") final String application, @ApiParam(name = "entity", value = "Entity name", required = true) @PathParam("entity") final String entityToken ) ;
@GET @Path("/applications") @ApiOperation( value = "Retrieve usage information about all applications", responseClass = "brooklyn.rest.domain.UsageStatistics" ) @ApiErrors(value = {}) public Iterable<UsageStatistics> listApplicationsUsage( @ApiParam( name = "start", value = "timestamp of start marker for usage reporting, in format UTC millis or yyyy-MM-dd'T'HH:mm:ssZ", required = false ) @QueryParam("start") String startDate, @ApiParam( name = "end", value = "timestamp of end marker for usage reporting in format UTC millis or yyyy-MM-dd'T'HH:mm:ssZ", required = false ) @QueryParam("end") String endDate) ;
@GET @ApiOperation(value = "Fetch the policies attached to a specific application entity", responseClass = "brooklyn.rest.domain.PolicySummary", multiValueResponse = true) @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find application or entity") }) public List<PolicySummary> list( @ApiParam(value = "Application ID or name", required = true) @PathParam("application") final String application, @ApiParam(value = "Entity ID or name", required = true) @PathParam("entity") final String entityToken ) ;
@GET @ApiOperation(value = "Fetch the sensor list for a specific application entity", responseClass = "brooklyn.rest.domain.SensorSummary", multiValueResponse = true) @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find application or entity") }) public List<SensorSummary> list( @ApiParam(value = "Application ID or name", required = true) @PathParam("application") final String application, @ApiParam(value = "Entity ID or name", required = true) @PathParam("entity") final String entityToken ) ;
@POST @Path("/{policy}/stop") @ApiOperation(value = "Suspends a policy") @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find application, entity or policy") }) public Response stop( @ApiParam(name = "application", value = "Application ID or name", required = true) @PathParam("application") String application, @ApiParam(name = "entity", value = "Entity ID or name", required = true) @PathParam("entity") String entityToken, @ApiParam(name = "policy", value = "Policy ID or name", required = true) @PathParam("policy") String policyId ) ;
@GET @Path("/{policy}") @ApiOperation(value = "Gets status of a policy (RUNNING / SUSPENDED)") @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find application, entity or policy") }) public Status getStatus( @ApiParam(name = "application", value = "Application ID or name", required = true) @PathParam("application") String application, @ApiParam(name = "entity", value = "Entity ID or name", required = true) @PathParam("entity") String entityToken, @ApiParam(name = "policy", value = "Policy ID or name", required = true) @PathParam("policy") String policyId ) ;
@GET @Path("/{sensor}") @ApiOperation(value = "Fetch sensor value", responseClass = "String") @ApiErrors(value = { @ApiError(code = 404, reason = "Could not find application, entity or sensor") }) @Produces("text/plain") public String get( @ApiParam(value = "Application ID or name", required = true) @PathParam("application") final String application, @ApiParam(value = "Entity ID or name", required = true) @PathParam("entity") final String entityToken, @ApiParam(value = "Sensor name", required = true) @PathParam("sensor") String sensorName ) ;