Search in sources :

Example 1 with InstanceQuery

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);
}
Also used : InstanceQuery(io.gravitee.rest.api.model.InstanceQuery) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) ApiOperation(io.swagger.annotations.ApiOperation) Permissions(io.gravitee.rest.api.management.rest.security.Permissions)

Aggregations

Permissions (io.gravitee.rest.api.management.rest.security.Permissions)1 InstanceQuery (io.gravitee.rest.api.model.InstanceQuery)1 ApiOperation (io.swagger.annotations.ApiOperation)1 GET (javax.ws.rs.GET)1 Produces (javax.ws.rs.Produces)1