Set measurement system
This feature is supported by HDL300, Dual HDL300, HDL310, HDL410 and HDX systems.
This tutorial shows how to set the measurement system for the room where Nureva® audio devices are located.
What can be controlled with the API?
- uiMeasurementSystem: The measurement system used for the units of all displayed lengths in the coverage map. This does not affect the units used in the API. Possible values are:
IMPERIALMETRIC
admin role required
admin role requiredThe Set room layout endpoint is restricted to the admin role. To access this endpoint, follow the Authorization tutorial to authenticate with an admin role and obtain YOUR_ADMIN_AUTHPARAMETERS which is required for the requests below.
Overview
- Use the Get room layout endpoint to get the current measurement system.
- Use the Set room layout endpoint to make a request to change the measurement system.
- Use the Get room layout endpoint to check that the change has been applied successfully.
Instructions
Step 1 - Make a request to get the current measurement system
Use the Get room layout endpoint:
- Set the path with the IP address of the Nureva® device followed by
/api/v1/room/layout. - Update the headers to include
Authorizationas key and the value beingNurevafollowed by theauthParametersreceived from the login endpoint. - Update the headers to include
Nureva-Client-Idas key andintegration_app_nameas the value. - Update the headers to include
Nureva-Client-Versionas key and0.0.1as the value. - Send the GET request. The code sample below is a request to retrieve the measurement system information for the room of the device with the IP address of
10.0.0.1.
curl --request GET \
--url https://10.0.0.1/api/v1/room/layout \
--header 'Authorization: Nureva <YOUR_ADMIN_AUTHPARAMETERS>' \
--header 'Nureva-Client-Id: integration_app_name' \
--header 'Nureva-Client-Version: 0.0.1'- If the call is successful, an HTTP status code of 200 OK will be returned.
- Check the value of the
uiMeasurementSystemattribute. A value of"IMPERIAL"means that units such as feet will be used as the display units. A value of"METRIC"means that units such as meters will be used as the display units.
The example response below indicates that the current measurement system is imperial.
{
"uiMeasurementSystem": "IMPERIAL"
}Step 2 - Make a request to update the measurement system
Use the Set room layout endpoint:
- Set the path with the IP address of the Nureva® device followed by
/api/v1/room/layout. - Update the headers to include
Authorizationas key and the value beingNurevafollowed by theauthParametersreceived from the login endpoint. - Update the headers to include
Nureva-Client-Idas key andintegration_app_nameas the value. - Update the headers to include
Nureva-Client-Versionas key and0.0.1as the value. - Update the headers to include
Content-typeas key andapplication/jsonas value. - Update the request body to send a JSON object with
"uiMeasurementSystem":"METRIC"to change the measurement system to metric.
curl --request PATCH \
--url https://10.0.0.1/api/v1/room/layout \
--header 'Authorization: Nureva <YOUR_ADMIN_AUTHPARAMETERS>' \
--header 'Nureva-Client-Id: integration_app_name' \
--header 'Nureva-Client-Version: 0.0.1' \
--header 'Content-type: application/json' \
--data '{"uiMeasurementSystem":"METRIC"}'- Send the PATCH request.
- If the call is successful, an HTTP status code of 200 OK will be returned.
Step 3 - Check that the change has been applied successfully
Use the Get room layout endpoint:
- Set the path with the IP address of the Nureva® device followed by
/api/v1/room/layout. - Update the headers to include
Authorizationas key and the value beingNurevafollowed by theauthParametersreceived from the login endpoint. - Update the headers to include
Nureva-Client-Idas key andintegration_app_nameas the value. - Update the headers to include
Nureva-Client-Versionas key and0.0.1as the value. - Send the GET request. The code sample below is a request to retrieve the measurement system information for the room of the device with the IP address of
10.0.0.1.
curl --request GET \
--url https://10.0.0.1/api/v1/room/layout \
--header 'Authorization: Nureva <YOUR_ADMIN_AUTHPARAMETERS>' \
--header 'Nureva-Client-Id: integration_app_name' \
--header 'Nureva-Client-Version: 0.0.1'- If the call is successful, an HTTP status code of 200 OK will be returned.
- Check the value of the
uiMeasurementSystemattribute.
The example response below indicates that the change of the measurement system to "METRIC" was successfully applied.
{
"uiMeasurementSystem": "METRIC"
}
Tutorial complete!You now know how to get the room layout information.
Updated 19 days ago