@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Hardware Sentry TrueSight Presentation Server REST API
@base /tsws/10.0/api/
@version 11.1.00
@auth ApiKey Cookie in header
@endpoints 23
@hint download_for_search
@toc hardware(23)

@endpoint POST /hardware/actions/{deviceId}/collect-now
@required {deviceId: int(int32), monitorClass: str}
@returns(200)
@errors {403, 500}

@endpoint POST /hardware/actions/{deviceId}/rediscover
@required {deviceId: int(int32)}
@returns(200)
@errors {403, 500}

@endpoint POST /hardware/actions/{deviceId}/reinitialize
@required {deviceId: int(int32)}
@optional {resetDiscoveryAndPollingIntervals: int(int32)(0/1), resetAlertAfterNTimes: int(int32)(0/1), resetAlertActions: int(int32)(0/1), resetOtherAlertSettings: int(int32)(0/1), resetDebugMode: int(int32)(0/1), resetRemovedPausedObjectList: int(int32)(0/1), resetReportSettings: int(int32)(0/1), resetJavaSettings: int(int32)(0/1), resetThresholds: int(int32)(0/1)}
@returns(200)
@errors {403, 500}

@endpoint POST /hardware/actions/{deviceId}/remove
@required {deviceId: int(int32), monitorClass: str, monitorSid: str}
@returns(200)
@errors {403, 500}

@endpoint POST /hardware/actions/{deviceId}/reset-error-count
@required {deviceId: int(int32), monitorClass: str, monitorSid: str}
@returns(200)
@errors {403, 500}

@endpoint GET /hardware/applications
@optional {page: str(int32)=0, limit: int(int32)=100, direction: str(asc/desc)=asc, sort: str=name}
@returns(200)
@errors {404, 500}

@endpoint GET /hardware/applications/{applicationId}
@required {applicationId: str}
@returns(200)
@errors {404, 500}

@endpoint GET /hardware/device-monitors/{deviceId}
@required {deviceId: int(int32)}
@returns(200)
@errors {500}

@endpoint GET /hardware/devices
@optional {page: str(int32)=0, limit: int(int32)=100, direction: str(asc/desc)=asc, sort: str=name, groupId: str, applicationId: str, serviceId: str}
@returns(200)
@errors {404, 500}

@endpoint GET /hardware/devices-summary
@returns(200)
@errors {500}

@endpoint GET /hardware/devices/{deviceId}
@required {deviceId: int(int32)}
@returns(200)
@errors {404, 500}

@endpoint GET /hardware/devices/{deviceId}/agent
@required {deviceId: int(int32)}
@returns(200)
@errors {500}

@endpoint GET /hardware/devices/{deviceId}/agent-devices
@required {deviceId: int(int32)}
@returns(200)
@errors {500}

@endpoint GET /hardware/devices/{deviceId}/parameter-history
@required {deviceId: int(int32), parameterName: str, monitorType: str}
@optional {from: int(int64), to: int(int64), monitorSid: str}
@returns(200)
@errors {500}

@endpoint GET /hardware/energy-usage/{deviceId}
@required {deviceId: int(int32)}
@optional {rollPeriod: str(ONE_DAY/ONE_WEEK/ONE_MONTH/SIX_MONTHS/ONE_YEAR)=ONE_DAY, basis: str(MONTHLY/DAILY/HOURLY)=HOURLY}
@returns(200)
@errors {500}

@endpoint GET /hardware/groups
@optional {page: str(int32)=0, limit: int(int32)=100, direction: str(asc/desc)=asc, sort: str=name}
@returns(200)
@errors {404, 500}

@endpoint GET /hardware/groups/{groupId}
@required {groupId: str}
@returns(200)
@errors {404, 500}

@endpoint PUT /hardware/groups/{groupId}
@required {groupId: str}
@optional {energyCost: num(double), co2Emission: num(double), groupNameFilter: str}
@returns(200)
@errors {404, 500}

@endpoint GET /hardware/heating-margin-devices
@optional {covered: bool=True, page: str(int32)=0, limit: int(int32)=100, direction: str(asc/desc)=asc, sort: str=name, groupId: str, applicationId: str, serviceId: str}
@returns(200)
@errors {404, 500}

@endpoint GET /hardware/history
@optional {groupId: str, applicationId: str, serviceId: str, from: int(int64), to: int(int64)}
@returns(200)
@errors {500}

@endpoint GET /hardware/search-devices
@required {searchTerms: str}
@optional {groupId: str, applicationId: str, serviceId: str, page: str(int32)=0, limit: int(int32)=100}
@returns(200)
@errors {404, 500}

@endpoint GET /hardware/services
@optional {page: str(int32)=0, limit: int(int32)=100, direction: str(asc/desc)=asc, sort: str=name}
@returns(200)
@errors {404, 500}

@endpoint GET /hardware/services/{serviceId}
@required {serviceId: str}
@returns(200)
@errors {404, 500}

@end
