|
|
|
@ -58,6 +58,7 @@ import org.thingsboard.server.common.data.OtaPackage; |
|
|
|
import org.thingsboard.server.common.data.OtaPackageInfo; |
|
|
|
import org.thingsboard.server.common.data.SaveDeviceWithCredentialsRequest; |
|
|
|
import org.thingsboard.server.common.data.StringUtils; |
|
|
|
import org.thingsboard.server.common.data.SystemInfo; |
|
|
|
import org.thingsboard.server.common.data.TbResource; |
|
|
|
import org.thingsboard.server.common.data.TbResourceInfo; |
|
|
|
import org.thingsboard.server.common.data.Tenant; |
|
|
|
@ -373,6 +374,10 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public SystemInfo getSystemInfo() { |
|
|
|
return restTemplate.getForEntity(baseURL + "/api/admin/systemInfo", SystemInfo.class).getBody(); |
|
|
|
} |
|
|
|
|
|
|
|
public Optional<Alarm> getAlarmById(AlarmId alarmId) { |
|
|
|
try { |
|
|
|
ResponseEntity<Alarm> alarm = restTemplate.getForEntity(baseURL + "/api/alarm/{alarmId}", Alarm.class, alarmId.getId()); |
|
|
|
|