Device limit in a Realm
While there is no limit on the number of Devices registered in a Realm, it is possible to impose
an upper bound using the <astarte base API URL>/housekeeping/v1/realms/<realm name> API.
By default, such an upper bound does not exist. The limit can be retrieved, updated or removed
(meaning that any number of registered Devices is allowed).
Setting, updating or removing the limit on the number of registered Devices in a Realm
PATCH <astarte base API URL>/housekeeping/v1/realms/<realm name>
The HTTP payload of the request must have the following format:
{
"data": {
"device_registration_limit": <value>
}
}
To set or update the limit, the value must be a non negative integer.
If the value is less than the number of currently registered devices, no devices will be
removed, but it will not be possible to register new devices.
When it is set, trying to register more Devices past the limit will result in an error.
To remove the limit, the value must be null.
Fetching the limit on the number of registered Devices in a Realm
GET <astarte base API URL>/housekeeping/v1/realms/<realm name>
The HTTP payload of the response will have the following format:
{
"data": {
"realm_name": <realm name>,
"jwt_public_key_pem": <realm public key>,
"replication_factor": <realm replication factor>,
"device_registration_limit": <realm device registration limit>
}
}
If no limit is currently set, the value of the "device_registration_limit" field will be null.