Agree, that makes sense. And solves the naming problem above I think:

    @Path("/applications")
    Iterable<UsageStatistics> listApplicationsUsage(start,end)
    
    @Path("/applications/{application}")
    UsageStatistics getApplicationUsage(applicationId, start, end)

    /** where each UsageStatistics is about a single machine; the optional appId filters the set being returned */
    @Path("/machines")
    Iterable<UsageStatistics> listMachinesUsage(applicationId, start, end)

And for completeness we should add:

    @Path("/machines/{machine}")
    `UsageStatistics getMachineUsage(optionalApplicationId, start, end)`