Standalone Paging API
Using CoAP API to perform standalone paging without requiring guest sessions.
If your use case doesn't have the need for managing sessions and only needs to page, The CoAP API provides a standalone paging endpoint to request against.
POST /v1/page
CoAP Options
Option | Value | Required |
---|---|---|
URI-Path | v1 | Yes |
URI-Path | page | Yes |
JSON Body Parameters
Property | Description | Type | Required | Default |
---|---|---|---|---|
number | Pager number of pager to page. | Integer | Yes | |
pageMode | Behavior of pager when it is paged. | String | No | Flash30Sec for guest pagers. Vibe1 for staff pagers. |
message | In case of alpha coasters or staff pagers such as the alpha pager, a message can be displayed. | String | No | |
systemId | System ID of pagers to page. | Integer | No | Uses the system ID set under Setup -> System -> System ID |
Example Code Request
// Using node-coap (yarn add coap, npm install coap): https://github.com/mcollina/node-coap
const coap = require('coap');
// Retrieving session with number 23
let req = coap.request({
host: '10.0.1.32',
port: 5683,
pathname: '/v1/page',
method: 'POST',
options: {
'Content-Format': 'application/json'
}
});
req.on('response', res => {
let json = JSON.parse(res.payload.toString('utf-8'));
if (res.code[0] === '2') { // Success
// Page request accepted
} else {
// Some other error.
console.error(json);
}
});
req.write(JSON.stringify({
number: 66,
systemId: 3
});
// Send request
req.end();
Updated over 6 years ago