diff --git a/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java b/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java index 3a77575b0d..a1155f736b 100644 --- a/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java +++ b/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java @@ -1358,13 +1358,17 @@ public class RestClient implements Closeable { }, params).getBody(); } - public PageData getTenantDeviceInfos(String type, DeviceProfileId deviceProfileId, PageLink pageLink) { + public PageData getTenantDeviceInfos(String type, Boolean active, DeviceProfileId deviceProfileId, PageLink pageLink) { Map params = new HashMap<>(); params.put("type", type); params.put("deviceProfileId", deviceProfileId != null ? deviceProfileId.toString() : null); + if (active != null) { + params.put("active", active.toString()); + } addPageLinkToParam(params, pageLink); return restTemplate.exchange( - baseURL + "/api/tenant/deviceInfos?type={type}&deviceProfileId={deviceProfileId}&" + getUrlParams(pageLink), + baseURL + "/api/tenant/deviceInfos?type={type}&deviceProfileId={deviceProfileId}&" + + (active != null ? "active={active}&" : "") + getUrlParams(pageLink), HttpMethod.GET, HttpEntity.EMPTY, new ParameterizedTypeReference>() { }, params).getBody();