use of io.gravitee.rest.api.model.InstanceQuery in project gravitee-management-rest-api by gravitee-io.
the class InstancesResource method getInstances.
@GET
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "List gateway instances")
@Permissions({ @Permission(value = RolePermission.ENVIRONMENT_INSTANCE, acls = RolePermissionAction.READ) })
public Page<InstanceListItem> getInstances(@BeanParam InstanceSearchParam param) {
InstanceQuery query = new InstanceQuery();
query.setIncludeStopped(param.isIncludeStopped());
query.setFrom(param.getFrom());
query.setTo(param.getTo());
query.setPage(param.getPage());
query.setSize(param.getSize());
return instanceService.search(query);
}
Aggregations