The Internal API consists of a set of endpoints designed to govern the Ruuvi Network, such as whitelisting and blacklisting devices and/or IP addresses.
whitelist
POSThttps://network.ruuvi.com/whitelist
Whitelists a set of gateways.
Headers
Name
Type
Description
X-Internal-Secret
string
The secret to authenticate with the internal API
Request Body
Name
Type
Description
object
JSON object containing a list of Gateway Mac Addresses and their corresponding Signing Secrets.
{
"gateway": "<<MAC>>",
"blockedAt": <<TIMESTAMP IF BLOCKED>>
}
POST /whitelist
{
"macAddress": "ab:ba:cd:ba:cd:ba",
"secret": "1234"
}
GEThttps://network.ruuvi.com/gwinfo
Fetches info for the gateway
Query Parameters
Name
Type
Description
gateway
string
Gateway Mac Address
Headers
Name
Type
Description
X-Internal-Secret
string
The secret to authenticate with the internal API
Register a sensor to Cloud
POSThttps://network.ruuvi.com/register-sensor
This operation register a sensor with MAC address + secret to Cloud. The secret can be used to verify ownership of a sensor in case of a contested sensor.
Parameters are packed inside a JSON object, e.g. { "macAddress":"value", "secret":"value"}
Headers
Name
Type
Description
X-Internal-Secret
String
The secret to authenticate with the internal API
Request Body
Name
Type
Description
macAddress*
String
MAC address of sensor, 6 bytes. e.g. "AA:BB:CC:DD:EE:FF
This endpoint is called by Ruuvi Shop after payment for user subscription is verified. Parameters are in JSON object of body.
Headers
Name
Type
Description
X-Shop-Secret*
String
Ruuvi Shop authentication secret
Request Body
Name
Type
Description
validDays*
String
Validity of subscription, e.g. 365
maxClaims*
Number
Number of sensors user can Claim
maxShares
Number
Number of shares user can have. Defaults to maxClaims * maxSharesPerSensor
maxSharesPerSensor
Number
Number of times one sensor can be shared. Defaults to 10
maxHistoryDays*
Number
Number of days of history user is allowed to retrieve. This does not affect sensors shared to this user.
maxResolutionMinutes*
Number
Best resolution user is allowed to retrieve. This does not affect sensors shared to this user.
subscriptionName
String
Name of subscription. Defaults to "Ultimate" (custom)
claimCode*
String
Code used to claim this subscription
creatorId
String
String id for creator of code, e.g. webshop account which triggered code generation
Freebase Cloud Messaging to iOS devices - Proposal 2023-02-08
POSTFCM://iOS
FCM is used to deliver push notifications to user applications. To receive the notification, user must register their device token with a POST to https://network.ruuvi.com/push-register