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/bulk
http://http://localhost:10001/alarms/ack/bulk

Request samples

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "action": "UNACK",
  • "alarmsIds":
    [
    ]
}

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

Content type
application/json
Copy
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":
    {
    },
  • "_links":
    {}
}

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 /alarms
http://http://localhost:10001/alarms

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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 /webhooks
http://http://localhost:10001/webhooks

Request samples

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "password": "password",
  • "messageConfig":
    {
    },
  • "domain": "domain",
  • "name": "name",
  • "type": "ALARM",
  • "url": "url",
  • "username": "username",
  • "tags":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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 /webhooks
http://http://localhost:10001/webhooks

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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

Content type
application/json
Copy
Expand all Collapse all
{}

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

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "password": "password",
  • "message_config":
    {
    },
  • "domain": "domain",
  • "name": "name",
  • "type": "ALARM",
  • "username": "username",
  • "tags":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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}/enable
http://http://localhost:10001/webhooks/{id}/enable

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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}/logs
http://http://localhost:10001/webhooks/{id}/logs

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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

Content type
application/json
Copy
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":
    {
    },
  • "device_number": "123456",
  • "device_type": "SMARTVALVE",
  • "sigfox_data":
    {
    },
  • "wm_bus_data":
    {
    },
  • "advanced_sigfox_data":
    {
    },
  • "_links":
    {}
}

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/daily
http://http://localhost:10001/data/daily

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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

Content type
application/json
Copy
Expand all Collapse all
{}

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

Content type
application/json
Copy
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

Content type
application/json
Copy
Expand all Collapse all
{
  • "index": 1000,
  • "settings":
    {
    },
  • "counters":
    {
    },
  • "tags": [ ],
  • "data":
    {
    },
  • "state":
    {
    },
  • "timezone": "Europe/Brussels",
  • "status":
    {
    },
  • "last_operation_report": "2020-05-06T12:17:50+00:00",
  • "last_message_report": "2020-05-06T12:17:50+00:00",
  • "gdpr_state":
    {
    },
  • "last_gps_location":
    {
    },
  • "last_sigfox_gps":
    {
    },
  • "daily_kpi":
    {
    },
  • "switch_network": false,
  • "_links":
    {}
}

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

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "timezone": "Europe/London",
  • "name": "new name",
  • "reportInterval": null,
  • "settings":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "index": 1000,
  • "settings":
    {
    },
  • "counters":
    {
    },
  • "tags": [ ],
  • "data":
    {
    },
  • "state":
    {
    },
  • "timezone": "Europe/London",
  • "status":
    {
    },
  • "last_operation_report": "2020-05-06T12:17:49+00:00",
  • "last_message_report": "2020-05-06T12:17:49+00:00",
  • "gdpr_state":
    {
    },
  • "last_gps_location":
    {
    },
  • "last_sigfox_gps":
    {
    },
  • "daily_kpi":
    {
    },
  • "switch_network": false,
  • "_links":
    {}
}

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 /devices
http://http://localhost:10001/devices

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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}/report
http://http://localhost:10001/devices/{number}/report

Request samples

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "apply_immediately": false,
  • "apply_at": "2020-04-29T14:57:17+00:00"
}

Response samples

Content type
application/json
Copy
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":
    {
    },
  • "apply_immediately": true,
  • "apply_at": "2020-05-06T12:17:49+00:00",
  • "_links":
    {}
}

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}/reset
http://http://localhost:10001/devices/{number}/reset

Request samples

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "apply_immediately": false,
  • "apply_at": "2020-04-29T14:57:19+00:00"
}

Response samples

Content type
application/json
Copy
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":
    {
    },
  • "apply_immediately": true,
  • "apply_at": "2020-05-06T12:17:51+00:00",
  • "_links":
    {}
}

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

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "requested_state":
    {
    },
  • "apply_immediately": false,
  • "apply_at": "2020-04-30T14:57:19+00:00"
}

Response samples

Content type
application/json
Copy
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":
    {
    },
  • "apply_immediately": true,
  • "apply_at": "2020-05-06T12:17:50+00:00",
  • "_links":
    {}
}

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/optin
http://http://localhost:10001/devices/{number}/gdpr/optin

Response samples

Content type
application/json
Copy
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/optout
http://http://localhost:10001/devices/{number}/gdpr/optout

Response samples

Content type
application/json
Copy
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/gpsLocation
http://http://localhost:10001/data/gpsLocation

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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/gpsSigfox
http://http://localhost:10001/data/gpsSigfox

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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/export
http://http://localhost:10001/data/hfusage/export

Request samples

Content type
application/hal+json
Copy
Expand all Collapse all
"device_number=12345&timestamp__gte=2017-01-01T02%3A02%3A02Z&timestamp__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

Content type
application/json
Copy
Expand all Collapse all
{}

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

Content type
application/json
Copy
Expand all Collapse all
{}

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 /battery
http://http://localhost:10001/battery

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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}/cancel
http://http://localhost:10001/operations/{id}/cancel

Response samples

Content type
application/json
Copy
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":
    {
    },
  • "apply_immediately": true,
  • "apply_at": "2020-05-06T12:18:22+00:00",
  • "_links":
    {}
}

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 /operations
http://http://localhost:10001/operations

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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

Content type
application/json
Copy
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":
    {
    },
  • "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":
    {}
}

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/pressureSensor
http://http://localhost:10001/data/pressureSensor

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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 /report
http://http://localhost:10001/report

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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 /report
http://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

Content type
application/hal+json
Copy
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/assign
http://http://localhost:10001/tags/assign

Request samples

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "devices":
    [
    ],
  • "tags":
    [
    ]
}

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 /tags
http://http://localhost:10001/tags

Request samples

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "name": "Tag 1"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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 /tags
http://http://localhost:10001/tags

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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

Content type
application/json
Copy
Expand all Collapse all
{}

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}/environments
http://http://localhost:10001/tenants/{tenantCode}/environments

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

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

Content type
application/json
Copy
Expand all Collapse all
{
  • "tenant_code": "f6wOplp_P0",
  • "tenant_name": "hvjrAobAdv",
  • "sub_domain": "AeS1sbF3MW",
  • "permissions":
    [
    ],
  • "_links":
    {}
}

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 /tenants
http://http://localhost:10001/tenants

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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/resolver
http://http://localhost:10001/tenants/resolver

Request samples

Content type
application/hal+json
Copy
Expand all Collapse all

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}/users
http://http://localhost:10001/realms/{realmId}/users

Request samples

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "firstName": "Hydroko",
  • "lastName": "Admin",
  • "email": "hydroko@cmas-systems.com",
  • "username": "admin"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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}/users
http://http://localhost:10001/realms/{realmId}/users

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "_embedded":
    {
    },
  • "_links":
    {},
  • "page":
    {
    }
}

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

Content type
application/json
Copy
Expand all Collapse all
{}

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

Content type
application/hal+json
Copy
Expand all Collapse all
{
  • "firstName": "Hydroko",
  • "lastName": "Admin",
  • "email": "hydroko@cmas-systems.com",
  • "enabled": true,
  • "environments": [ ],
  • "deviceTypes":
    [
    ],
  • "roles":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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}/resetPassword
http://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}/enabled
http://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/aggregate
http://http://localhost:10001/data/hourly/aggregate

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}

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

Content type
application/json
Copy
Expand all Collapse all
{}

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/hourly
http://http://localhost:10001/data/hourly

Response samples

Content type
application/json
Copy
Expand all Collapse all
{}
error: Content is protected !!