@ApiOperation(nickname = "accountQuery",
value = "Queries the Accounts",
notes = "Queries the Accounts with the given AccountQuery parameter returning all matching Accounts",
response = AccountListResult.class)
@POST
@Path("_query")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public AccountListResult query(
@ApiParam(value = "The ScopeId in which to search results.", required = true, defaultValue = DEFAULT_SCOPE_ID) @PathParam("scopeId") ScopeId scopeId,
@ApiParam(value = "The AccountQuery to use to filter results.", required = true) AccountQuery query) throws Exception {
query.setScopeId(scopeId);
return accountService.query(query);
}