Pontosense Integration API (Part HTTP) (v4.0.2)

Pontosense Dev Team: support@pontosense.com License: Apache 2.0

This document describes the HTTP APIs provided by Pontosense for third-party integration. To access these APIs, please obtain an access key from the Pontosense Developer Portal.

In this document, "Client" refers to the Integrator system.

Firmware Management

Firmware related operations

Retrieve upgradeable firmware list.

Fetch a list of available firmware upgrades for different sensor models.

Authorizations:
ApiKeyAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Sensor Management

Sensor related operations

Apply MQTT connection certificates.

Sensors require certificates to connect securely to the MQTT broker. During onboarding, the client server requests these certificates through this API and then forwards them to the sensor.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Request Body schema: application/json
version
required
string (version) ^(\d+)\.(\d+)\.(\d+)$

The (firmware) version number in X.Y.Z format

model
required
integer <int32> (model)
Enum: 2 4

Sensor models

  • 2: P2 - indicated in the serial number as ATR_GN_P2-######-#####
  • 4: P4 - indicated in the serial number as ATR_GN_P4-######-#####

Responses

Request samples

Content type
application/json
{
  • "version": "1.1.0",
  • "model": 2
}

Response samples

Content type
application/json
{
  • "thingName": "string",
  • "certPem": "string",
  • "publicKey": "string",
  • "privateKey": "string",
  • "orgId": 1
}

Get all sensors.

Retrieve a list of sensors with optional filtering and pagination.

Authorizations:
ApiKeyAuth
query Parameters
pageNo
required
integer >= 1
Example: pageNo=1

Page number for pagination

pageSize
required
integer >= 1

The number of items per page

sort
string
Example: sort=name, createTime

Field names for sorting

order
string
Enum: "asc" "desc"

Ordering of the results

sn
string (sn)
Example: sn=ATR_GN_P4-250120-09527

Sensor SN in query string (optional)

model
integer <int32> (model)
Enum: 2 4
Example: model=2

Sensor model

version
string (version) ^(\d+)\.(\d+)\.(\d+)$
Example: version=1.1.0

Firmware version

state
integer <int32> (SensorState)
Enum: 0 1 2 3

Sensor connection status

workState
integer <int32> (SensorWorkState)
Enum: 0 1

Sensor work status

Responses

Response samples

Content type
application/json
{
  • "countId": "string",
  • "current": 1,
  • "maxLimit": 0,
  • "optimizeCountSql": true,
  • "orders": [
    ],
  • "pages": 0,
  • "searchCount": true,
  • "size": 0,
  • "total": 0,
  • "records": [
    ]
}

Get detailed sensor information.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Responses

Response samples

Content type
application/json
{
  • "sn": "ATR_GN_P4-250120-09527",
  • "version": "1.1.0",
  • "model": 2,
  • "configs": {
    },
  • "defaults": {
    },
  • "angle": {
    }
}

Delete sensor.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Update sensor calibration and scan area.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Request Body schema: application/json
left
required
integer [ 0 .. 600 ]

left scan distance in cm

right
required
integer [ 0 .. 600 ]

right scan distance in cm

height
required
integer [ 200 .. 350 ]

mount height of the sensor in cm

Responses

Request samples

Content type
application/json
{
  • "left": 600,
  • "right": 600,
  • "height": 200
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Configure sensor zones.

Define zones for a sensor to identify key areas such as beds, doors, or toilets. Use zones to enable zone-specific activity logging and events.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Request Body schema: application/json
Array
id
required
integer <int64> (id) >= 1

The unique identifier of the entity

type
required
integer <int32>
Enum: 10 20 30 40 50

Zone type

  • 10: bed
  • 20: door
  • 30: sofa
  • 40: medication station
  • 50: toilet
required
Array of objects (Coordinate) = 2 items

Zone boundaries in centimeters, given as the top-left and bottom-right corner points.

height
integer <int32> >= 0

Zone height in centimeters (integer ≥ 0).

angle
integer <int32> [ 0 .. 360 ]

Zone orientation in degrees (0-360, where 0 = top-up, measured clockwise).

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Get sensor zones.

Get zones for a particular sensor.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Configure fall detection threshold.

Set the delay threshold for fall detection on a specific sensor. The threshold defines how long the system waits before confirming a fall event. A lower threshold makes detection faster but may increase the rate of false alerts.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Request Body schema: application/json
threshold
required
integer [ 0 .. 90 ]

fall detection delay threshold.

Responses

Request samples

Content type
application/json
{
  • "threshold": 90
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Start real-time location reporting.

The sensor will keep reporting detected targets' locations to the MQTT channel. To avoid continuous location reporting, the sensor will stop reporting after 1 minute. Therefore, invoking start repeatedly will not cause the sensor to report continuously. To stop reporting immediately, call /sensors/{sn}/actions/location/stop.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Stop real-time location reporting.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Reboot sensor.

Restart a specific sensor remotely. Use this to apply updates or recover from errors without physically accessing the device.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Request the latest firmware version.

Retrieve the latest available firmware version for a sensor based on its current version and model. If the sensor is already up to date, the API will return null.

Authorizations:
ApiKeyAuth
query Parameters
sn
required
string (sn)
Example: sn=ATR_GN_P4-250120-09527

Sensor sn in query string (required for some APIs)

version
required
string (version) ^(\d+)\.(\d+)\.(\d+)$
Example: version=1.1.0

Current version of the sensor

model
required
integer <int32> (model)
Enum: 2 4
Example: model=2

Current model of the sensor

Responses

Response samples

Content type
application/json
{}

Upgrade sensor firmware.

Initiate the firmware upgrade process for a specific sensor. The sensor will then download the firmware from the server and install it.

Authorizations:
ApiKeyAuth
path Parameters
sn
required
string (sn)
Example: ATR_GN_P4-250120-09527

Sensor SN in path

Request Body schema: application/json
firmwareId
required
integer <int64> (id) >= 1

The unique identifier of the entity

otaType
integer <int32> (OtaType)
Enum: 0 1

(optional): Upgrade type.

  • 0: Manual upgrade
  • 1: Automatic upgrade

Responses

Request samples

Content type
application/json
{
  • "firmwareId": 1,
  • "otaType": 0
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}