barscaret-downcaret-leftcaret-rightcaret-upcheckchevron-leftchevron-rightfile-pdfinfosign-in-altsignin text-widthtimesyoutube

Integrations > API

Miradore API v2

Updated on June 17th, 2020

Miradore API v2 is a HTTPS REST based interface for integrating Miradore with other applications. API v2 provides access to resources via URI and it is suitable for CRUD (create, read, update and delete) operations in Miradore.

Authentication

Miradore API v2 uses the authentication key which is sent to the server in the request’s HTTPS header “X-API-Key”.

Authentication key is a random string which can be generated from Miradore web console > System > Infrastructure diagram when the API feature is activated. Please read more about creating an authentication key from the article Getting started with API. See additional instructions about managing authentication keys from Adding API keys and Deleting API keys.

Supported items and methods

The Miradore API v2 is used by sending HTTPS requests to Miradore server. The API uses standard HTTPS methods GET, PUT, POST and DELETE. The response format is JSON.
The base URI for API v2 calls:
https://<sitename>.online.miradore.com/api/v2/<item>

The technical documentation of Miradore API v2, information about supported items and methods, can be found from the Swagger documentation together with some examples. The documentation is available in: https://<sitename>.online.miradore.com/swagger/

It is possible to try out available API v2 operations with Swagger tool. In the tool there is a button “Authorize” from where you can authorize a session with the authentication key received from Miradore.

Example 1: Locking a device

  • The device ID is required as a parameter.

POST https://<sitename>.online.miradore.com/api/v2/Device/{id}/Lock

APIv2_1.PNG

Example 2: Get device’s locations from certain time range

  • The device ID is required as a parameter.
  • Optional parameters are startDate and endDate (year-month-day), if you want to define the time range for the results.

GET https://<sitename>.online.miradore.com/api/v2/Device/{id}/Location

APIv2_2.PNG

Get started with Miradore

Start securing your devices and data today with Miradore. Create a site in just a few minutes and start adding devices immediately. You can get started for free and try out the full features with our 14-day Enterprise trial.

No credit card needed.

SIGN UP FOR MIRADORESEE PLANS AND PRICING