Authorization

Local API endpoints require authorization. This article shows how to get authorized to use Nureva's local endpoints.

Accounts

Permissions required will vary, depending on the type of account. See the four account types below, listed in order of fewest permissions required to most permissions required.

  1. monitor account: For third-party systems that can only monitor data streams. By default, this account is disabled.
  2. general account: Includes all permissions from the previous account plus day-to-day operations such as audio settings. By default, this account has no password, but can be configurable in the future.
  3. integrator account: Includes all permissions from previous accounts plus room and integration configuration. By default, this account is disabled.
  4. admin account: Includes all permissions from previous accounts plus configuring security policies. By default, the password is the enrollment code which has the XXX-XXX-XXX format, but can be configurable in the future.

How to authenticate

Local API endpoints require an authorization header. Use the login endpoint with the admin account to retrieve the authParameters needed for authorization. In the case that the account info changes, run the login endpoint again to refresh authorization parameters.

  1. Set the path with the IP address of the Nureva device followed by /api/v1/auth/login.
  2. Update the request body to include the account property with admin as the value. Note: the account value is case-sensitive and should be lowercase.
  3. Update the request body to include the password property with the sample enrollment code of ABC-ABC-ABC as the value.
  4. Update the headers to include Nureva-Client-Id as key and integration_app_name as the value.
  5. Update the headers to include Nureva-Client-Version as key and 0.0.1 as the value.
  6. Update the headers to include Content-type as key and application/json as the value.
  7. Send the POST request. The code sample below is a request to retrieve the authorization header.
curl --request POST \
     --url https://10.0.0.1/api/v1/auth/login \
     --header 'Nureva-Client-Id: integration_app_name' \
     --header 'Nureva-Client-Version: 0.0.1' \
     --header 'Content-type: application/json' \
     --data '{"account": "admin", "password": "ABC-ABC-ABC"}'
  1. A successful response with the above name and password would return the following. If authentication fails, please refer to the error responses documented here.
{
  "authParameters": "YWRtaW46QUJDLUFCQy1BQkM="
}
  1. From the response, set the Authorization header to Nureva followed by the value received in authParameters for all authenticated endpoints, like in the example below.
curl --request GET \
     --url https://10.0.0.1/api/v1/audio \
     --header 'Authorization: Nureva YWRtaW46QUJDLUFCQy1BQkM=' \
     --header 'Nureva-Client-Id: integration_app_name' \
     --header 'Nureva-Client-Version: 0.0.1'

The interactive console in the API reference also provides an easy way to try out the endpoints.

Tutorial complete!

You now know how to authenticate.