Integrator HTTP(S) API (1.0.0)

Download OpenAPI specification:Download

License: Proprietary

To run API, use --api-addr=api.staging.viziosense.ai CLI argument or enable it in config file

Devices

Devices and Sensors Information

Login

Generate auth token. Requires email and password in request body

This endpoint will return and object with basic user information with access_token and refresh_token. It is recommended to use this method if you are implementing a user interface where each user can login to operate. For M2M (Machine to Machine) communication please use the long lived token instead.

Authorizations:
bearer_auth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Devices and Sensors

List all active and disconnected devices. By default filtered by role access

This endpoint will return a list of devices the current user has access to or unfiltered if the user is admin. It can be sorted filter by name or online status

Authorizations:
bearer_auth
query Parameters
sort
string

Sort option <field> can be of 'name',. For example, ?sort=name will sort devices by name

group
string

Filter devices by group

is_online
string

Filter by device Online or Offline. Example ?is_online=Online

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Get device by uuid

Get device by uuid

Authorizations:
bearer_auth
path Parameters
device_uuid
required
string

unique device UUID

Responses

Response samples

Content type
application/json
{
  • "uuid": "string",
  • "name": "string",
  • "client_identifier": "string",
  • "refreshed": "string",
  • "is_online": 0,
  • "geo_city": "string",
  • "geo_country": "string"
}

Update device properties

Update device properties for a given uuid. You can only update certain properties like name, geo_city, geo_country

Authorizations:
bearer_auth
path Parameters
device_uuid
required
string

unique device UUID

Request Body schema: application/json
required
uuid
string
name
string

device name

client_identifier
string

Custom identification for integrator

refreshed
string

The last time the device status was checked

is_online
integer

If the device is online or disconnected

geo_city
string

The city where the device is located

geo_country
string

The country where the device is located

Responses

Request samples

Content type
application/json
{
  • "uuid": "string",
  • "name": "string",
  • "client_identifier": "string",
  • "refreshed": "string",
  • "is_online": 0,
  • "geo_city": "string",
  • "geo_country": "string"
}

Response samples

Content type
application/json
{
  • "uuid": "string",
  • "name": "string",
  • "client_identifier": "string",
  • "refreshed": "string",
  • "is_online": 0,
  • "geo_city": "string",
  • "geo_country": "string"
}

Request a new image

This endpoint allow you to request a new image from the device. You will get a response immediately however you need to wait at least 20 seconds for the image to be available. The images link will be valid for 30 mins.

Authorizations:
bearer_auth
path Parameters
device_uuid
required
string

unique device UUID

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Webhooks

List all webhooks for your devices and sensors

List all webhooks for your devices and sensors Webhook are handy to get the data through your system without having to be connected to the device

Authorizations:
bearer_auth
path Parameters
device_uuid
string

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Add new webhook to your device. Requires device uuid in request body

Adding a new webhook to get notified when a event happens on your device. There's two type of event you can subscribe to: payload and keepalive. Payload send you the data from your device. Keepalive sends you a ping to let you know that the device is alive.

You can add headers to your webhook if you want to authenticate the request like Authorization: Token It support also get parameter in form of ?param1=value1&param2=value2

Authorizations:
bearer_auth
path Parameters
device_uuid
string
Request Body schema: application/json

Parameters of the webhooks to add

url
string

webhook url

webhook_type
any
Enum: "payload" "keepalive"
status
integer

Is the webhook active or not

actions
string

What actions trigger the webhook

object (WebhookData)

Webhook Data This is the data that will be sent to your webhook

Responses

Request samples

Content type
application/json
{
  • "url": "string",
  • "webhook_type": "payload",
  • "status": 0,
  • "actions": "string",
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "error": [ ]
}

Update webhook parameters for your device

Update webhook parameters. To activate or deactivate the webhook change the value of active to true or false

Authorizations:
bearer_auth
path Parameters
device_uuid
string
Request Body schema: application/json

parameters of the webhook to update

url
string

webhook url

webhook_type
any
Enum: "payload" "keepalive"
status
integer

Is the webhook active or not

actions
string

What actions trigger the webhook

object (WebhookData)

Webhook Data This is the data that will be sent to your webhook

Responses

Request samples

Content type
application/json
{
  • "url": "string",
  • "webhook_type": "payload",
  • "status": 0,
  • "actions": "string",
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "error": [ ]
}

Delete a webhook by his id

Delete a webhook by adding the webhook id as path parameter

Authorizations:
bearer_auth
path Parameters
webhook_id
required
integer

unique webhook id

Responses

Response samples

Content type
application/json
{
  • "error": [ ]
}