To use the API, you will need to be familiar with REST and take into consideration the information detailed in this section. Please ensure you review this page carefully before getting straight into the SDKs and development.
In this article
- Set Up An API Account
- Making Requests
- REST URLs
- Integrating with Priava API
- Request & Response for Communication
- Updates to the REST API
- Dates and Times
Set up an API Account
Very few setup steps are required to use the Priava REST API:
- Contact Priava to set up an API User.
- Priava will provide you with a token that is to be used when accessing the API.
- Set up the API user’s security settings to restrict access to only what it needs e.g. Enquiries only
Once the above steps have been completed, it's time to start using the API.
Base URL for REST Endpoint
|Production REST Service||https://api.priava.com/api/rest|
The production service provides access to your live company data. So please be careful when using this API. Alternatively, please speak to our sales team about adding a Sandbox account to your current subscription.
Generate your OAuth 2.0 Tokens
Priava APIs support Open Authentication 2.0 (OAuth 2.0) for secure authentication and authorisation.
You must generate your OAuth 2.0 credentials in Priava before you can use the API. To do this:
- Access the Priava Admin tab as an authorized Priava Administrator.
- Select the API Access > Access Token option from the Admin menu.
- Press Add to create the new token and add the following information;
a. Name - a descriptive name for the token e.g. Digital Signage Integration
b. Description – a short description of what the token will be used for e.g. To be used for the integration between Priava and our Digital Signage System for the facilities office.
c. Redirect URI – the absolute URI where the authorisation response is to be redirected. There can only be one redirect URI e.g. https://my.app.com/oauth2callback
- Press Save.
Now that the Client ID, Client Secret and Code are generated in Priava, these can be used for authenticating the API requests discussed in these documents.
It’s important to remember that the code expires after 10 minutes, so it needs to be used to get a new access token within that interval. If the code has expired, it can be regenerated by clicking on the Regenerate button in Priava Admin..
The SDKs documentation for each API call shows the REST resources, methods and parameters that must be post-fixed to the BASE URL to form a request.
Calling Priava API Services / Integrating with Priava API
All applications integrating with the API or calling the API Services will need an API Token for Authorization and to provide the region their Priava service is based in.
The API Token is used to identify and authorise the access to your Priava data. All the web service calls to Priava API will require the API Token for the calls to be serviced. The HTTP header to be used is APIToken.
The Region identifier is used to direct your query to the appropriate services and locale. The HTTP header to be used is TenantRegion. Valid tenant regions are:
Request & Response for Communication
The Priava API currently supports JSON formatted requests and responses. When calling the Priava REST API you need to ensure that the Content-Type and Accept headers are set to application/json to identify the request and response.
Updates to the REST API
Please be advised that Priava may modify the attributes and resources available to the REST API and our policies related to access and use of the API from time to time without prior notice. Priava will use all reasonable efforts to notify all API users of any changes to the API ahead of changes being made.
Updates to the API may have an adverse effect on Priava Applications, including but not limited to modifying the communication methods in which Priava Applications communicate with REST API and display or transmit your data.
Priava will not assume any liability to you or any third party for any adverse effect resulting from such modifications.
Dates and Times
Priava will assume that the dates and times passed to the REST API are in the time-zone configured in your Priava application.