Documentation Powered by ReDoc
Hydroco API (1.0)
Download OpenAPI specification:Download
alarm-endpoints
Acknowledge for Alarm
Acknowledge for Alarm, depending on what action is passed. Note : if there is an AlarmId passed that is opposite of the action chosen, it will not be changed.
path Parameters
id required | integer Example: 12
Alarm id |
action required | string Example: ACK
Action to be taken. Must be one of [ACK, UNACK]. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
post /alarms/{id}/{action}http://http://localhost:10001/alarms/{id}/{action}
Bulk Acknowledge for Alarm
Bulk acknowledge for Alarm, depending on what action is passed. Note : if there is an AlarmId passed that is opposite of the action chosen, it will not be changed.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
action required | string
Alarm action, accepted values [ACK, UNACK] |
alarmsIds required | Array of integers <int32>
List of alarm ids |
Responses
200
OK
post /alarms/ack/bulkhttp://http://localhost:10001/alarms/ack/bulk
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "action": "UNACK",
- "alarmsIds": [
- 5,
- 20,
- 10
]
}
Load alarm by id
Load alarm using the given alarm id Puts on response hypermedia links and templates with the actions related to the alarm and link to the alarm’s device.
path Parameters
id required | integer Example: 12
Alarm id to search for. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /alarms/{id}http://http://localhost:10001/alarms/{id}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "description": "qzXfN",
- "id": 12,
- "alarm_type": "LOW_BATTERY",
- "confirmed": "2020-05-06T12:17:31+00:00",
- "confirmed_by": "TestUser",
- "device_number": "123456",
- "device_type": "SMARTVALVE",
- "device_name": "Hydro-Konekt 2.0",
- "start_time": "2020-05-06T12:17:31+00:00",
- "acknowledged": true,
- "alarm_data": {
- "voltage": 23
},
- "_links": {
- "self": {
- "href": "http://localhost:10001/alarms/12",
- "title": "Link to resource",
- "type": "GET"
},
- "acknowledge_alarm": {
- "href": "http://localhost:10001/alarms/12/{action}",
- "title": "Link to acknowledge alarm",
- "type": "POST",
- "templated": true
},
- "alarms": {
- "href": "http://localhost:10001/alarms",
- "title": "Link to get all alarms",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/123456",
- "title": "Link to get alarm's Device",
- "type": "GET"
}
}
- "self": {
}
Load all alarms
Load all alarms using pagination Puts on response hypermedia links and templates with the actions related to the alarm and link to the alarm’s device.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /alarmshttp://http://localhost:10001/alarms
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "alarms": [
- {
- "description": "RESET device alarm",
- "id": 51,
- "alarm_type": "RESET",
- "end_time": "2020-03-18T00:25:22+00:00",
- "device_number": "74338240",
- "device_type": "SIGFOX_WMBUS_FORWARDER",
- "device_name": "CMAS Forwarder Test Device",
- "start_time": "2020-03-18T00:25:22+00:00",
- "acknowledged": false,
- "alarm_data": {
- "counter": 22,
- "register": "0010"
},
- "_links": {
- "self": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/51",
- "title": "Link to resource",
- "type": "GET"
},
- "acknowledge_alarm": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/51/{action}",
- "title": "Link to acknowledge alarm",
- "type": "POST",
- "templated": true
},
- "alarms": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms",
- "title": "Link to get all alarms",
- "type": "GET"
},
- "device": {
- "href": "https://hydrosense-api.cmas-systems.com/devices/74338240",
- "title": "Link to get alarm's Device",
- "type": "GET"
}
}
- "self": {
},
- {
- "description": "BURST logical alarm",
- "id": 22,
- "alarm_type": "BURST",
- "confirmed": "2019-12-02T17:58:03+00:00",
- "confirmed_by": "root",
- "end_time": "2018-06-18T16:03:55+00:00",
- "device_number": "77599548",
- "device_type": "SMARTVALVE",
- "device_name": "CMAS Test Device",
- "start_time": "2018-06-18T15:03:53+00:00",
- "acknowledged": true,
- "alarm_data": { },
- "_links": {
- "self": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/22",
- "title": "Link to resource",
- "type": "GET"
},
- "acknowledge_alarm": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/22/{action}",
- "title": "Link to acknowledge alarm",
- "type": "POST",
- "templated": true
},
- "alarms": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms",
- "title": "Link to get all alarms",
- "type": "GET"
},
- "device": {
- "href": "https://hydrosense-api.cmas-systems.com/devices/77599548",
- "title": "Link to get alarm's Device",
- "type": "GET"
}
}
- "self": {
},
- {
- "description": "DRY logical alarm",
- "id": 48,
- "alarm_type": "DRY",
- "device_number": "1840156194",
- "device_type": "SMARTVALVE",
- "device_name": "Sample DN20 SV",
- "start_time": "2019-10-10T10:35:29+00:00",
- "acknowledged": false,
- "alarm_data": { },
- "_links": {
- "self": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/48",
- "title": "Link to resource",
- "type": "GET"
},
- "acknowledge_alarm": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/48/{action}",
- "title": "Link to acknowledge alarm",
- "type": "POST",
- "templated": true
},
- "alarms": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms",
- "title": "Link to get all alarms",
- "type": "GET"
},
- "device": {
- "href": "https://hydrosense-api.cmas-systems.com/devices/1840156194",
- "title": "Link to get alarm's Device",
- "type": "GET"
}
}
- "self": {
},
- {
- "description": "RESET device alarm",
- "id": 49,
- "alarm_type": "RESET",
- "confirmed": "2019-12-02T17:17:01+00:00",
- "confirmed_by": "root",
- "end_time": "2019-10-26T15:19:29+00:00",
- "device_number": "74338240",
- "device_type": "SIGFOX_WMBUS_FORWARDER",
- "device_name": "CMAS Forwarder Test Device",
- "start_time": "2019-10-26T15:19:29+00:00",
- "acknowledged": true,
- "alarm_data": {
- "counter": 21,
- "register": "0010"
},
- "_links": {
- "self": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/49",
- "title": "Link to resource",
- "type": "GET"
},
- "acknowledge_alarm": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/49/{action}",
- "title": "Link to acknowledge alarm",
- "type": "POST",
- "templated": true
},
- "alarms": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms",
- "title": "Link to get all alarms",
- "type": "GET"
},
- "device": {
- "href": "https://hydrosense-api.cmas-systems.com/devices/74338240",
- "title": "Link to get alarm's Device",
- "type": "GET"
}
}
- "self": {
},
- {
- "description": "DRY logical alarm",
- "id": 27,
- "alarm_type": "DRY",
- "confirmed": "2019-12-02T14:03:51+00:00",
- "confirmed_by": "root",
- "end_time": "2018-09-19T13:21:01+00:00",
- "device_number": "57502930",
- "device_type": "KAMSTRUP_SIGFOX",
- "device_name": "CMAS Kamstrup Sigfox Test Device",
- "start_time": "2018-09-14T07:29:30+00:00",
- "acknowledged": true,
- "alarm_data": { },
- "_links": {
- "self": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/27",
- "title": "Link to resource",
- "type": "GET"
},
- "acknowledge_alarm": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms/27/{action}",
- "title": "Link to acknowledge alarm",
- "type": "POST",
- "templated": true
},
- "alarms": {
- "href": "https://hydrosense-api.cmas-systems.com/alarms",
- "title": "Link to get all alarms",
- "type": "GET"
},
- "device": {
- "href": "https://hydrosense-api.cmas-systems.com/devices/57502930",
- "title": "Link to get alarm's Device",
- "type": "GET"
}
}
- "self": {
}
]
- {
},
- "alarms": [
- "_links": {
- "first": {
},
- "self": {
},
- "next": {
},
- "last": {
}
},
- "first": {
- "page": {
- "size": 5,
- "totalElements": 50,
- "totalPages": 10,
- "number": 0
}
}
web-hook-endpoints
Create webhooks
Creates a new webHook.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
password required | string |
messageConfig required | object (MessageConfig) |
domain required | string |
name required | string |
type required | string
Must be one of [DAILY, ALARM, OPERATION_REPORTED, OPERATION_CREATED, OPERATION_REJECTED, HOURLY, GPS_LOCATION, PRESSURE_LOWSPEED, PRESSURE_HIGHSPEED, PRESSURE_SENSOR_V2, MIN_FLOW]. |
url required | string |
username required | string |
tags required | Array of strings |
Responses
200
OK
put /webhookshttp://http://localhost:10001/webhooks
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "password": "password",
- "messageConfig": {
- "blocked_triggers": [
- "ALERT",
- "BUTTON"
]
},
- "blocked_triggers": [
- "domain": "domain",
- "name": "name",
- "type": "ALARM",
- "url": "url",
- "username": "username",
- "tags": [
- "Tag 1"
]
}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 123,
- "type": "ALARM",
- "name": "name",
- "url": "url",
- "domain": "domain",
- "enabled": false,
- "tags": [
- "Tag 1"
],
- "username": "Webhook Username",
- "message_config": {
- "blocked_triggers": [
- "ALERT",
- "BUTTON"
]
},
- "blocked_triggers": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "The link to self",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to update the WebHook",
- "type": "PATCH"
},
- "delete": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to delete the WebHook",
- "type": "DELETE"
},
- "enable": {
- "href": "http://localhost:10001/webhooks/123/enable",
- "title": "Link to enable the WebHook",
- "type": "POST"
},
- "webhooks": {
- "href": "http://localhost:10001/webhooks",
- "title": "Link to get all Webhooks",
- "type": "GET"
}
}
- "self": {
}
List webhooks
Lists webHooks for the user per given page, filter and ordering. Creates hypermedia links and templates on response.
query Parameters
enabled required | boolean Example: enabled=true
filter by enabled status |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /webhookshttp://http://localhost:10001/webhooks
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "webhooks": [
- {
- "id": 123,
- "type": "DAILY",
- "name": "Webhook Name",
- "url": "http://test.com/test",
- "domain": "Webhook Domain",
- "enabled": true,
- "tags": [
- "Tag 1"
],
- "username": "Webhook Username",
- "message_config": {
- "blocked_triggers": [
- "ALERT",
- "BUTTON"
]
},
- "blocked_triggers": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "The link to self",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to update the WebHook",
- "type": "PATCH"
},
- "delete": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to delete the WebHook",
- "type": "DELETE"
},
- "disable": {
- "href": "http://localhost:10001/webhooks/123/enable",
- "title": "Link to disable the WebHook",
- "type": "POST"
},
- "webhooks": {
- "href": "http://localhost:10001/webhooks",
- "title": "Link to get all Webhooks",
- "type": "GET"
}
}
- "self": {
}
]
- {
},
- "webhooks": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/webhooks"
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Delete webhooks by id
Deletes a webHook by the given id.
path Parameters
id required | integer Example: 123
WebHook id to delete. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
204
No Content
delete /webhooks/{id}http://http://localhost:10001/webhooks/{id}
Load webhooks by id
Load a webHook using the given id.
path Parameters
id required | integer Example: 123
WebHook to search for. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /webhooks/{id}http://http://localhost:10001/webhooks/{id}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 123,
- "type": "DAILY",
- "name": "Webhook Name",
- "url": "http://test.com/test",
- "domain": "Webhook Domain",
- "enabled": true,
- "tags": [
- "Tag 1"
],
- "username": "Webhook Username",
- "message_config": {
- "blocked_triggers": [
- "ALERT",
- "BUTTON"
]
},
- "blocked_triggers": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "The link to self",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to update the WebHook",
- "type": "PATCH"
},
- "delete": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to delete the WebHook",
- "type": "DELETE"
},
- "disable": {
- "href": "http://localhost:10001/webhooks/123/enable",
- "title": "Link to disable the WebHook",
- "type": "POST"
},
- "webhooks": {
- "href": "http://localhost:10001/webhooks",
- "title": "Link to get all Webhooks",
- "type": "GET"
}
}
- "self": {
}
Update webhooks by id
Update a webHook identified by the parameter id with the given WebHook resource.
path Parameters
id required | integer Example: 123
WebHook id to update. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
password required | string |
message_config required | object (MessageConfig) |
domain required | string |
name required | string |
type required | string
Must be one of [DAILY, ALARM, OPERATION_REPORTED, OPERATION_CREATED, OPERATION_REJECTED, HOURLY, GPS_LOCATION, PRESSURE_LOWSPEED, PRESSURE_HIGHSPEED, PRESSURE_SENSOR_V2, MIN_FLOW]. |
url required | string |
username required | string |
tags required | Array of strings |
Responses
200
OK
patch /webhooks/{id}http://http://localhost:10001/webhooks/{id}
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "password": "password",
- "message_config": {
- "blocked_triggers": [
- "ALERT"
]
},
- "blocked_triggers": [
- "domain": "domain",
- "name": "name",
- "type": "ALARM",
- "url": "http://test.com/test",
- "username": "username",
- "tags": [
- "Tag 1"
]
}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 123,
- "type": "ALARM",
- "name": "name",
- "url": "http://test.com/test",
- "domain": "domain",
- "enabled": true,
- "tags": [
- "Tag 1"
],
- "username": "username",
- "message_config": {
- "blocked_triggers": [
- "ALERT"
]
},
- "blocked_triggers": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "The link to self",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to update the WebHook",
- "type": "PATCH"
},
- "delete": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to delete the WebHook",
- "type": "DELETE"
},
- "disable": {
- "href": "http://localhost:10001/webhooks/123/enable",
- "title": "Link to disable the WebHook",
- "type": "POST"
},
- "webhooks": {
- "href": "http://localhost:10001/webhooks",
- "title": "Link to get all Webhooks",
- "type": "GET"
}
}
- "self": {
}
Enable/disable webhooks by id
Enables a webHook by the given id if it is disabled, otherwise disable it if enabled.
path Parameters
id required | integer Example: 123
WebHook id to enable/disable. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
post /webhooks/{id}/enablehttp://http://localhost:10001/webhooks/{id}/enable
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 123,
- "type": "DAILY",
- "name": "Webhook Name",
- "url": "http://test.com/test",
- "domain": "Webhook Domain",
- "enabled": true,
- "tags": [
- "Tag 1"
],
- "username": "Webhook Username",
- "message_config": {
- "blocked_triggers": [
- "ALERT",
- "BUTTON"
]
},
- "blocked_triggers": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "The link to self",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to update the WebHook",
- "type": "PATCH"
},
- "delete": {
- "href": "http://localhost:10001/webhooks/123",
- "title": "Link to delete the WebHook",
- "type": "DELETE"
},
- "disable": {
- "href": "http://localhost:10001/webhooks/123/enable",
- "title": "Link to disable the WebHook",
- "type": "POST"
},
- "webhooks": {
- "href": "http://localhost:10001/webhooks",
- "title": "Link to get all Webhooks",
- "type": "GET"
}
}
- "self": {
}
Load webhooks logs by id
Load a webHook using the given id.
path Parameters
id required | integer Example: 10
WebHook id to get logs |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /webhooks/{id}/logshttp://http://localhost:10001/webhooks/{id}/logs
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "webhook_logs": [
- {
- "id": 310581714305100,
- "url": "Tr5BSKy_0B",
- "timestamp": "2020-05-06T12:18:54+00:00",
- "webhook_id": 10,
- "response_status": "IBjAjmMCiy",
- "response_code": 2085588451,
- "triggered_by": 310581713566500,
- "response_error_message": "0L3c1lW4zb",
- "_links": {
- "webhook": {
- "href": "http://localhost:10001/webhooks/10",
- "title": "Link to get WebHook",
- "type": "GET"
}
}
- "webhook": {
}
]
- {
},
- "webhook_logs": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/webhooks/10/logs"
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
daily-endpoints
Load daily data by id
Load a daily data using the given id. Creates hypermedia links and templates on response.
path Parameters
id required | integer Example: 123
Daily data to search for. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /data/daily/{id}http://http://localhost:10001/data/daily/{id}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 123,
- "timestamp": "2020-05-06T12:17:44+00:00",
- "date": "2020-05-06",
- "created_at": "2020-05-06T12:17:44+00:00",
- "dispersed_value": 4,
- "estimation": false,
- "estimation_disp": false,
- "accumulated_value": 6,
- "device_data": {
- "@type": "valveData"
},
- "device_number": "123456",
- "device_type": "SMARTVALVE",
- "sigfox_data": {
- "avg_signal": 13,
- "rssi": -135,
- "signal": 13.29,
- "station": "10D5"
},
- "wm_bus_data": {
- "counter": 1,
- "failed": false,
- "rssi": -10
},
- "advanced_sigfox_data": {
- "lqi": "AVERAGE",
- "computed_location": {
- "radius": 500,
- "latitude": 51.0119,
- "longitude": 4.32888
}
},
- "_links": {
- "self": {
- "href": "http://localhost:10001/data/daily/123",
- "title": "Link to resource",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/123456",
- "title": "Link to get daily's Device",
- "type": "GET"
},
- "dailyData": {
- "href": "http://localhost:10001/data/daily",
- "title": "Link to get all daily data",
- "type": "GET"
}
}
- "self": {
}
List daily data
Lists daily data for the user per given page, filter and ordering. Creates hypermedia links and templates on response.
query Parameters
dispersed_value__gt required | integer <int32> Example: dispersed_value__gt=1
Filter by dispersed value |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /data/dailyhttp://http://localhost:10001/data/daily
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "dailies": [
- {
- "id": 123,
- "timestamp": "2020-05-06T12:17:44+00:00",
- "date": "2020-05-06",
- "created_at": "2020-05-06T12:17:44+00:00",
- "dispersed_value": 4,
- "estimation": false,
- "estimation_disp": false,
- "accumulated_value": 6,
- "device_data": {
- "@type": "valveData"
},
- "device_number": "123456",
- "device_type": "SMARTVALVE",
- "sigfox_data": {
- "avg_signal": 13,
- "rssi": -135,
- "signal": 13.29,
- "station": "10D5"
},
- "wm_bus_data": {
- "counter": 1,
- "failed": false,
- "rssi": -10
},
- "advanced_sigfox_data": {
- "lqi": "AVERAGE",
- "computed_location": {
- "radius": 500,
- "latitude": 51.0119,
- "longitude": 4.32888
}
},
- "_links": {
- "self": {
- "href": "http://localhost:10001/data/daily/123",
- "title": "Link to resource",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/123456",
- "title": "Link to get daily's Device",
- "type": "GET"
},
- "dailyData": {
- "href": "http://localhost:10001/data/daily",
- "title": "Link to get all daily data",
- "type": "GET"
}
}
- "self": {
}
]
- {
},
- "dailies": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/data/daily"
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Get aggregate of Daily
Gets an aggregate of Daily by AggregateFilter.
path Parameters
filter required | string Example: MONTHLY
AggregateFilter to do the aggregation. Must be one of [HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY, DAY]. |
query Parameters
dispersed_value__gt required | integer <int32> Example: dispersed_value__gt=1
Filter by dispersed value |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /data/daily/aggregate/{filter}http://http://localhost:10001/data/daily/aggregate/{filter}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "dailies": [
- {
- "date": "2020-05-06",
- "dispersed_value": 10,
- "accumulated_value": 36,
- "device_data": {
- "min_ambient_temperature": 20,
- "max_flow": 17.4
}
}
]
- {
},
- "dailies": [
- "_links": {
- "self": {
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
device-endpoints
Count percentage
Count Percentage Of Successfully Daily
path Parameters
deviceId required | string Example: 123124
Id of the device |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /devices/daily/count/{deviceId}http://http://localhost:10001/devices/daily/count/{deviceId}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "percentage_value": 93,
- "kpi_type": "GOOD",
- "update_at": "2020-05-06T12:17:50+00:00"
}
Load device by number
Load device using the given device number. Creates hypermedia links and templates on response showing the actions that the response device can do.
path Parameters
number required | string Example: 123124
Device number to search for. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /devices/{number}http://http://localhost:10001/devices/{number}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "index": 1000,
- "settings": {
- "sigfox_id": "1165",
- "number": "1165",
- "name": "Device 1165",
- "type": "SMARTVALVE"
},
- "counters": {
- "uplinks": 2,
- "downlinks": 2,
- "operations": 2,
- "resets": 2
},
- "tags": [ ],
- "data": {
- "min_flow_outofdate": false,
- "@type": "valveData"
},
- "state": {
- "@type": "valveState",
- "position": "CLOSED"
},
- "timezone": "Europe/Brussels",
- "status": {
- "support": true,
- "open_alarms": true,
- "open_operations": true
},
- "last_operation_report": "2020-05-06T12:17:50+00:00",
- "last_message_report": "2020-05-06T12:17:50+00:00",
- "gdpr_state": {
- "optin": true,
- "updated_at": "2020-05-06T12:17:50.287Z",
- "updated_by": "hydrosense",
- "reference": "reference",
- "timestamp": "2020-05-06T13:17:50.287",
- "completed": true
},
- "last_gps_location": {
- "date": "2020-05-06",
- "eventTime": "2020-05-06T12:17:50+00:00",
- "gpsSatellites": 2,
- "gpsHdop": 2,
- "gpsAltitude": 2,
- "accX": 2,
- "accY": 2,
- "accZ": 2,
- "latitude": 50.85045,
- "longitude": 4.34878,
- "valid": true
},
- "last_sigfox_gps": {
- "radius": 2,
- "latitude": 50.85045,
- "longitude": 4.34878
},
- "daily_kpi": {
- "percentage_value": 80,
- "kpi_type": "GOOD",
- "update_at": "2020-05-06T12:17:50+00:00"
},
- "switch_network": false,
- "_links": {
- "self": {
- "href": "http://localhost:10001/devices/1165",
- "title": "The link to self",
- "type": "GET"
},
- "reset": {
- "href": "http://localhost:10001/devices/1165/reset",
- "title": "The links to reset a device",
- "type": "POST"
},
- "report": {
- "href": "http://localhost:10001/devices/1165/report",
- "title": "The links to createSmartvalveDeviceType an operation for the device",
- "type": "POST"
},
- "open": {
- "href": "http://localhost:10001/devices/1165/state/open",
- "title": "open",
- "type": "POST"
},
- "throttle": {
- "href": "http://localhost:10001/devices/1165/state/throttle",
- "title": "throttle",
- "type": "POST"
},
- "devices": {
- "href": "http://localhost:10001/devices",
- "title": "The link to get all the devices",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/devices/1165",
- "title": "The link to update the device",
- "type": "PATCH"
},
- "gdpr": [
- {
- "href": "http://localhost:10001/devices/1165/gdpr/optin",
- "title": "Optin Device",
- "type": "POST"
},
- {
- "href": "http://localhost:10001/devices/1165/gdpr/optout",
- "title": "Optout Device",
- "type": "POST"
},
- {
- "href": "http://localhost:10001/devices/1165/gdpr",
- "title": "Fetch device gdpr state",
- "type": "GET"
}
]
- {
}
- "self": {
}
Update device by number
Updates the device using a patch.
path Parameters
number required | string Example: 123124
Device number to patch. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
timezone required | string
The new timezone of the device. |
name required | string
New name to be updated in provision device. |
reportInterval required | string
Report interval to be updated. Must be one of [HOURLY, DAILY, HIGH_FREQUENCY]. |
settings required | object (Settings) |
Responses
200
OK
patch /devices/{number}http://http://localhost:10001/devices/{number}
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "timezone": "Europe/London",
- "name": "new name",
- "reportInterval": null,
- "settings": {
- "diameter": "1DE",
- "length": 45
}
}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "index": 1000,
- "settings": {
- "sigfox_id": "3120",
- "number": "3120",
- "name": "new name",
- "type": "SMARTVALVE",
- "report_interval": "DAILY",
- "diameter": "1DE",
- "length": 45
},
- "counters": {
- "uplinks": 2,
- "downlinks": 2,
- "operations": 2,
- "resets": 2
},
- "tags": [ ],
- "data": {
- "min_flow_outofdate": false,
- "@type": "valveData"
},
- "state": {
- "@type": "valveState",
- "position": "CLOSED"
},
- "timezone": "Europe/London",
- "status": {
- "support": true
},
- "last_operation_report": "2020-05-06T12:17:49+00:00",
- "last_message_report": "2020-05-06T12:17:49+00:00",
- "gdpr_state": {
- "optin": true,
- "updated_at": "2020-05-06T12:17:49.786Z",
- "updated_by": "hydrosense",
- "reference": "reference",
- "timestamp": "2020-05-06T13:17:49.786",
- "completed": true
},
- "last_gps_location": {
- "date": "2020-05-06",
- "eventTime": "2020-05-06T12:17:49+00:00",
- "gpsSatellites": 2,
- "gpsHdop": 2,
- "gpsAltitude": 2,
- "accX": 2,
- "accY": 2,
- "accZ": 2,
- "latitude": 50.85045,
- "longitude": 4.34878,
- "valid": true
},
- "last_sigfox_gps": {
- "radius": 2,
- "latitude": 50.85045,
- "longitude": 4.34878
},
- "daily_kpi": {
- "percentage_value": 80,
- "kpi_type": "GOOD",
- "update_at": "2020-05-06T12:17:49+00:00"
},
- "switch_network": false,
- "_links": {
- "self": {
- "href": "http://localhost:10001/devices/3120",
- "title": "The link to self",
- "type": "GET"
},
- "reset": {
- "href": "http://localhost:10001/devices/3120/reset",
- "title": "The links to reset a device",
- "type": "POST"
},
- "report": {
- "href": "http://localhost:10001/devices/3120/report",
- "title": "The links to createSmartvalveDeviceType an operation for the device",
- "type": "POST"
},
- "open": {
- "href": "http://localhost:10001/devices/3120/state/open",
- "title": "open",
- "type": "POST"
},
- "throttle": {
- "href": "http://localhost:10001/devices/3120/state/throttle",
- "title": "throttle",
- "type": "POST"
},
- "devices": {
- "href": "http://localhost:10001/devices",
- "title": "The link to get all the devices",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/devices/3120",
- "title": "The link to update the device",
- "type": "PATCH"
},
- "gdpr": [
- {
- "href": "http://localhost:10001/devices/3120/gdpr/optin",
- "title": "Optin Device",
- "type": "POST"
},
- {
- "href": "http://localhost:10001/devices/3120/gdpr/optout",
- "title": "Optout Device",
- "type": "POST"
},
- {
- "href": "http://localhost:10001/devices/3120/gdpr",
- "title": "Fetch device gdpr state",
- "type": "GET"
}
]
- {
}
- "self": {
}
Load all devices
Loads all devices for the user per given page , filter and ordering. Creates hypermedia links and templates on response showing the actions that each device can do.
query Parameters
settings.number required | integer <int32> Example: settings.number=123456
Filter by settings number |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /deviceshttp://http://localhost:10001/devices
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "devices": [
- {
- "index": 1000,
- "settings": {
- "sigfox_id": "2891",
- "number": "2891",
- "name": "Device 2891",
- "type": "SMARTVALVE"
},
- "counters": {
- "uplinks": 2,
- "downlinks": 2,
- "operations": 2,
- "resets": 2
},
- "tags": [ ],
- "data": {
- "min_flow_outofdate": false,
- "@type": "valveData"
},
- "state": {
- "@type": "valveState",
- "position": "CLOSED"
},
- "timezone": "Europe/Brussels",
- "status": {
- "support": true,
- "open_alarms": true,
- "open_operations": true
},
- "last_operation_report": "2020-05-06T12:17:51+00:00",
- "last_message_report": "2020-05-06T12:17:51+00:00",
- "gdpr_state": {
- "optin": true,
- "updated_at": "2020-05-06T12:17:51.365Z",
- "updated_by": "hydrosense",
- "reference": "reference",
- "timestamp": "2020-05-06T13:17:51.365",
- "completed": true
},
- "last_gps_location": {
- "date": "2020-05-06",
- "eventTime": "2020-05-06T12:17:51+00:00",
- "gpsSatellites": 2,
- "gpsHdop": 2,
- "gpsAltitude": 2,
- "accX": 2,
- "accY": 2,
- "accZ": 2,
- "latitude": 50.85045,
- "longitude": 4.34878,
- "valid": true
},
- "last_sigfox_gps": {
- "radius": 2,
- "latitude": 50.85045,
- "longitude": 4.34878
},
- "daily_kpi": {
- "percentage_value": 80,
- "kpi_type": "GOOD",
- "update_at": "2020-05-06T12:17:51+00:00"
},
- "switch_network": false,
- "_links": {
- "self": {
- "href": "http://localhost:10001/devices/2891",
- "title": "The link to self",
- "type": "GET"
},
- "reset": {
- "href": "http://localhost:10001/devices/2891/reset",
- "title": "The links to reset a device",
- "type": "POST"
},
- "report": {
- "href": "http://localhost:10001/devices/2891/report",
- "title": "The links to createSmartvalveDeviceType an operation for the device",
- "type": "POST"
},
- "open": {
- "href": "http://localhost:10001/devices/2891/state/open",
- "title": "open",
- "type": "POST"
},
- "throttle": {
- "href": "http://localhost:10001/devices/2891/state/throttle",
- "title": "throttle",
- "type": "POST"
},
- "devices": {
- "href": "http://localhost:10001/devices",
- "title": "The link to get all the devices",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/devices/2891",
- "title": "The link to update the device",
- "type": "PATCH"
},
- "gdpr": [
- {
- "href": "http://localhost:10001/devices/2891/gdpr/optin",
- "title": "Optin Device",
- "type": "POST"
},
- {
- "href": "http://localhost:10001/devices/2891/gdpr/optout",
- "title": "Optout Device",
- "type": "POST"
},
- {
- "href": "http://localhost:10001/devices/2891/gdpr",
- "title": "Fetch device gdpr state",
- "type": "GET"
}
]
- {
}
- "self": {
}
]
- {
},
- "devices": [
- "_links": {
- "self": {
}
},
- "self": {
- "page": {
- "size": 5,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Create report for device
Creates a report operation for the device.
path Parameters
number required | string Example: 123124
Device number to report. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
apply_immediately required | boolean
If operation should be applied on next downlink. |
apply_at required | string
Datetime when operation should be applied. |
Responses
200
OK
post /devices/{number}/reporthttp://http://localhost:10001/devices/{number}/report
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "apply_immediately": false,
- "apply_at": "2020-04-29T14:57:17+00:00"
}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 1,
- "state": "SYNCHRONIZED",
- "finished": false,
- "device_number": "4529",
- "device_name": "Device 4529",
- "device_type": "SMARTVALVE",
- "operation_type": "REPORT",
- "requested_state": {
- "@type": "valveState",
- "position": "CLOSED"
},
- "apply_immediately": true,
- "apply_at": "2020-05-06T12:17:49+00:00",
- "_links": {
- "cancel": {
- "href": "http://localhost:10001/operations/1/cancel",
- "title": "Cancels the operation if not finish",
- "type": "POST"
},
- "operations": {
- "href": "http://localhost:10001/operations",
- "title": "Link to get all Operations",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/4529",
- "title": "Link to get operation's Device",
- "type": "GET"
}
}
- "cancel": {
}
Reset device
Creates a hardware reset for a device
path Parameters
number required | string Example: 123124
Device number to patch. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
apply_immediately required | boolean
If operation should be applied on next downlink. |
apply_at required | string
Datetime when operation should be applied. |
Responses
200
OK
post /devices/{number}/resethttp://http://localhost:10001/devices/{number}/reset
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "apply_immediately": false,
- "apply_at": "2020-04-29T14:57:19+00:00"
}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 1,
- "state": "SYNCHRONIZED",
- "finished": false,
- "device_number": "4819",
- "device_name": "Device 4819",
- "device_type": "SMARTVALVE",
- "operation_type": "REPORT",
- "requested_state": {
- "@type": "valveState",
- "position": "CLOSED"
},
- "apply_immediately": true,
- "apply_at": "2020-05-06T12:17:51+00:00",
- "_links": {
- "cancel": {
- "href": "http://localhost:10001/operations/1/cancel",
- "title": "Cancels the operation if not finish",
- "type": "POST"
},
- "operations": {
- "href": "http://localhost:10001/operations",
- "title": "Link to get all Operations",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/4819",
- "title": "Link to get operation's Device",
- "type": "GET"
}
}
- "cancel": {
}
Search devices
Search devices based on Number / DeviceId / Name.
query Parameters
q required | string Example: q=1B1
Text to be search. |
selected required | integer <int32> Example: selected=12345679
Device number selected not to be searched. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
204
No Content
get /devices/_searchhttp://http://localhost:10001/devices/_search
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all [
- {
- "sigfox_id": "1B1B1",
- "number": "12345678",
- "name": "Cmas Demo Device",
- "type": "SMARTVALVE"
},
- {
- "sigfox_id": "1B1B3",
- "number": "12345679",
- "name": "Cmas Demo Device 2",
- "type": "SMARTVALVE"
}
]
Update device State
Creates a state change operation for the device.
path Parameters
number required | string Example: 123124
Target device number. |
operation required | string Example: open
Update state operation. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
requested_state required | object (RequestedState) |
apply_immediately required | boolean
If operation should be applied on next downlink. |
apply_at required | string
Datetime when operation should be applied. |
Responses
200
OK
post /devices/{number}/state/{operation}http://http://localhost:10001/devices/{number}/state/{operation}
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "requested_state": {
- "max_flow": 20
},
- "apply_immediately": false,
- "apply_at": "2020-04-30T14:57:19+00:00"
}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 1,
- "state": "SYNCHRONIZED",
- "finished": false,
- "device_number": "4856",
- "device_name": "Device 4856",
- "device_type": "SMARTVALVE",
- "operation_type": "STATE_CHANGE",
- "requested_state": {
- "@type": "valveState",
- "position": "CLOSED"
},
- "apply_immediately": true,
- "apply_at": "2020-05-06T12:17:50+00:00",
- "_links": {
- "cancel": {
- "href": "http://localhost:10001/operations/1/cancel",
- "title": "Cancels the operation if not finish",
- "type": "POST"
},
- "operations": {
- "href": "http://localhost:10001/operations",
- "title": "Link to get all Operations",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/4856",
- "title": "Link to get operation's Device",
- "type": "GET"
}
}
- "cancel": {
}
device-gdpr-endpoints
Optin Device
When a device is marked as optin the personal data will decoded and stored in Hydrosense™ Platform. Tenant can provide an external reference for the customer’s consent and a timestamp of the given consent. This method can return the following code ACCEPTED: If request succeed NOT_FOUND: If the device does not exists or does not belongs to the tenant CONFLICT: If an optout job is active
path Parameters
number required | string Example: 1245215
Device number. |
header Parameters
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
202
Accepted
204
No content
post /devices/{number}/gdpr/optinhttp://http://localhost:10001/devices/{number}/gdpr/optin
Response samples
- 202
Content typeapplication/jsonCopy Expand all Collapse all {
- "optin": true,
- "updated_at": "2020-05-06T12:17:55.897Z",
- "updated_by": "john",
- "reference": "dfc7c481-0c50-4f75-9853-afc761ada2de",
- "timestamp": "2020-05-06T08:17:55.897",
- "completed": true
}
Optout given device.
When a device is marked as optin the personal data will decoded and stored in Hydrosense™ Platform. Tenant can provide an external reference for the customer’s consent and a timestamp of the given consent. When a device is optout a job is created to remove the customer Personal Data. This is and async process and the operation it’s considered completed only when job completes successfully This method can return the following code ACCEPTED: If request succeed NOT_FOUND: If the device does not exists or does not belongs to the tenant CONFLICT: If the device it’s not fully open or an operation is active and syncronized with the device
path Parameters
number required | string Example: 1245215
Device number. |
header Parameters
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
202
Accepted
204
No content
post /devices/{number}/gdpr/optouthttp://http://localhost:10001/devices/{number}/gdpr/optout
Response samples
- 202
Content typeapplication/jsonCopy Expand all Collapse all {
- "optin": false,
- "updated_at": "2020-05-06T12:17:56.179Z",
- "updated_by": "john",
- "reference": "3e207ef5-44ca-4fab-8f91-3535866040ca",
- "timestamp": "2020-05-06T11:17:56.179",
- "completed": false
}
gps-location-endpoints
Load all
Lists GPS location data for the user per given page, filter and ordering. Creates hypermedia links and templates on response.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /data/gpsLocationhttp://http://localhost:10001/data/gpsLocation
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "gpsLocation": [
- {
- "id": 1,
- "date": "2020-05-06",
- "latitude": 50.85045,
- "longitude": 4.34878,
- "valid": true,
- "event_time": "2020-05-06T12:18:01+00:00",
- "device_number": "1602",
- "gps_satellites": 2,
- "gps_hdop": 2,
- "gps_altitude": 2,
- "acc_x": 1,
- "acc_y": 1,
- "acc_z": 1,
- "gps_sigfox": {
- "radius": 2,
- "latitude": 50.85045,
- "longitude": 4.34878
}
}
]
- {
},
- "gpsLocation": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/data/gpsLocation"
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
gps-sigfox-endpoints
Load all
Lists GPS Sigfox data for the user per given page, filter and ordering. Creates hypermedia links and templates on response.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /data/gpsSigfoxhttp://http://localhost:10001/data/gpsSigfox
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "gpsSigfox": [
- {
- "id": 1,
- "date": "2020-05-06",
- "latitude": 50.85045,
- "longitude": 4.34878,
- "radius": 2,
- "event_time": "2020-05-06T12:18:06+00:00",
- "device_number": "1192"
}
]
- {
},
- "gpsSigfox": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/data/gpsSigfox"
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
h-f-usage-endpoints
Export HFUsage
Export HFUsage data as CSV.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
string
Responses
200
OK
post /data/hfusage/exporthttp://http://localhost:10001/data/hfusage/export
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all "device_number=12345×tamp__gte=2017-01-01T02%3A02%3A02Z×tamp__lte=2018-01-01T02%3A02%3A02Z"
battery-endpoints
Aggregate
Gets an aggregate of BatteryIndex by AggregateFilter.
path Parameters
filter required | string Example: MONTHLY
Must be one of [HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY, DAY]. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /battery/aggregate/{filter}http://http://localhost:10001/battery/aggregate/{filter}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "batteries": [
- {
- "timestamp": "2020-05-06T13:17:38+00:00",
- "voltage": 123.4
}
]
- {
},
- "batteries": [
- "_links": {
- "self": {
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Load battery
Load Battery Index using the given identifier. Creates hypermedia links and templates on response.
path Parameters
id required | string Example: 5
BatteryIndex to search for. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /battery/{id}http://http://localhost:10001/battery/{id}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 5,
- "timestamp": "2020-05-06T12:17:38+00:00",
- "voltage": 123.4,
- "firmware": "firmware",
- "device_number": "123456",
- "device_type": "SMARTVALVE",
- "_links": {
- "self": {
- "href": "http://localhost:10001/battery/5",
- "title": "Link to resource",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/123456",
- "title": "Link to get battery's Device",
- "type": "GET"
},
- "batteries": {
- "href": "http://localhost:10001/battery",
- "title": "Link to load all batteries",
- "type": "GET"
}
}
- "self": {
}
Load all batteries
Loads all battery index using filter and ordering. Creates hypermedia links and templates on response showing the actions that each device can do.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /batteryhttp://http://localhost:10001/battery
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "batteries": [
- {
- "id": 5,
- "timestamp": "2020-05-06T12:17:39+00:00",
- "voltage": 123.4,
- "firmware": "firmware",
- "device_number": "123456",
- "device_type": "SMARTVALVE",
- "_links": {
- "self": {
- "href": "http://localhost:10001/battery/5",
- "title": "Link to resource",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/123456",
- "title": "Link to get battery's Device",
- "type": "GET"
},
- "batteries": {
- "href": "http://localhost:10001/battery",
- "title": "Link to load all batteries",
- "type": "GET"
}
}
- "self": {
}
]
- {
},
- "batteries": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/battery"
}
},
- "self": {
- "page": {
- "size": 5,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
operation-endpoints
Cancel operation
Tries to cancel the operation if this is not finish.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
post /operations/{id}/cancelhttp://http://localhost:10001/operations/{id}/cancel
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 1,
- "state": "SYNCHRONIZED",
- "finished": false,
- "device_number": "1051",
- "device_name": "Device 1051",
- "device_type": "SMARTVALVE",
- "operation_type": "STATE_CHANGE",
- "requested_state": {
- "@type": "valveState",
- "position": "CLOSED"
},
- "apply_immediately": true,
- "apply_at": "2020-05-06T12:18:22+00:00",
- "_links": {
- "cancel": {
- "href": "http://localhost:10001/operations/1/cancel",
- "title": "Cancels the operation if not finish",
- "type": "POST"
},
- "operations": {
- "href": "http://localhost:10001/operations",
- "title": "Link to get all Operations",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/1051",
- "title": "Link to get operation's Device",
- "type": "GET"
}
}
- "cancel": {
}
Load all operations
Lists operations for the user per given page, filter and ordering. Creates hypermedia links and templates on response.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /operationshttp://http://localhost:10001/operations
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "operations": [
- {
- "id": 1,
- "state": "SCHEDULED",
- "finished": false,
- "device_number": "123456",
- "device_name": "Hydro-Konekt 2.0",
- "device_type": "SMARTVALVE",
- "operation_type": "STATE_CHANGE",
- "requested_state": {
- "@type": "valveState",
- "max_flow": 432439997,
- "position": "UNKNOWN"
},
- "apply_immediately": false,
- "apply_at": "2020-05-06T12:18:22+00:00",
- "created_date": "2020-05-06T12:18:22+00:00",
- "created_by": "hydrosense",
- "_links": {
- "cancel": {
- "href": "http://localhost:10001/operations/1/cancel",
- "title": "Cancels the operation if not finish",
- "type": "POST"
},
- "operations": {
- "href": "http://localhost:10001/operations",
- "title": "Link to get all Operations",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/123456",
- "title": "Link to get operation's Device",
- "type": "GET"
}
}
- "cancel": {
}
]
- {
},
- "operations": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/operations"
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Load operation
Load operation using the given identifier. Creates hypermedia links and templates on response showing the actions that the response operation can do.
path Parameters
id required | string Example: 1
id of the operation. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /operations/{id}http://http://localhost:10001/operations/{id}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 1,
- "state": "SCHEDULED",
- "finished": false,
- "device_number": "123456",
- "device_name": "Hydro-Konekt 2.0",
- "device_type": "SMARTVALVE",
- "operation_type": "STATE_CHANGE",
- "requested_state": {
- "@type": "valveState",
- "max_flow": 568165489,
- "position": "OPENED"
},
- "apply_immediately": false,
- "apply_at": "2020-05-06T12:18:22+00:00",
- "created_date": "2020-05-06T12:18:22+00:00",
- "created_by": "hydrosense",
- "_links": {
- "cancel": {
- "href": "http://localhost:10001/operations/1/cancel",
- "title": "Cancels the operation if not finish",
- "type": "POST"
},
- "operations": {
- "href": "http://localhost:10001/operations",
- "title": "Link to get all Operations",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/123456",
- "title": "Link to get operation's Device",
- "type": "GET"
}
}
- "cancel": {
}
pressure-sensor-endpoints
Load All
List all Pressure Sensor data for the user per given page, filter and ordering. Creates hypermedia links and templates on response.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /data/pressureSensorhttp://http://localhost:10001/data/pressureSensor
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "pressureSensor": [
- {
- "id": 1,
- "date": "2020-05-06",
- "event_time": "2020-05-06T12:18:27+00:00",
- "device_number": "3787",
- "type": "PRESSURE_LOWSPEED",
- "pressure_sensor_data": {
- "readings": [
- {
- "readingTime": "2020-05-06T12:18:27.499Z",
- "adcValue": "77",
- "decimalReading": 119,
- "pressure": 3.56
}
],
- {
- "@type": "pressureLowSpeedData",
- "packet_time": "2020-05-06T13:18:27.499+01:00"
}
- "readings": [
}
]
- {
},
- "pressureSensor": [
- "_links": {
- "self": {
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
report-endpoints
Download report
Download report for given id. A report can be downloaded in next five days after it's been completed.
path Parameters
id required | string Example: 1
Report identifier |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /report/{id}http://http://localhost:10001/report/{id}
Load all reports
Loads all of the Reports
query Parameters
status required | string Example: status=COMPLETED
Filter by report status |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /reporthttp://http://localhost:10001/report
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "reportResourceList": [
- {
- "id": 1,
- "upload_at": "2020-04-29T14:58:34+00:00",
- "uploaded_by": "test",
- "status": "PROCESSING",
- "name": "Report_1.csv",
- "filename": "TestUpload.csv",
- "_links": {
- "reports": {
- "href": "http://localhost:10001/report",
- "title": "Link to get all of the Reports",
- "type": "GET"
}
}
- "reports": {
},
- {
- "id": 1,
- "upload_at": "2020-04-29T14:58:34+00:00",
- "completed_at": "2020-04-29T14:58:34+00:00",
- "uploaded_by": "test",
- "requested": 15,
- "processed": 15,
- "status": "COMPLETED",
- "name": "Report_1.csv",
- "filename": "TestUpload.csv",
- "_links": {
- "download": {
- "href": "http://localhost:10001/report/1",
- "title": "Link to download the Report",
- "type": "GET"
},
- "reports": {
- "href": "http://localhost:10001/report",
- "title": "Link to get all of the Reports",
- "type": "GET"
}
}
- "download": {
},
- {
- "id": 1,
- "upload_at": "2020-04-29T14:58:34+00:00",
- "uploaded_by": "test",
- "status": "PROCESSING",
- "name": "Report_1.csv",
- "filename": "TestUpload.csv",
- "_links": {
- "reports": {
- "href": "http://localhost:10001/report",
- "title": "Link to get all of the Reports",
- "type": "GET"
}
}
- "reports": {
}
]
- {
},
- "reportResourceList": [
- "_links": {
- "self": {
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 3,
- "totalPages": 1,
- "number": 0
}
}
Create report
Creates a new report request for given file.
header Parameters
Content-Type required | string Example: application/json
Content type produced |
Request Body schema: multipart/form-data
file required | string
File with device ids |
Responses
202
Accepted
post /reporthttp://http://localhost:10001/report
tags-endpoints
Assign to device
Assign list of Tags to one device.
path Parameters
deviceNumber required | string Example: 123ABC
Device number |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
Array string
Responses
200
OK
post /tags/assign/device/{deviceNumber}http://http://localhost:10001/tags/assign/device/{deviceNumber}
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all [
- "Tag 1"
]
Assign tags to device
Assign only one device to a list of Tag.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
devices required | Array of strings
Set of Sigfox numbers. |
tags required | Array of strings
Set of tags name. |
Responses
200
OK
post /tags/assignhttp://http://localhost:10001/tags/assign
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "devices": [
- "123ABC"
],
- "tags": [
- "Tag 1"
]
}
Create tag
Creates a new Tag.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
name required | string
Tag name. |
Responses
201
Created
post /tagshttp://http://localhost:10001/tags
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "name": "Tag 1"
}
Response samples
- 201
Content typeapplication/jsonCopy Expand all Collapse all {
- "name": "Tag 1",
- "created_date": "2020-05-06T12:18:38+00:00",
- "created_by": "cmas",
- "_links": {
- "self": {
- "href": "http://localhost:10001/tags/Tag%201"
}
}
- "self": {
}
Load all tags
Load all existing Tags.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /tagshttp://http://localhost:10001/tags
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "tags": [
- {
- "name": "Tag 1",
- "created_date": "2020-05-06T12:18:38+00:00",
- "created_by": "cmas",
- "_links": {
- "self": {
- "href": "http://localhost:10001/tags/Tag%201"
}
}
- "self": {
}
]
- {
},
- "tags": [
- "_links": {
- "self": {
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Delete tag
Delete an existing Tag by id.
path Parameters
name required | string Example: Tag%201
Tag name. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
204
No Content
delete /tags/{name}http://http://localhost:10001/tags/{name}
Load tag
Load tag by id
path Parameters
name required | string Example: Tag%201
Tag name. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /tags/{name}http://http://localhost:10001/tags/{name}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "name": "Tag 1",
- "created_date": "2020-05-06T12:18:37+00:00",
- "created_by": "cmas",
- "_links": {
- "self": {
- "href": "http://localhost:10001/tags/Tag%201"
}
}
- "self": {
}
tenant-endpoints
List tenant environments
Loads from provision the tenant environments that the given tenantCode exists in.
path Parameters
tenantCode required | string Example: Tag%201
Tag name. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
204
No Content
get /tenants/{tenantCode}/environmentshttp://http://localhost:10001/tenants/{tenantCode}/environments
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all [
- {
- "code": "dev"
}
]
Load tenant
Load a Tenant using the given tenant code Puts on response hypermedia links and templates with the actions related to the tenant.
path Parameters
tenantCode required | string Example: Tag%201
Tag name. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /tenants/{tenantCode}http://http://localhost:10001/tenants/{tenantCode}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "tenant_code": "f6wOplp_P0",
- "tenant_name": "hvjrAobAdv",
- "sub_domain": "AeS1sbF3MW",
- "permissions": [
- {
- "type": "ACCESS_HOURLY_VALUES",
- "mode": "STRICT",
- "types": [
- "KAMSTRUP_SIGFOX",
- "SIGFOX_WMBUS_FORWARDER",
- "PRESSURE_LOWSPEED",
- "PRESSURE_HIGHSPEED",
- "SMARTVALVE_2"
],
- "strictMode": true
}
],
- {
- "_links": {
- "self": {
},
- "tenants": {
- "href": "http://localhost:10001/tenants"
}
}
- "self": {
}
Load all tenants
Loads all Tenants for the environment. Puts on response hypermedia links and templates with the actions related to Tenant.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /tenantshttp://http://localhost:10001/tenants
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "tenants": [
- {
- "tenant_code": "bbL3vhCdKq",
- "tenant_name": "TsHmnPfebN",
- "sub_domain": "eDrh7VYom1",
- "permissions": [
- {
- "type": "ACCESS_HOURLY_VALUES",
- "mode": "STRICT",
- "types": [
- "SMARTVALVE_NB",
- "SIGFOX_WMBUS_FORWARDER",
- "SMARTVALVE",
- "SMART_STANDPIPE",
- "PRESSURE_HIGHSPEED"
],
- "strictMode": true
}
],
- {
- "_links": {
- "self": {
},
- "tenants": {
- "href": "http://localhost:10001/tenants"
}
}
- "self": {
}
]
- {
},
- "tenants": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/tenants"
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
tenants resolver
Load Tenant using the sub domain. The sub domain depends the given domain resolver.
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
string
Responses
200
OK
post /tenants/resolverhttp://http://localhost:10001/tenants/resolver
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all "http://localhost:4200"
user-endpoints
Create user
Create an user on IAM.
path Parameters
realmId required | string Example: master
Realm identifier |
header Parameters
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
firstName required | string |
lastName required | string |
email required | string |
username required | string |
Responses
201
Created
post /realms/{realmId}/usershttp://http://localhost:10001/realms/{realmId}/users
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "firstName": "Hydroko",
- "lastName": "Admin",
- "email": "hydroko@cmas-systems.com",
- "username": "admin"
}
Response samples
- 201
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": "123",
- "realm": "master",
- "username": "admin",
- "firstName": "Hydroko",
- "lastName": "Admin",
- "email": "hydroko@cmas-systems.com",
- "enabled": true,
- "roles": [
- "admin",
- "sys_admin"
],
- "environments": [
- "dev",
- "tst"
],
- "deviceTypes": [
- "hk_hydroko",
- "hydroko"
],
- "_links": {
- "self": {
- "href": "http://localhost:10001/realms/master/users/123",
- "title": "The link to self",
- "type": "GET"
},
- "users": {
- "href": "http://localhost:10001/realms/master/users",
- "title": "The link to get all Users",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/realms/master/users/123",
- "title": "The link to update the User",
- "type": "PUT"
}
}
- "self": {
}
Load all users
Load all existing users.
path Parameters
realmId required | string Example: master
Realm identifier |
query Parameters
realm required | string Example: realm=master
The realm name. |
header Parameters
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
404
Not found
get /realms/{realmId}/usershttp://http://localhost:10001/realms/{realmId}/users
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "users": [
- {
- "id": "123",
- "realm": "master",
- "username": "admin",
- "firstName": "Hydroko",
- "lastName": "Admin",
- "email": "hydroko@cmas-systems.com",
- "enabled": true,
- "roles": [
- "admin",
- "sys_admin"
],
- "environments": [
- "dev",
- "tst"
],
- "deviceTypes": [
- "hk_hydroko",
- "hydroko"
]
}
]
- {
},
- "users": [
- "_links": {
- "self": {
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Load user
Load user using the given id
path Parameters
realmId required | string Example: master
Realm identifier |
userId required | string Example: 123
The user unique identifier. |
header Parameters
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /realms/{realmId}/users/{userId}http://http://localhost:10001/realms/{realmId}/users/{userId}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": "123",
- "realm": "master",
- "username": "admin",
- "firstName": "Hydroko",
- "lastName": "Admin",
- "email": "hydroko@cmas-systems.com",
- "enabled": true,
- "roles": [
- "admin",
- "sys_admin"
],
- "environments": [
- "dev",
- "tst"
],
- "deviceTypes": [
- "hk_hydroko",
- "hydroko"
],
- "_links": {
- "self": {
- "href": "http://localhost:10001/realms/master/users/123",
- "title": "The link to self",
- "type": "GET"
},
- "users": {
- "href": "http://localhost:10001/realms/master/users",
- "title": "The link to get all Users",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/realms/master/users/123",
- "title": "The link to update the User",
- "type": "PUT"
}
}
- "self": {
}
Update user
Update a user identified by the parameter id with the given User.
path Parameters
realmId required | string Example: master
Realm identifier |
userId required | string Example: 123
The user unique identifier. |
header Parameters
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Request Body schema: application/hal+json
firstName required | string |
lastName required | string |
email required | string |
enabled required | boolean |
environments required | Array of strings |
deviceTypes required | Array of strings |
roles required | Array of strings |
Responses
200
OK
put /realms/{realmId}/users/{userId}http://http://localhost:10001/realms/{realmId}/users/{userId}
Request samples
- Payload
Content typeapplication/hal+jsonCopy Expand all Collapse all {
- "firstName": "Hydroko",
- "lastName": "Admin",
- "email": "hydroko@cmas-systems.com",
- "enabled": true,
- "environments": [ ],
- "deviceTypes": [
- "dev",
- "tst"
],
- "roles": [
- "hk_hydroko",
- "hydroko"
]
}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": "123",
- "realm": "master",
- "username": "admin",
- "firstName": "Hydroko",
- "lastName": "Admin",
- "email": "hydroko@cmas-systems.com",
- "enabled": true,
- "roles": [
- "admin",
- "sys_admin"
],
- "environments": [
- "dev",
- "tst"
],
- "deviceTypes": [
- "hk_hydroko",
- "hydroko"
],
- "_links": {
- "self": {
- "href": "http://localhost:10001/realms/master/users/123",
- "title": "The link to self",
- "type": "GET"
},
- "users": {
- "href": "http://localhost:10001/realms/master/users",
- "title": "The link to get all Users",
- "type": "GET"
},
- "update": {
- "href": "http://localhost:10001/realms/master/users/123",
- "title": "The link to update the User",
- "type": "PUT"
}
}
- "self": {
}
Reset user password
The method allows to send an email to the user requesting that the user reset his password.
path Parameters
realmId required | string Example: master
Realm identifier |
userId required | string Example: 123
The user unique identifier. |
header Parameters
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
204
No Content
post /realms/{realmId}/users/{userId}/resetPasswordhttp://http://localhost:10001/realms/{realmId}/users/{userId}/resetPassword
Update user status
The method allows to change the user status from enabled to disabled and the reverse When the user is disabled the active sessions are closed.
path Parameters
realmId required | string Example: master
Realm identifier |
userId required | string Example: 123
The user unique identifier. |
header Parameters
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
204
No Content
post /realms/{realmId}/users/{id}/enabledhttp://http://localhost:10001/realms/{realmId}/users/{id}/enabled
hourly-endpoints
Aggregate
Gets an aggregate of Hourly by AggregateFilter.
query Parameters
dispersed_value__gt required | integer <int32> Example: dispersed_value__gt=1
Filter by dispersed value |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /data/hourly/aggregatehttp://http://localhost:10001/data/hourly/aggregate
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "hourlies": [
- {
- "timestamp": "2020-05-06T13:18:17",
- "valid": false,
- "dispersed_value": 10
}
]
- {
},
- "hourlies": [
- "_links": {
- "self": {
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}
Load hourly data
Load a hourly data using the given id. Creates hypermedia links and templates on response.
path Parameters
id required | string Example: 123
Hourly data to search for. |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /data/hourly/{id}http://http://localhost:10001/data/hourly/{id}
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "id": 123,
- "timestamp": "2020-05-06T13:18:17",
- "valid": true,
- "dispersed_value": 4,
- "device_number": "123456",
- "device_type": "SMARTVALVE",
- "_links": {
- "self": {
- "href": "http://localhost:10001/data/hourly/123",
- "title": "Link to resource",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/123456",
- "title": "Link to get hourly's Device",
- "type": "GET"
},
- "hourlyData": {
- "href": "http://localhost:10001/data/hourly",
- "title": "Link to get all hourly data",
- "type": "GET"
}
}
- "self": {
}
Load all hourly data
Lists hourly data for the user per given page, filter and ordering. Creates hypermedia links and templates on response.
query Parameters
dispersed_value__gt required | integer <int32> Example: dispersed_value__gt=1
filter by dispersed value |
header Parameters
X-Tenant-Id required | string Example: public
Tenant name id |
Content-Type required | string Example: application/json
Content type produced |
Accept required | string Example: application/hal+json
Content type accepted |
Responses
200
OK
get /data/hourlyhttp://http://localhost:10001/data/hourly
Response samples
- 200
Content typeapplication/jsonCopy Expand all Collapse all {
- "_embedded": {
- "hourlies": [
- {
- "id": 123,
- "timestamp": "2020-05-06T13:18:17",
- "valid": true,
- "dispersed_value": 4,
- "device_number": "123456",
- "device_type": "SMARTVALVE",
- "_links": {
- "self": {
- "href": "http://localhost:10001/data/hourly/123",
- "title": "Link to resource",
- "type": "GET"
},
- "device": {
- "href": "http://localhost:10001/devices/123456",
- "title": "Link to get hourly's Device",
- "type": "GET"
},
- "hourlyData": {
- "href": "http://localhost:10001/data/hourly",
- "title": "Link to get all hourly data",
- "type": "GET"
}
}
- "self": {
}
]
- {
},
- "hourlies": [
- "_links": {
- "self": {
- "href": "http://localhost:10001/data/hourly"
}
},
- "self": {
- "page": {
- "size": 10,
- "totalElements": 1,
- "totalPages": 1,
- "number": 0
}
}