Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/967#discussion_r194658482
--- Diff:
rest/rest-api/src/main/java/org/apache/brooklyn/rest/api/ApplicationApi.java ---
@@ -53,12 +53,46 @@
@Consumes(MediaType.APPLICATION_JSON)
public interface ApplicationApi {
+ @GET
+ @Path("/details")
+ @ApiOperation(
+ value = "Get details for all applications and optionally
selected additional entity items, "
+ + "including tags, values for selected sensor and config
glob patterns, "
+ + "and recursively this info for children, up to a given
depth."
+ )
+ public List<EntitySummary> details(
+ @ApiParam(value="Any additional entity ID's to include, as
JSON or comma-separated list; ancestors will also be included", required=false)
+ @DefaultValue("")
+ @QueryParam("items") String items,
+ @ApiParam(value="Whether to include all applications in
addition to any explicitly requested IDs; "
+ + "default is true so no items need to be listed; "
+ + "set false to return only info for entities whose IDs
are listed in `items` and their ancestors", required=false)
+ @DefaultValue("true")
+ @QueryParam("includeAllApps") boolean includeAllApps,
+ @ApiParam(value="Any additional sensors to include, as JSON or
comma-separated list, accepting globs (* and ?); "
+ + "current sensor values if present are returned for each
entity in a name-value map under the 'sensors' key", required=false)
+ @DefaultValue("")
+ @QueryParam("sensors") String sensors,
+ @ApiParam(value="Any config to include, as JSON or
comma-separated list, accepting globs (* and ?); "
+ + "current config values if present are returned for each
entity in a name-value map under the 'config' key", required=false)
+ @DefaultValue("")
+ @QueryParam("config") String config,
+ @ApiParam(value="Tree depth to traverse in children for
returning detail; "
+ + "default 1 means to have detail for just applications
and additional entity IDs explicitly requested, "
+ + "with references to children but not their details",
required=false)
+ @DefaultValue("1")
+ @QueryParam("depth") int depth);
+
@GET
@Path("/fetch")
@ApiOperation(
value = "Fetch details for all applications and optionally
selected additional entity items, "
- + "optionally also with the values for selected sensors"
+ + "optionally also with the values for selected sensors. "
+ + "Deprecated since 1.0.0. Use the '/details' endpoint
with better semantics. "
+ + "(This returns the complete tree which is wasteful and
not usually wanted.)"
)
+ @Deprecated
+ /** @deprecated since 1.0.0 use {@link #details(String, String, int)}
*/
--- End diff --
agree, done
---