Power Alert Device Manger (v20)
REST API User’s Guide
Beginning
with version 20.0.0, PowerAlert Device Manager (PADM) supports a
Representational State Transfer (REST) Application Programming Interface (API).
This specification document defines the REST APIs, including the Uniform
Resource Identifier (URI), method, parameters, request body and response body.
These specifications are intended to provide all required details to call the
PowerAlert REST APIs and to build scripts around these calls.
PowerAlert
Release |
Rest
API Version |
20.0 |
1.0.0 |
The API version should be
entered in the 'Accept-Version' header, as shown in the image below. If the
version is not entered, the server returns the latest supported version. Third
party systems that consume the PowerAlert API should provide the expected
version in this header.
Client Request
GET https://{poweralert_endpoint}/api/devices
Authorization: Bearer {access_token}
Content-Type: application/vnd.api+json
Accept-Version: 1.0.0
·
Authentication and Authorization of the PowerAlert API is based on
the OAuth2.0 standard and uses a JSON Web Token (JWT)
·
A successful authentication request returns a valid access token
·
In all cases, a valid access token is required to interact with the
PowerAlert API
·
Refer to the Authentication Model section of this document for
additional details
As shown
below, an API response for a GET request has “meta” and “data” parts. The “meta”
part consists of validation and constraints; the “data” part contains a
response attribute in the form of key value pairs. Validation provides information about the data attribute (e.g.
minimum and maximum), whereas constraints
indicate whether a data attribute is required and can be edited or deleted. Refer
to Appendix B for a detailed explanation of metadata.
{
"meta": {
"id": "6a85a9a9-7f7a-4538-941c-c33dbacb3077",
"constraints": {
"max_items": 0,
"min_items": 0,
"editable_attributes": [
"name",
"location",
],
"required_attributes": [],
"delete_allowed": true
},
"validation": [
{
"attribute": "name",
"maximum": 0,
"minimum": 0,
"default": 0,
"multiple_of": 0,
"min_length": 1,
"max_length": 64,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "location",
"maximum": 0,
"minimum": 0,
"default": 0,
"multiple_of": 0,
"min_length": 1,
"max_length": 80,
"pattern": "",
"enum": [],
"type": "string"
}
]
},
"data": {
"type": "devices",
"id": "1",
"attributes": {
"name": "device-123",
"manufacturer": "TRIPP LITE",
"location": "chicago"
}
}
}
Validations and constraints may be
omitted by turning the validation flag to false. e.g: /api/email-contacts?validation=false
Required attributes
are needed when adding objects (POST requests). A list of required attributes for a specific endpoint are
listed in the “meta” section of the GET response. In the example below, the
“meta” section of the GET /api/
localusers response lists the required attributes (shown in bold).
{
"meta": {
"id": "f760f23e-175d-4704-b81d-e37e5e34566b",
"constraints": {
"editable_attributes": [
],
"required_attributes": [
"name",
"password",
"role",
"session_timeout_enabled",
"idle_timeout_enabled"
],
"delete_allowed": true
},
"validation": [
..]
...
}
}
Each update
(PATCH) request supports partial updates in which case all the fields are not
required. Only the values specified in the request body are updated; missing
fields are omitted, retaining their values.
Clients must
send all requests with the following header:
Content-Type: application/vnd.api+json
The server responses
also include this header.
A unique
identifier is required to create, read, update and/or delete an individual
item. This identifier can either be ID or name. If using name as the identifier,
then he following custom HTTP header is required to access data by name.
By: name
PowerAlert uses the OAuth 2.0
token-based authentication model. Under this model, a user calls POST
/api/outh/token to request an access token. A token is returned if the
credential (user name and password) in the POST request is valid. The token appears
in the headers of each subsequent request and determines if the user is
authorized to perform the operation. The access token must be included in the HTTP
header of subsequent requests. For
details see section Authentication
(Login & Logout).
POST https://{poweralert_endpoint}//api/oauth/token
Content-Type: application/vnd.api+json
Accept-Version: 1.0.0
{
"username":"localadmin",
"password":"localadmin",
"grant_type": "password"
}
On receiving
a valid request, the server returns an access token and refresh token with a
“successful” HTTP Error Code response:
Status: 200 OK
Refer to Appendix
A
for information on HTTP Error Codes.
{
"access_token": "eyJ0eXoiVElNRUZPUk1BVF9ITU1TU1RUIiwiaWRsZV90aW1lb3V0Ijo2MCwic2Vzc2lvbl90aW1lb3V0IjozNlsibG9nX2ZpbGVzOnIiLCJzc2xfdXBsb2FkOnJ3Iiwic3NsX2Rvd25sb2FkOnIiLCJhcGk6cnciLCJlYnBfdXBsb2FkOnJ3Il19fQ.8fKhR3Rkk5AlVS3i4QosTlqXlx5TdX5uD9FN7w1p-9k",
"msg": "Logged in as localadmin",
"refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjMxNTY4OTksIm5iZiI6MTYyMzE1Njg5OSwianRpIjoiNjY2NzBmMWQtYzg2Ny00YzA4LWE1ZTQtMTQ1YjI2MjY1ZDExIiwiZXhwIjoxNjIzMTc4NDk5LCJpZGVudGl0eSI6ImxvY2FsYWRtaW4iLCJ0eXP3dHyMyqo41ur0NvZ9QveWNxu4Q"
}
To interact with PowerAlert API, a valid
access token generated from a successful authentication response must be entered
in the HTTP header. In the example below -- getting device information from
PowerAlert – the token is entered in place of {access_token}. The IP address or
host name is entered in place of {poweralert_endpoint}.
GET https://{poweralert_endpoint}/api/devices/1
Authorization: Bearer {access_token}
Content-Type: application/vnd.api+json
Accept-Version: 1.0.0
The refresh
token helps to acquire a new access token when the existing one expires. Use the
/api/oauth/refresh endpoint to refresh the access token. For the API to work, the
refresh token must be included in the Authorization header.
Refresh Token
Request:
POST https://{poweralert_endpoint}/api/oauth/refresh
Authorization: Bearer {refresh_token}
Content-Type: application/vnd.api+json
Accept-Version: 1.0.0
Refresh Token
Response:
Status: 200 OK
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXlRJTUVGT1JNQVRfREVGQVVMVCIsImlkbGVfdGltZW91dCI6NjAsInNlc3Npb25fdGltZW91dCI6MzYwLCJwcml2aWxlZ2VzIjpbImxvZ19maWxlczpyIiwic3NsX3dyJdfX0.tuhFpE7XD4uZqsEUn1pL9wQB5Ne0bIJYYXv5nTHNIy4"
}
To Log Out, issue
a logout API request to invalidate the existing access token.
Logout
Request:
POST https://{poweralert_endpoint}/api/oauth/token/logout
Authorization: Bearer {refresh_token}
Content-Type: application/vnd.api+json
Accept-Version: 1.0.0
Logout
Response:
Status: 200 OK
{"msg":"Refresh token has been revoked"}
A number of basic examples
are provided in this section; refer to the following link for additional examples.
https://documenter.getpostman.com/view/447714/TzeUn8vX
The following two variables
are used throughout the examples:
·
{{DevEndpointHttps}} – This represents the HTTP(S) endpoint of a
device, for example: http://10.22.0.98
·
{{access_token}} – This
access token is required for interacting with the PowerAlert API Refer to the
Authentication Model section of this document for details on obtaining this
access token.
This section
provides API examples on how to retireve and update attributes of a PowerAlert
device and any peripherals connected to it.
Some attributes, such as “Device Name”, “Location”, “Installation Data”
and “Asset Identifier” can be edited using device update service (PATCH
/api/device/id).
The example below
retrieves all properties of the PowerAlert device and any connected
peripherals. Specify the port if it different from the default values of 80 for
HTTP or 443 for HTTPS.
Device
Properties Request:
curl --location -g --request GET '{{DevEndpointHttps}}/api/devices' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Accept-Version: 1.0.0' \
--data-raw ''
Device
Properties Response:
Status: 200 OK
{
"meta": {
"id": "a0dd05e8-729e-4a20-907d-ef4994731226",
"constraints": {
"max_items": 0,
"min_items": 0,
"editable_attributes": [
...
],
"required_attributes": [],
"delete_allowed": true
},
"validation": [{
..
}
]
},
"data": [{
"type": "devices",
"id": "1",
"attributes": {
"device_id": 1,
"name": "Device0391",
"manufacturer": "TRIPP LITE",
"model": "SMART1500RM2U",
"serial_number": "2850DY0SM820600391",
"protocol": "3015",
"location": "Chicago",
"port_mode": "DEVICE_COMM_RS232",
"port_name": "/dev/ttyS2",
"region": "Mid West",
"install_date": "2021-05-17",
"deactivate_date": ""
...
}
},
{
"type": "devices",
"id": "2",
"attributes": {
"device_id": 2,
"name": "Sensor0473",
"manufacturer": "TRIPP LITE",
"model": "E2MTHDI ",
"serial_number": "2833AV0AC89FC00473",
"protocol": "9300",
"location": "",
"port_mode": "DEVICE_COMM_RS232",
"port_name": "/dev/serial/by-id/usb-TRIPP_LITE_TRIPP_LITE_E2MTHDI_2833AV0AC89FC00473-if00",
"region": "",
"install_date": "2021-05-17",
"deactivate_date": "2021-05-21"
....
}
}
]
}
·
This example shows only a portion of the response; the device has
many more attributes.
·
Use device id or name “/api/devices/{id}” to retrieve the attributes
of one device.
·
Use the following HTTP header to retrieve attributes by device
name
By: name
Retrieving a
Device’s Properties by ID:
curl --location -g --request GET '{{DevEndpointHttps}}/api/devices/{DeviceId}' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Accept-Version: 1.0.0' \
--data-raw ''
Retrieving a
Device’s Properties by name:
curl --location -g --request GET '{{DevEndpointHttps}}/api/devices/{DeviceName}' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Accept-Version: 1.0.0' \
--header 'By: name' \
--data-raw ''
Note that
device ID or device name is required to edit attributes.
Device Update
Request by ID:
curl --location -g --request PATCH '{{DevEndpointHttps}}/api/devices/{deviceId}' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Accept-Version: 1.0.0' \
--data-raw '{
"data": {
"type": "devices",
"attributes": {
"id": "1",
"name": "Device0391",
"location": "Chicago",
"manufacturer": "TRIPP LITE",
"installDate": "2021-05-18",
"region": "USA",
"configured_device_id": 123,
"configured_asset_tag": "tripplitelight-0123456",
"install_date": "2021-05-18"
}
}
}'
·
The following attributes are editable: name, location,
manufacturer, location, region, configured_device_id and configured_asset_tag.
·
Similar to GET, the device ID must be specified when requesting updates.
Alternatively the device name can be used along with the following Http cusom
header.
By: name
Device Update
Request by name:
curl --location -g --request PATCH '{{DevEndpointHttps}}/api/devices/Device0391' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Accept-Version: 1.0.0' \
--header 'By: name' \
--data-raw '{
"data": {
"type": "devices",
"attributes": {
"id": "1",
"name": "Device0391",
"location": "Chicago",
"manufacturer": "TRIPP LITE",
"installDate": "2021-05-18",
"region": "USA",
"configured_device_id": 123,
"configured_asset_tag": "tripplitelight-0123456",
"install_date": "2021-05-18"
}
}
}'
Device Update
Response:
Status: 200 OK
{
"meta": {
"id": "c143e284-a1b3-4d64-ad72-64092e3dfac8"
},
"data": {
"type": "devices",
"id": "1",
"attributes": {
"response": 0
}
}
}
This section
provides API examples for retrieving devices metrics (variables), including:
·
Runtime Remaining
·
Battery Voltage
·
Battery Capacity
·
Input and Output Voltage / Current
·
Input and Output Frequency
·
Output Utilization
· Temperature
Metrics can be retrieved as a full set or by individual
variable
Device
Metrics Request:
curl --location -g --request GET '{{DevEndpointHttps}}/api/variables' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Accept-Version: 1.0.0' \
--data-raw ''
Device
Metrics (Variables) Response:
{
"meta": {
"id": "a0dd05e8-729e-4a20-907d-ef4994731226",
"constraints": {
"max_items": 0,
"min_items": 0,
"editable_attributes": [
...
],
"required_attributes": [],
"delete_allowed": true
},
"validation": [{
..
}
]
},
"data": [{
"type": "variables",
"id": "1",
"attributes": {
"key": 872415338,
"device_id": 1,
"device_name": "Device0391",
"device_type": "DEVICE_TYPE_UPS",
"label": "Runtime Remaining (Min)",
"value": "474",
"min_value": 0,
"max_value": 1440,
"suffix": "Minutes",
"group": "VARGROUP_BATTERY",
"purpose": "VARPURPOSE_STATUS",
"data_type": "VARTYPE_INTEGER",
"state": "DEVICE_STATE_NORMAL",
"display_label": "Runtime Remaining",
"raw_value": "474",
....
}
},
{
"type": "variables",
"id": "2",
"attributes": {
"key": 872415360,
"device_id": 1,
"device_name": "Device0391",
"device_type": "DEVICE_TYPE_UPS",
"label": "Battery Capacity",
"value": "100",
"min_value": 0,
"max_value": 100,
"suffix": "%",
"group": "VARGROUP_BATTERY",
"purpose": "VARPURPOSE_STATUS",
"data_type": "VARTYPE_INTEGER",
"state": "DEVICE_STATE_NORMAL",
"display_label": "Battery Capacity",
"raw_value": "100",
....
}
},
...
]
}
· This example
shows only a portion of the response; the device has many more variables.
· This response shows all variables for the PowerAlert
device and connected peripherals – Each variable has a device ID, type and details
· Attribute
“label” is the variable name, “value” is the value of the variable and “suffix”
is the unit of measure.
Request Using ID:
curl --location -g --request GET '{{DevEndpointHttps}}/api/variables/{variableId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Accept-Version: 1.0.0' \
--data-raw ''
Where {variableId} is the device metric ID or
variable ID
Retrieve a variable using its ID:
https://10.22.0.58/api/variables/7
A variable can
also be retrieved using its name in which case the following values must be
included in the HTTP header.
· “By : name”
· “deviceId : {id}” or “deviceName: {name}” – Where id
is the unique ID of the device and name is the name of the device
Request Using Name:
curl --location -g --request GET '{{DevEndpointHttps}}/api/variables/{variableName}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'By: name' \
--header 'deviceName: Device0391' \
--header 'Accept-Version: 1.0.0' \
--data-raw ''
Where {variableName} is device metric name or
variable name
Example: https://10.22.0.98/api/variables/Runtime
Remaining (Min)
Response:
Status: 200 OK
{
"meta": {
"id": "a0dd05e8-729e-4a20-907d-ef4994731226",
"constraints": {
"max_items": 0,
"min_items": 0,
"editable_attributes": [
...
],
"required_attributes": [],
"delete_allowed": true
},
"validation": [{
..
}
]
},
"data": {
"type": "variables",
"id": "1",
"attributes": {
"key": 872415338,
"device_id": 1,
"device_name": "Device0391",
"device_type": "DEVICE_TYPE_UPS",
"label": "Runtime Remaining (Min)",
"value": "474",
"min_value": 0,
"max_value": 1440,
"suffix": "Minutes",
"group": "VARGROUP_BATTERY",
"purpose": "VARPURPOSE_STATUS",
"data_type": "VARTYPE_INTEGER",
"state": "DEVICE_STATE_NORMAL",
"display_label": "Runtime Remaining",
"raw_value": "474",
....
}
}
}
Action APIs enable configuration of action parameters applicable
to the device and connected peripherals. Below are examples of configurable
action parameters, followed by the supported enumerations (enums):
·
Delay – the number of seconds the action will wait to
execute after being triggered
·
Target Device – the device undergoing the action
·
Interval – the number of seconds between successive
executions of the action
·
Count – the number of times the action will be
executed
·
Contacts – one or more notification/trap/set
recipients
·
Action Type – the type of action; each has an enumeration
value
·
Trigger Event – the trigger for the
action, occurring either when the event is set (On Set) or cleared (On Clear). These
events contains additional attributes pertaining to the event (device, load, etc).
source_type:
EVENT_SOURCE_TYPE_DEVICE
EVENT_SOURCE_TYPE_AUTOPROBE
EVENT_SOURCE_TYPE_SYSTEM
action_type:
ACTIONTYPE_REBOOT_WEBLX
ACTIONTYPE_TURN_OFF_DEVICE
ACTIONTYPE_TURN_ON_DEVICE
ACTIONTYPE_SENSOR
ACTIONTYPE_EMAIL
ACTIONTYPE_SNMP_SET_OID
ACTIONTYPE_SNMP_TRAP
ACTIONTYPE_SMS
ACTIONTYPE_LOAD
ACTIONTYPE_LOAD_GROUP
ACTIONTYPE_RAMP
ACTIONTYPE_SHED
ACTIONTYPE_EXEC_SCRIPT
ACTIONTYPE_SHUTDOWN_OS
ACTIONTYPE_REBOOT_OS
ACTIONTYPE_REMOTE_SHUTDOWN
ACTIONTYPE_RESTART_DEVICE
This
API returns a summary of all available actions.
Title |
GET All Actions
|
URL |
/api/actions |
Method |
GET |
Success Response |
Code: 200
"meta": {
"id": "837e874a-507e-4061-b6f9-f6835e977e9e",
"constraints": {
.. },
"validation": [ … ] },
"data": [ {
"type": "actions",
"id": "1",
"attributes": {
"name": "Default Email Notification", //String
ValueAction Name
"action_type": "ACTIONTYPE_EMAIL", //ActionType
ENUM
"key": 1281,// <Intger value>
"delay": 30, //Delay integer value
"interval": 0,// Integer Value "count": 1, //
Integer Value
"enabled": true,
"redundant": false,
"set_events": 25, // Integer Value
"clear_events": 25 // Integer Value } } ] } |
Sample Call |
curl –i -H "Accept: application/vnd.api+json" http://localhost:3001/api/actions |
Version |
"Accept-Version:
1.0.0" – If no version provided, the service return the latest one |
Delete Action
This
API deletes an action, based on action ID or action name
Title |
Delete Action
|
URL |
/api/actions/:actionId OR To delete using name:
/api/actions/:actionName "by:name" http header is required to delete
by name |
Method |
DELETE |
Success Response |
Code: 200
"meta": {
"id": "b3039324-3961-4188-b6b1-649daf7794fb" },
"data": {
"type": "actions",
"id": 0,
"attributes": {
"response": 0 } } } |
Sample Call |
curl –I -H "Accept: application/vnd.api+json" –X "DELETE” http://localhost:3001/api/actions/7 |
Version |
"Accept-Version:
1.0.0" – If no version provided, the service return the latest one |
This
API deletes multiple actions based on the action IDs provided in the body
Title |
Delete Multiple
Actions
|
URL |
/api/actions |
Method |
DELETE |
Data Params |
{ "data":
[{ "type":
"actions", "id":
"9" //Integer Action ID }, { "type":
"actions", "id":
"10" }] } |
Success Response |
Code: 200
"meta": {
"id": "bf1c99d8-d8c4-4fbf-8cb7-eb9facdde7c3"
//Request Id },
"data": [ {
"type": "actions",
"id": "9" //Integer action Id }, {
"type": "actions",
"id": "10" } ] } |
Version |
"Accept-Version:
1.0.0" |
This
API provides the Boolean value for each of the action types, indicating support
for on_set, on_clear and mutually_exclusive. If mutually_exclusive is set to
true, either on_set or on_clear can be supported, but not both.
Title |
GET Supported
Actions
|
URL |
/api/actions/supported |
Method |
GET |
Success Response |
Code: 200 "meta":
{ "id":
"1d20d459-83a4-4168-8aa9-debfbcc6e6a5" }, "data":
{ "type":
"actions-supported", "id":
"ActionsSupported", "attributes":
{ "email_supported":
{ "supported_on_set":
true, //Boolean "supported_on_clear":
true, //Boolean "mutually_exclusive":
false //Boolean }, "sms_supported":
{ "supported_on_set":
true, "supported_on_clear":
true, "mutually_exclusive":
false }, "snmp_trap_supported":
{ "supported_on_set":
true, "supported_on_clear":
true, "mutually_exclusive":
false }, "snmp_set_oid_supported":
{ "supported_on_set":
true, "supported_on_clear":
true, "mutually_exclusive":
true }, "reboot_webcardlx_supported":
{ "supported_on_set":
true, "supported_on_clear":
false, "mutually_exclusive":
false }, "turn_off_device_supported":
{ "supported_on_set":
true, "supported_on_clear":
true, "mutually_exclusive":
false, "devices":
[{ "id":
1, "name":
"Device0391" }] }, "turn_on_device_supported":
{ "supported_on_set":
true, "supported_on_clear":
true, "mutually_exclusive":
false, "devices":
[{ "id":
1, //Integer "name":
"Device0391" //String }] }, "reboot_os_supported":
{ "supported_on_set":
false, "supported_on_clear":
false, "mutually_exclusive":
false }, "sensor_supported":
{ "supported_on_set":
false, "supported_on_clear":
false, "mutually_exclusive":
false, "devices":
[] }, "ramp_supported":
{ "supported_on_set":
false, "supported_on_clear":
true, "mutually_exclusive":
false, "devices":
[{ "id":
1, "name":
"Device0391" }] }, "shed_supported":
{ "supported_on_set":
true, "supported_on_clear":
false, "mutually_exclusive":
false, "devices":
[{ "id":
1, "name":
"Device0391" }] }, "load_action_supported":
{ "supported_on_set":
true, "supported_on_clear":
true, "mutually_exclusive":
true, //Load identifier
for deviev "load_identity_per_device":
[{ "device":
{ "id":
1, //Integer device Id "name":
"Device0391" }, "loads":
[{ "id":
"1", //Integer load id "name":
"Load number 1",//String load number "load_number": 1 //Integer }, { "id":
"2", "name":
"Load 2", "load_number": 2 } ] }] }, "load_group_action_supported":
{ "supported_on_set":
false, "supported_on_clear":
false, "mutually_exclusive":
true, "load_group_identity_per_device":
[] }, "remote_shutdown_supported":
{ "supported_on_set":
false, "supported_on_clear":
false, "mutually_exclusive":
false }, "mute_alarm_supported":
{ "supported_on_set":
true, "supported_on_clear":
false, "mutually_exclusive":
false, "devices":
[{ "id":
1, "name":
"Device0391" }] }, "initiate_self_test_supported":
{ "supported_on_set":
true, "supported_on_clear":
false, "mutually_exclusive":
false, "devices":
[{ "id":
1, "name":
"Device0391" }] }, "restart_device_supported":
{ "supported_on_set":
true, "supported_on_clear":
false, "mutually_exclusive":
false, "devices":
[{ "id":
1, "name":
"Device0391",// String device name "parameters":
{ "Cmd
Turn On Device (Delayed) Data": "Seconds" } }] } } } } |
Version |
"Accept-Version: 1.0.0" |
The
Email Action endpoint provides a Create, Read, Update, Delete (CRUD) API for
email actions. Email Action has attributes
‘email_contact’ and ‘send_to_all’. If attribute ‘send_to_all’ is set to true, the
email will be sent to all email contacts. If set to false, the ‘email_contact’ field
must contain one or more valid email contact IDs.
Title |
GET Email action
|
URL |
/api/email_actions |
Method |
GET |
URL Params |
Get Email Action /api/email_actions/:actionId - By id (default) or /api/email_actions/:actionName Note: No HTTP header required to get email action
by id http header "by: name" required to get
email action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] }, "data": { "type":
"email_actions", "id": "11", "attributes": { "name":
"email_action", "key": 0, "delay": 0, "enabled": true, "trigger_events": [ { "id":
"5", "key": 0, "name": "", //ENUM EventSourceTYpe "source_type":
"EVENT_SOURCE_TYPE_DEVICE", "source_id": 1,
//Integer is "source_name":
"Device0391", "action_id":
"11",//Integer action id "action_name":
"", "fire_on_set":
false,
"fire_on_clear": true } ], "interval": 0, "count": 1, "send_to_all": true, "email_contact": [] } } } |
Sample Call |
curl –i -H "Accept: application/vnd.api+json" http://localhost:3001/api/email_actions/11 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create
Email Action |
URL |
/api/email_actions |
Method |
POST |
Data Params |
{ "data":
{ "type":
"email_actions", "attributes":
{ "name":
"Email Action", "interval":
0, "delay":
0, "count":
1, "enabled":
true, "key":
0, "send_to_all":
true, "trigger_events":
[{ "id":
"5", "name":
"Overload", "fire_on_set":
true, "fire_on_clear":
false, "action_name":
"Email Action", //ENUM
– EventSourceType "source_type":
"EVENT_SOURCE_TYPE_DEVICE", "source_id":
1, "source_name":
"Device0391", "key":
0 }] } } } |
Success Response |
Code: 200 "meta": { "id": "50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type":
"email_actions", "id": "8",
//Integer – Action ID "attributes": { "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update
Email Action |
URL |
/api/email_actions |
Method |
PATCH |
URL Params |
PATCH Email Action /api/email_actions/:actionId
- By id (default) or /api/email_actions/:actionName Note: No HTTP header
required to get email action by id http header "by:
name" required to update email action by name |
Data Params |
{ "data": { "type": "email_actions", "attributes": { "name": "Email Action2",//String
Value "interval": 0, //Intger Value "delay": 0, //Intger Value "count": 1, //Intger Value "enabled": true, "key": 0, //Intger Value "send_to_all": true, "trigger_events": [{ "id": "5", //Intger
Value "name": "Overload",//String
Value "fire_on_set": true, "fire_on_clear": false, "action_name": "Email
Action", "source_type":
"EVENT_SOURCE_TYPE_DEVICE",//Enum Event Source "source_id": 1, //Intger Value "source_name":
"Device0391", //String Value "key": 0 //Intger Value }] } } } |
Success Response |
Code:
200 "meta": { "id":
"50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type":
"email_actions", "id": "8", "attributes": { "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" –
If no version provided, the service return the latest one |
NOTE |
The payload for update is similar to
create. Alternatively update api allow to add and remove list of email
contacts, set and clear events. Example: …
"remove_set_events" : [ { "name" :
"seteventname2", "source_type":
"EVENT_SOURCE_TYPE_DEVICE", "source_name" :
"sourcename2" } ], "add_email_contact" : [ { "name" :
"contact1" }, { "name" :
"contact2"
} ], "add_clear_events" : [ { "name" :
"cleareventname1", "source_type":
"EVENT_SOURCE_TYPE_DEVICE", "source_name" :
"sourcename1" } ], "add_set_events" : [
{ "name" :
"seteventname1", "source_type":
"EVENT_SOURCE_TYPE_DEVICE", "source_name" :
"sourcename1" } ], "remove_email_contact" : [ { "name" :
"contact3" }, { "name" :
"contact4" } ], "remove_clear_events" : [ { "name" :
"cleareventname2", "source_type":
"EVENT_SOURCE_TYPE_DEVICE", "source_name" :
"sourcename1" } ... |
The
Initiate Self-Test Action endpoint provides a CRUD API for Initiate Self-Test actions.
It requires a target device identity in the form of ‘device_name’ or ‘device_id’.
Title |
GET Initiate Self-Test Action |
URL |
/api/initiate_self_test_actions |
Method |
GET |
URL Params |
Get Initiate Self-Test Actions /api/initiate_self_test_actions/:actionId - By id (default) or /api/initiate_self_test_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] }, "data": { "type":
"email_actions", "id": "11", "attributes": { "name": "anInitiateSelfTestActionName", "key": 0, "delay": 0, "enabled": true, "trigger_events":
[ { "id": "1", "key": 0, "name": "", //ENUM – EventSourceType "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "source_name": "", "action_id": "20", "action_name": "", "fire_on_set": true, "fire_on_clear": true }], "device_identity":
{ "device_id": 1, "device_name": "" } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Initiate Self-Test Action |
URL |
/api/initiate_self_test_actions |
Method |
POST |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE", "fire_on_set" : true } ], "enabled" : true, "delay" : 0, //Integer delay "device_id" : 1, //Integer device id "key" : 1, //Integer key "name" : "anInitiateSelfTestActionName" }, "type" : "initiate_self_test_actions" } } |
Success Response |
Code: 200 "meta": { "id":
"50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type": "initiate_self_test_actions", "id": "8", "attributes": { "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Initiate Self-Test Action |
URL |
/api/initiate_self_test_actions |
Method |
PATCH |
URL Params |
PATCH Initate Self Test api/initiate_self_test_actions/:actionId
– by default (id) or /api/initiate_self_test_actions/:actionName Note: No HTTP header required to update email
action by id http header "by: name" required to
update email action by name |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE",
//ENUM
– EventSourceType "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, "key" : 1, "name" : "anInitiateSelfTestActionName" }, "type" : "initiate_self_test_actions" } } |
Success Response |
Code: 200 "meta": { "id":
"50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type": "initiate_self_test_actions", "id": "8", "attributes": { "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
The payload for update is similar to create. Alternatively
update api allow to add and remove list, set and clear events. Example: … "remove_set_events" : [ {
"name" : "seteventname2",
"source_type": "EVENT_SOURCE_TYPE_DEVICE",
"source_name" : "sourcename2" } ],
"add_clear_events" : [ {
"name" : "cleareventname1",
"source_type": "EVENT_SOURCE_TYPE_DEVICE",
"source_name" : "sourcename1" } ],
"add_set_events" : [ {
"name" : "seteventname1",
"source_type": "EVENT_SOURCE_TYPE_DEVICE",
"source_name" : "sourcename1" } ... |
The
Load Control Action endpoint provides a CRUD API for Load Control actions. It requires
device ID, load identifier (load ID or name and load number) and load action. This
API uses the following enums:
load_actions:
LOAD_ACTION_IDLE
LOAD_ACTION_OFF
LOAD_ACTION_ON
LOAD_ACTION_CYCLE
Title |
GET Load Control Action |
URL |
/api/load_control_actions |
Method |
GET |
URL Params |
Get Load Control Actions /api/load_control_actions/:actionId - By id (default) or /api/load_control_actions/actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] },
"data": { "type": "load_control_actions", "id": "7", "attributes":
{ "name": "aLoadControlActionName", "key": 0, "delay": 0, "enabled": true, "trigger_events":
[ { "id": "1", "key": 0, "name": "", //ENUM – EventSourceType "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "source_name": "", "action_id": "7", "action_name": "", "fire_on_set": true, "fire_on_clear": true } ], "load_identifier":
[ { "id": "1", "name": "", "load_number": 0 } ], "device_identity":
{ "device_id": 1, "device_name": "" }, "load_action": "LOAD_ACTION_ON"
//ENUM LoadAction } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Load Control Action |
URL |
/api/load_control_actions |
Method |
POST |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE",
//ENUM EventSourceType "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, "key" : 1, "name" : "aLoadControlActionName", "load_identifier": [ { "id": 1, "name": "", "load_number": 1 } ], "load_action":
"LOAD_ACTION_ON" //ENUM LoadAction }, "type" :
"load_control_actions" } } |
Success Response |
Code: 200 "meta": { "id":
"50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type": "load_control_actions", "id": "8", "attributes": { "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Load Control Action |
URL |
/api/load_control_actions |
Method |
PATCH |
URL Params |
PATCH Load Control Action api/load_control_actions/actionId – by
default (id) or /api/load_control_actions/:actionName Note: No HTTP header required to update action by
id http header "by: name" required to
update action by name |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE",
//ENUM EventSourceType "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, "key" : 1, "name" : "aLoadControlActionName", "load_identifier": [ { "id": 1, "name": "", "load_number": 1 } ], "load_action":
"LOAD_ACTION_ON" //ENUM LoadAction }, "type":
"load_control_actions" } } |
Success Response |
Code: 200 "meta": { "id":
"50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type":
"load_control_actions", "id": "8", "attributes": { "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Load Group Control Action endpoint provides a CRUD API for Load Group Control actions,
requiring device ID, load group identifier (load group id or name) and load
action. It uses the following enums:
load_action:
LOAD_ACTION_IDLE
LOAD_ACTION_OFF
LOAD_ACTION_ON
LOAD_ACTION_CYCLE
Title |
GET Load Group Control Action |
URL |
/api/load_group_control_actions |
Method |
GET |
URL Params |
Get Load Group Actions /api/load_group_control_actions/:actionId - By id (default) or /api/load_group_control_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] },
"data": { "type": "load_control_actions", "id": "7", "attributes":
{ "name": "aLoadControlActionName", "key": 0, "delay": 0, "enabled": true, "trigger_events":
[ { "id": "1", "key": 0, "name": "", "source_type": "EVENT_SOURCE_TYPE_DEVICE",
//ENUM EventSourceType "source_id": 1, "source_name": "", "action_id": "7", "action_name": "", "fire_on_set": true, "fire_on_clear": true } ], "load_group_identifier":[ { "id": "1",
//load group id "name": "" } ], "device_identity":
{ "device_id": 1, "device_name": "" }, "load_action": "LOAD_ACTION_ON"
//ENUM LoadAction } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Create Load
Group Control Action
Title |
Create Load Group Action |
URL |
/api/load_group_control_actions |
Method |
POST |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE", "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, // Integer device
id "key" : 1, "name" : "aLoadGroupControlActionName", " load_group_identifier [ { "id": 1, //Integer Load
group ID "name": "" } ], "load_action":
"LOAD_ACTION_ON" //ENUM LoadAction }, "type" : "load_group_control_actions" } } |
Success Response |
Code: 200 "meta": { "id": "50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type": "load_group_control_actions", "id": "8", "attributes": { "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update
Load Group Control Action |
URL |
/api/load_group_control_actions |
Method |
PATCH |
URL Params |
PATCH Load Group Control Action api/load_group_control_actions /actionId
– by default (id) or /api/load_group_control_actions /:actionName Note: No HTTP header required to get load group
action by id http header "by: name" required to
update load group action by name |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1",
//Integer event id "source_id" : 1, //Integer source id "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE",
//Enum – Load Group id "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, "key" : 1, "name" : "aLoadControlActionName", "load_group_identifier": [ { "id": 1, //Integer Load
group id "name": ""
//Optional String Load group name } ], "load_action":
"LOAD_ACTION_ON" }, "type": "load_group_control_actions" } } |
Success Response |
Code: 200 "meta": { "id":
"50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type": "load_group_control_actions", "id": "8", "attributes": { "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Mute Alarm Action endpoint provides a CRUD API for Mute Alarm actions. It
requires ‘device_id’ or ‘device_name’ and delay value.
Title |
GET Mute Alarm Action |
URL |
/api/mute_alarm_actions |
Method |
GET |
URL Params |
/api/mute_alarm_actions/:actionId - By id (default) or /api/mute_alarm_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] },
"data": { "type": "mute_alarm_actions", "id": "7", "attributes":
{ "name": "aLoadControlActionName", "key": 0, "delay": 2, "enabled": true, "trigger_events":
[ { "id": "1", "key": 0, "name": "", "source_type": "EVENT_SOURCE_TYPE_DEVICE",
//ENUM EventSourceType "source_id": 1, "source_name": "", "action_id": "7", "action_name": "", "fire_on_set": true, "fire_on_clear": true } ], "device_identity":
{ "device_id": 1, "device_name": ""
//String device name } } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Mute Alarm Action |
URL |
/api/mute_alarm_actions |
Method |
POST |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE",
//ENUM EventSourceTyps "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, "key" : 1, "name" : "aMuteAlarmAction" }, "type" : "mute_alarm_actions" } } |
Success Response |
Code: 200 "meta": { "id":
"50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type": "mute_alarm_actions", "id": "8", "attributes":
{ "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Mute Alarm Action |
URL |
/api/mute_alarm_actions |
Method |
PATCH |
URL Params |
api/mute_alarm_actions /actionId – by default (id) or /api/mute_alarm_actions /:actionName Note: No HTTP header required to get action by id http header "by: name" required to
update action by name |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE", "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, "key" : 1, "name" : "aMuteActionName”, }, "type": "mute_alarm_actions" } } |
Success Response |
Code: 200 "meta": { "id":
"50771da9-a56b-43ca-a324-0c95f0104c99" }, "data": { "type": "mute_alarm_actions", "id": "8", "attributes": { "response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Ramp Action endpoint provides a CRUD API for Ramp actions. It requires
‘device_id’ or ‘device_name’.
Title |
GET Ramp Action |
URL |
/api/ramp_actions |
Method |
GET |
URL Params |
/api/ramp_actions/:actionId- By id (default) or /api/ ramp_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] }, "data":
{ "type": "ramp_actions", "id": "14", "attributes":
{ "name": "aRampActionName", "key": 0, "delay": 0, "enabled": true, "trigger_events":
[ { "id": "1", "key": 0, "name": "", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "source_name": "", "action_id": "14", "action_name": "", "fire_on_set": true, "fire_on_clear": true }], "device_identity":
{ "device_id": 1, "device_name": "" } } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Ramp Action |
URL |
/api/ramp_actions |
Method |
POST |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE", "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, "key" : 1, "name" : "aRampActionName" }, "type" : "ramp_actions" } } |
Success Response |
Code: 201 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/ramp_actions" }, "data" : { "type" : "ramp_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Ramp Action |
URL |
/api/ramp_actions |
Method |
PATCH |
URL Params |
/api/ramp_actions/:actionId or /api/ramp_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to
update action by name |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE", "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, "key" : 1, "name" : "aRampActionName" }, "type" : "ramp_actions" } } |
Success Response |
Code: 200 { "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/ramp_actions" }, "data" : { "type" : "ramp_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Reboot Action endpoint provides a CRUD API for Reboot OS actions. This API is
supported only for PowerAlert Office/Home/Medical.
Title |
GET Reboot OS Action |
URL |
/api/reboot_os_actions |
Method |
GET |
URL Params |
/api/reboot_os_actions /:actionId or /api/reboot_os_actions /:actionName Note: No
HTTP header required to get reboot os action by id http header "by: name" required to get
action by name |
Success Response |
"data":
{ { "id": "1", "key": 0, "name": "", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "source_name": "", "action_id": "7", "action_name": "", "fire_on_set": true, "fire_on_clear": true } ], } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
Create Reboot
OS Action
Title |
Create Reboot OS Action |
URL |
/api/reboot_os_actions |
Method |
POST |
Data Params |
{ |
Success Response |
Code: 201 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
Title |
Update Reboot OS Action |
URL |
/api/reboot_os_actions |
Method |
PATCH |
URL Params |
/api/reboot_os_actions /:actionId or /api/reboot_os_actions /:actionName Note: No HTTP header required to get ramp action
by id http header "by: name" required to
update reboot os action by name |
Data Params |
{
"name": "<String>"
"add_set_events" : [
"remove_set_events" : [
} |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
The
Reboot Web LX Action endpoint provides a CRUD API for Rebooting LX actions.
Title |
GET Reboot Web LX Action |
URL |
/api/reboot_web_lx_actions |
Method |
GET |
URL Params |
/api/reboot_web_lx_actions/:actionId or /api/reboot_web_lx_actions/:actionName Note: No
HTTP header required to get reboot web lx action by id http header "by: name" required to get
action by name |
Success Response |
{ … "data":
{ "type": "reboot_web_lx_actions", "id": "12", "attributes":
{ "name": "aRebootWebLxActionName", "key": 0, "delay": 0, "enabled": true, "trigger_events":
[ { "id": "1", "key": 0, "name": "", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "source_name": "", "action_id": "12", "action_name": "", "fire_on_set": true, "fire_on_clear": true }] } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Reboot Web LX Action |
URL |
/api/reboot_web_lx_actions |
Method |
POST |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE", "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "key" : 1, "name" : "aRebootWebLxActionName" }, "type" : "reboot_web_lx_actions" } } |
Success Response |
Code: 201 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/reboot_web_lx_actions" }, "data" : { "type" : "reboot_web_lx_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Reboot Web LX Action |
|
URL |
api/reboot_web_lx_actions |
|
Method |
PATH |
|
URL Params |
api/reboot_web_lx_actions/:actionId or /api/reboot_web_lx_actions/:actionName Note: No HTTP header required to get ramp action
by id http header "by: name" required to
update reboot os action by name |
|
Data Params |
|
|
Success Response |
Code: 200 { "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/reboot_web_lx_actions" }, "data" : { "type" : "reboot_web_lx_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
|
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Script Action endpoint provides a CRUD API for Script actions. This API is
supported only for PowerAlert Office/Home/Medical.
Title |
GET Script Action |
URL |
/api/script_actions |
Method |
GET |
URL Params |
/api/script_actions/:actionId or /api/script_actions/:actionName Note: No
HTTP header required to get reboot web lx action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] }, "data": { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
Title |
Create Script Action |
URL |
/api/script_actions |
Method |
POST |
Data Params |
{ |
Success Response |
Code: 201 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
Title |
Update Script Action |
|
URL |
/api/script_actions |
|
Method |
PATH |
|
URL Params |
/api/script_actions/:actionId or /api/script_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to
update action by name |
|
Data Params |
|
|
Success Response |
Code: 200 { |
|
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
|
NOTE |
This API is supported only for PowerAlert Local |
The
Sensor Action endpoint provides a CRUD API for Sensor actions. It uses the
following enums:
contact:
CONTACTS_SENSOR_CONTACT_1
CONTACTS_SENSOR_CONTACT_2
contact_state:
CONTACTSTATE_SENSOR_STATE_OPEN
CONTACTSTATE_SENSOR_STATE_CLOSED
Title |
GET Sensor Action |
URL |
|
Method |
GET |
URL Params |
/api/sensor_actions/:actionId or /api/sensor_actions/:actionName Note: No
HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] }, "data": { "source_type": "EVENT_SOURCE_TYPE_DEVICE",
//Event Source Type Enum |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Sensor Action |
URL |
|
Method |
POST |
Data Params |
{ "source_name": "", |
Success Response |
Code: 201 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Sensor Action |
|
URL |
|
|
Method |
PATH |
|
URL Params |
/api/sensor_actions/:actionId or /api/sensor_actions/:actionName Note: No HTTP
header required to get sensor action by id http header "by: name" required to
update action by name |
|
Data Params |
|
|
Success Response |
Code: 200 { |
|
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Shed Action endpoint provides a CRUD API for Shed actions.
Title |
Get Shed Action |
URL |
/api/shed_actions |
Method |
GET |
URL Params |
/api/shed_actions/:actionId or /api/shed_actions/:actionName Note: No
HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] }, "data":
{ "type": "shed_actions", "id": "14", "attributes":
{ "name": "aShedActionName", "key": 0, "delay": 0, "enabled": true, "trigger_events":
[ { "id": "1", "key": 0, "name": "", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "source_name": "", "action_id": "14", "action_name": "", "fire_on_set": true, "fire_on_clear": true }], "device_identity":
{ "device_id": 1, "device_name": "" } } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Shed Action |
URL |
/api/shed_actions |
Method |
POST |
Data Params |
{ "data" : { "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "fire_on_clear" : true, "source_type" : "EVENT_SOURCE_TYPE_DEVICE", "fire_on_set" : true } ], "enabled" : true, "delay" : 0, "device_id" : 1, "key" : 1, "name" : "aShedActionName" }, "type" : "shed_actions" } } |
Success Response |
Code: 201 { "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/shed_actions" }, "data" : { "type" : "shed_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Shed Action |
|
URL |
/api/shed_actions |
|
Method |
PATCH |
|
URL Params |
/api/shed_actions/:actionId or /api/shed_actions/:actionName Note: No HTTP
header required to get sensor action by id http header "by: name" required to
update action by name |
|
Data Params |
|
|
Success Response |
Code: 200 { "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/shed_actions" }, "data" : { "type" : "shed_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
|
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Shutdown Action endpoint provides a CRUD API for Shutdown actions.
Title |
GET Shutdown Action |
URL |
/api/shutdown_actions |
Method |
GET |
URL Params |
/api/shutdown_actions/:actionId or /api/shutdown_actions/:actionName Note: No
HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
"data":
{ "shutdown_os_delay": "<Boolean>", |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
Title |
Create Shutdown Action |
URL |
/api/shutdown_actions |
Method |
POST |
Data Params |
{ "enabled" : "<Boolean>", |
Success Response |
Code: 201 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
Title |
Update Shutdown Action |
|
URL |
/api/shutdown_actions |
|
Method |
PATCH |
|
URL Params |
/api/shutdown_actions/:actionId or /api/shutdown_actions/:actionName Note: No HTTP
header required to get sensor action by id http header "by: name" required to
update action by name |
|
Data Params |
|
|
Success Response |
Code: 200 { |
|
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
|
NOTE |
This API is supported only for PowerAlert Local |
The
Shutdown Home Action endpoint provides a CRUD API for Shutdown actions. This API is supported only for PowerAlert Office/Home/Medical.
It uses the
following enums:
type:
SHUTDOWN_HOME_NONE
SHUTDOWN_HOME_ON_BATTERY
SHUTDOWN_HOME_POWER_REMAINING
SHUTDOWN_HOME_RUNTIME_REMAINING
SHUTDOWN_HOME_BATTERY_LOW
Title |
GET Shutdown Home Action |
URL |
/api/shutdown_home_actions |
Method |
GET |
Success Response |
{ "battery_time_remaining_supported": "<Boolean>", } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
Title |
Update Shutdown Action |
URL |
/api/shutdown_actions |
Method |
PATCH |
Data Params |
{
"type": "<ENUM Shutdown type>", |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
The
Shutdown Method endpoint provides a GET and Update API for the Shutdown method.
This API is supported only for PowerAlert
Office/Home/Medical. It uses the following enums:
shutdown_method:
SHUTDOWN_METHOD_SHUTDOWN
SHUTDOWN_METHOD_HIBERNATE
Title |
GET Shutdown Method |
URL |
/api/shutdown_method |
Method |
GET |
Success Response |
{ } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
Title |
Update Shutdown Method |
URL |
/api/shutdown_method |
Method |
PATCH |
Data Params |
{
"type": "shutdown_method" "type": "shutdown_method", } } |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is supported only for PowerAlert Local |
The
SMS Action endpoint provides a CRUD API for SMS actions. SMS Action has attributes ‘sms_contact’ and ‘send_to_all’.
If ‘send_to_all’ is set to true, sms will be sent to all sms contacts. If set
to false, the ‘sms_contact’ field must contain one or more valid sms contact IDs.
Title |
GET SMS Action |
URL |
/api/sms_actions |
Method |
GET |
URL Params |
Get SMS Action /api/sms_actions/:actionId - By id (default) or /api/sms_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] }, "data": { "type" : "sms_actions",
"id" : "1", "attributes": { "name": "smsaction", "key": 0, "delay": 30, "enabled": true, "trigger_events": [ { "id":
"5", "key": 0, "name":
"", //ENUM EventSourceTYpe "source_type":
"EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "source_name":
"Device0391", "action_id":
"11", "action_name":
"", "fire_on_set":
false,
"fire_on_clear": true } ], "interval": 0, "sms_contacts" : []
"send_to_all": true, } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create SMS Action |
URL |
/api/sms_actions |
Method |
POST |
Data Params |
{ "data" : { "type" : "sms_actions", "attributes" : { "sms_contact" : [ { "id" : 1 }, { "id" : 2 } ], "enabled" : true, "send_to_all" : false, "trigger_events" : [ { "fire_on_clear" : true, "action_name" : "", "id" : "1", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "key" : 40, "source_id" : 1, "fire_on_set" : true, "name" : "eventName" } ], "count" : 1, "delay" : 0, "key" : 1, "name" : "anSmsActionName", "interval" : 0 } } } |
Success Response |
Code: 201 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/sms_actions" }, "data" : { "type" : "sms_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update SMS Action |
URL |
/api/sms_actions |
Method |
PATCH |
URL Params |
PATCH SMS Action /api/sms_actions/:actionId - By id (default) or /api/sms_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to update
action by name |
Data Params |
{ "data" : { "type" : "sms_actions", "attributes" : { "sms_contact" : [ { "id" : 1 }, { "id" : 2 } ], "enabled" : true, "send_to_all" : false, "trigger_events" : [ { "fire_on_clear" : true, "action_name" : "", "id" : "1", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_name" : "", "key" : 0, "source_id" : 1, "action_id" : 0, "name" : "eventName", "fire_on_set" : true } ], "count" : 1, "delay" : 0, "key" : 1, "name" : "anSmsActionName", "interval" : 0 } } } |
Success Response |
Code: 200 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/sms_actions" }, "data" : { "type" : "sms_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
SNMP SET OID Action endpoint
provides a CRUD API for SNMP OID actions.
SNMP OID Action has attributes ‘snmp_contact’ and ‘send_to_all’. If ‘send_to_all’
is set to true, SNMP notifications will be sent to all SNMP contacts. If set to
false, the ‘snmp_contact’ field must contain one or more valid SNMP contact IDs.
It uses the following of enum:
data_type:
OID_DATA_TYPE_INTEGER
OID_DATA_TYPE_U_INTEGER32
OID_DATA_TYPE_OCTET_STRING
Title |
Get SNMP SET OID Action |
URL |
/api/snmp_set_oid_actions |
Method |
GET |
URL Params |
/api/snmp_set_oid_actions/:actionId or /api/snmp_set_oid_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
Code: 200 "meta": { "id":
"92b2d8f3-49d2-4ae3-916e-70e0a6af8549", "constraints": { … }, "validation": [ … ] }, "data":
{ "type": "snmp_set_oid_actions", "id": "10", "attributes":
{ "name": "anSnmpSetOidActionName", "key": 0, "delay": 0, "enabled": true, "trigger_events":
[ { "id": "1", "key": 0, "name": "", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "source_name": "", "action_id": "10", "action_name": "", "fire_on_set": true, "fire_on_clear": true }], "interval": 0, "count": 1, "send_to_all": false, "snmp_contact":
[ { "id": "1", "name": null }, { "id": "2", "name": null } ], "oid": "anoidvalue", "value": "avalue", "data_type": "DATA_TYPE_STRING" } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create SNMP SET OID Action |
URL |
/api/snmp_set_oid_actions |
Method |
POST |
Data Params |
{ "data":
{ "type": "snmp_set_oid_actions", "attributes":
{ "name": "anSnmpSetOidActionName", "key": 1, "delay": 0, "interval": 0, "count": 1, "enabled": true, "oid": "anoidvalue", "value": "avalue", "data_type": "DATA_TYPE_STRING", "send_to_all": false, "snmp_contact":
[ {"id": 1}, {"id": 2} ], "trigger_events":
[ { "id": "1", "name": "eventName", "key": 40, "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "action_name": "", "fire_on_set": true, "fire_on_clear": true } ] } } } |
Success Response |
Code: 201 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/snmp_set_oid_actions" }, "data" : { "type" : "snmp_set_oid_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update SNMP SET OID Action |
URL |
/api/snmp_set_oid_actions |
Method |
PATCH |
URL Params |
PATCH SNMP SET OID Action /api/snmp_set_oid_actions/:actionId or /api/snmp_set_oid_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to
update action by name |
Data Params |
{ "data":
{ "type": "snmp_set_oid_actions", "attributes":
{ "name": "anSnmpSetOidActionName", "key": 1, "delay": 0, "interval": 0, "count": 1, "enabled": true, "oid": "anoidvalue", "value": "avalue", "data_type": "DATA_TYPE_STRING", "send_to_all": false, "snmp_contact":
[ {"id": 1}, {"id": 2} ], "trigger_events":
[ { "id": "1", "name": "eventName", "key": 40, "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_id": 1, "action_name": "", "fire_on_set": true, "fire_on_clear": true } ] } } } |
Success Response |
Code: 200 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/snmp_set_oid_actions" }, "data" : { "type" : "snmp_set_oid_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
SNMP Trap Action endpoint provides a CRUD API for SNMP Trap actions. SNMP Trap Action has attributes ‘snmp_contact’
and ‘send_to_all’. If ‘send_to_all’ is set to true, SNMP traps will be sent to
all SNMP contacts. If set to false, the ‘snmp_contact’ field must contain one
or more valid SNMP contact IDs or names.
Title |
GET SNMP Trap Action |
URL |
/api/trap_actions |
Method |
GET |
URL Params |
/api/trap_actions/:actionId or /api/trap_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
"data" : { "type" : "trap_actions", "id" : "5", "attributes" : { "enabled" : true, "send_to_all" : false, "snmp_contacts" : [ { "id" : "1", "name" : "testname1" }, { "id" : "2", "name" : "testname2" } ], "count" : 1, "delay" : 0, "trigger_events" : [ { "fire_on_clear" : true, "action_name" : "", "id" : "1", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_name" : "", "key" : 0, "source_id" : 1, "action_id" : "5", "name" : "", "fire_on_set" : true } ], "key" : 0, "name" : "aTrapActionName2", "interval" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create SNMP Trap Action |
URL |
/api/trap_actions |
Method |
POST |
Data Params |
{ "data" : { "type" : "trap_actions", "attributes" : { "enabled" : true, "send_to_all" : false, "snmp_contacts" : [ { "id" : 1 }, { "id" : 2 } ], "count" : 1, "delay" : 0, "trigger_events" : [ { "fire_on_clear" : true, "action_name" : "", "id" : "1", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "key" : 40, "source_id" : 1, "fire_on_set" : true, "name" : "eventName" } ], "key" : 1, "name" : "aTrapActionName2", "interval" : 0 } } } |
Success Response |
Code: 201 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/trap_actions" }, "data" : { "type" : "trap_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided, the
service return the latest one |
Title |
Update SNMP Trap Action |
URL |
/api/trap_actions |
Method |
PATCH |
URL Params |
/api/trap_actions/:actionId or /api/trap_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to
update action by name |
Data Params |
{ "data" : { "type" : "trap_actions", "attributes" : { "enabled" : true, "send_to_all" : false, "snmp_contacts" : [ { "id" : 1, "name" : "testname1" }, { "id" : 2, "name" : "testname2" } ], "count" : 1, "delay" : 0, "trigger_events" : [ { "fire_on_clear" : true, "action_name" : "", "id" : "1", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "key" : 40, "source_id" : 1, "fire_on_set" : true, "name" : "eventName" } ], "key" : 1, "name" : "aTrapActionName2", "interval" : 0 } } } |
Success Response |
Code: 200 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/trap_actions" }, "data" : { "type" : "trap_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Turn Off Device Action endpoint provides a CRUD API for Turn Off Device actions. It requires a target device identity in the
form of ‘device_name’ or ‘device_id’.
Title |
GET Turn Off Device Action |
URL |
/api/turn_off_device_actions |
Method |
GET |
URL Params |
/api/turn_off_device_actions/:actionId or /api/turn_off_device_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
{ "data" : { "type" : "turn_off_device_actions", "id" : "5", "attributes" : { "device_identity" : { "device_name" : "", "device_id" : 0 }, "trigger_events" : [ { "fire_on_clear" : false, "action_name" : "", "id" : "5", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_name" : "", "key" : 0, "source_id" : 1, "action_id" : "5", "name" : "", "fire_on_set" : true }, { "fire_on_clear" : false, "action_name" : "", "id" : "9", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_name" : "", "key" : 0, "source_id" : 1, "action_id" : "5", "name" : "", "fire_on_set" : true } ], "key" : 1284, "delay" : 120, "name" : "Default Device
Shutdown", "enabled" : true } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Turn Off Device Action |
URL |
/api/turn_off_device_actions |
Method |
POST |
Data Params |
{ "data" : { "type" : "turn_off_device_actions", "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "source_type": "EVENT_SOURCE_TYPE_DEVICE", "fire_on_clear" : true, "fire_on_set" : true } ], "key" : 1, "delay" : 0, "name" : "aTurnOffDeviceActionName", "enabled" : true, "device_id" : 1 } } } |
Success Response |
Code: 201 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/turn_off_device_actions" }, "data" : { "type" : "turn_off_device_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Turn Off Device Action |
URL |
/api/turn_off_device_actions |
Method |
PATCH |
URL Params |
/api/turn_off_device_actions/:actionId or /api/turn_off_device_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to
update action by name |
Data Params |
{ "data" : { "type" : "turn_off_device_actions", "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "source_type": "EVENT_SOURCE_TYPE_DEVICE", "fire_on_clear" : true, "fire_on_set" : true } ], "enabled" : true, "delay" : 1, "name" : "aTurnOffDeviceActionName", "device_id" : "1" } } } |
Success Response |
Code: 200 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/turn_off_device_actions" }, "data" : { "type" : "turn_off_device_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Turn On Device Action endpoint provides a CRUD API for Turn On Device actions. It requires a device identity attribute in
the form of ‘device_id’ or ‘device_name’.
Title |
GET Turn On Device Action |
URL |
/api/turn_on_device_actions |
Method |
GET |
URL Params |
/api/turn_on_device_actions/:actionId or /api/turn_on_device_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
{ "data":
{ "type": "turn_on_device_actions", "id": "5", "attributes":
{ "device_identity":
{ "device_name": "", "device_id": 0 }, "trigger_events":
[ { "fire_on_clear": false, "action_name": "", "id": "5", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_name": "", "key": 0, "source_id": 1, "action_id": "5", "name": "", "fire_on_set": true }, { "fire_on_clear": false, "action_name": "", "id": "9", "source_type": "EVENT_SOURCE_TYPE_DEVICE", "source_name": "", "key": 0, "source_id": 1, "action_id": "5", "name": "", "fire_on_set": true } ], "key": 1284, "delay": 120, "name": "Default
Turn On Device", "enabled": true } } }} |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Turn On Device Action |
URL |
/api/turn_on_device_actions |
Method |
POST |
Data Params |
{ "data" : { "type" : "turn_on_device_actions", "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "source_type": "EVENT_SOURCE_TYPE_DEVICE", "fire_on_clear" : true, "fire_on_set" : true } ], "key" : 1, "delay" : 0, "name" : "aTurnOnDeviceActionName", "enabled" : true, "device_id" : 1 } } } |
Success Response |
Code: 201 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/turn_on_device_actions" }, "data" : { "type" : "turn_on_device_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Turn On Device Action |
URL |
/api/turn_on_device_actions |
Method |
PATCH |
URL Params |
/api/turn_on_device_actions/:actionId or /api/turn_on_device_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to
update action by name |
Data Params |
{ "data" : { "type" : "turn_on_device_actions", "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "source_type": "EVENT_SOURCE_TYPE_DEVICE", "fire_on_clear" : true, "fire_on_set" : true } ], "enabled" : true, "delay" : 1, "name" : "aTurnOnDeviceActionName", "device_id" : "1" } } } |
Success Response |
Code: 200 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/turn_on_device_actions" }, "data" : { "type" : "turn_on_device_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Restart Device Action endpoint provides a CRUD API for Restart Device actions. It requires a device identity attribute in
the form of ‘device_id’ or ‘device_name’. Shutdown and restart delays (in
seconds) can be entered.
Title |
GET
Restart Device Action |
URL |
|
Method |
GET |
URL Params |
/api/restart_device_actions/:actionId or /api/restart_device_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to get
action by name |
Success Response |
{ "meta": { "id":
"6d28a089-21cf-4149-aba4-77fc58e0e2c2", "constraints":
{ }, "validation":
[ ], "path":
"/api/restart_device_actions/6" }, "data": { "type":
"restart_device_actions", "id":
"6", "attributes":
{ "name":
"aTurnOnDeviceActionName", "key":
0, "delay":
1, "enabled":
true, "trigger_events":
[{ "id":
"1", "key":
0, "name":
"", "source_type":
"EVENT_SOURCE_TYPE_AUTOPROBE", "source_id":
1, "source_name":
"Watchdog Ping", "action_id":
"6", "action_name":
"", "fire_on_set":
true, "fire_on_clear":
true }], "device_identity":
{ "device_id":
1, "device_name":
"Device0391" }, "shutdown_delay":
1, "restart_delay":
2 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Restart Device Action |
URL |
/api/restart_device_actions |
Method |
POST |
Data Params |
{ "data" : { "type" : "restart_device_actions ", "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "source_type": "EVENT_SOURCE_TYPE_DEVICE", "fire_on_clear" : true, "fire_on_set" : true } ], "key" : 1, "delay" : 0, "name" : "restartDevice", "enabled" : true, "device_id" : 1, "shutdown_delay": 1, "restart_delay":
2 } } } |
Success Response |
Code: 201 "meta" : { "id" : "f2259364-ce69-44d2-8f95-1aa145c20fdb", "path" : "\/api\/turn_on_device_actions" }, "data" : { "type" : "turn_on_device_actions", "id" : "5", "attributes" : { "response" : 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Restart Device Action |
URL |
/api/restart_device_actions |
Method |
PATCH |
URL Params |
/api/restart_device_actions/:actionId or /api/restart_device_actions/:actionName Note: No HTTP header required to get action by id http header "by: name" required to
update action by name |
Data Params |
{ "data" : { "type" : "restart_device_actions", "attributes" : { "trigger_events" : [ { "id" : "1", "source_id" : 1, "source_type": "EVENT_SOURCE_TYPE_DEVICE", "fire_on_clear" : true, "fire_on_set" : true } ], "enabled" : true, "delay" : 1, "name" : "RestartDeviceName", "device_id" : "1",
"shutdown_delay": 1,
"restart_delay": 2 } } } |
Success Response |
Code: 200 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Alarm API enables display of alerts for the device and any connected peripherals
(e.g. sensors). An alarm is active if it has not been acknowledged, nor
cleared. An alarm is cleared when the condition that triggered the alarm is no
longer in effect. An alarm can be acknowledged in one of two ways:
automatically (using event service) or manually. Alarm API enables manual
acknowledgement of single or multiple alarms. The alarm data can also be sorted
by Date/Time in descending or ascending order. It uses the following enums:
event_source_type:
EVENT_SOURCE_TYPE_DEVICE
EVENT_SOURCE_TYPE_AUTOPROBE
EVENT_SOURCE_TYPE_SYSTEM
severity:
EVENT_SEVERITY_EMERGENCY
EVENT_SEVERITY_ALERT
EVENT_SEVERITY_CRITICAL
EVENT_SEVERITY_ERROR
EVENT_SEVERITY_WARNING
EVENT_SEVERITY_NOTICE
EVENT_SEVERITY_INFORMATIONAL
EVENT_SEVERITY_DEBUG
high_severity:
ALARM_SEVERITY_LEVEL_NONE
ALARM_SEVERITY_LEVEL_CRITICAL
ALARM_SEVERITY_LEVEL_WARNING
ALARM_SEVERITY_LEVEL_INFORMATIONAL
Title |
GET All Alarms |
URL |
|
Method |
GET |
URL Params |
Filtering · 'filter'
query parameter is used for filtering: Field Equals to Value: /api/alarms?filter=[{"name":"<field name>","op":"eq","val":<field
value>}] Example filter=[{"name":
"acknowledged","op": "eq","val":
false}] · Checking for multiple
value: /api/alarms?filter=[{"name":"<field
name>","op":"_in","val":[<field
value1>,..., <field value N>] }] Example: filter=[{"name":
"severity","op": "in_","val":
["EVENT_SEVERITY_ERROR","EVENT_SEVERITY_WARNING","EVENT_SEVERITY_CRITICAL"]} · Timestamp Range: /api/alarms?filter=[{"name":"occurred_time","op":"ge","val":
"YYYY-MM-DDTHH:mm:ss-00:00"}, {"name":"occurred_time","op":"le","val":
"YYYY-MM-DDTHH:mm:ss-00:00"}] Example filter=[{"name":
"occurred_time","op": "range","val":
["2019-06-06T15:38:54-05:00","2019-06-09T15:38:54-05:00"]}] · Timestamp from Date Time: /api/alarms?filter=[{"name":"occurred_time","op":"ge","val":"YYYY-MM-DDTHH:mm:ss-00:00"}] Example: filter=[{"name":
"occurred_time","op": "ge","val":
"2019-05-06T15:38:54-05:00"}] · Timestamp till Date Time: /api/alarms?filter=[{"name":"occurred_time","op":"le","val":
"YYYY-MM-DDTHH:mm:ss-00:00"}] Example: filter=[{"name": "occurred_time","op":
"le","val": "2019-05-06T15:38:54-05:00"}] Sorting · 'sort' query
parameter is used for sorting: /api/alarms?sort=<fieldname> · Descendant Sort: /api/alarms?sort=-<fieldname> Example : sort in descendant order based on alarm occurred
time /api/alarms?sort=-occurred_time ·
Multiple Sort: /api/alarms?sort=<fieldname1>,
<fieldname2> ·
Multiple + Descendant Sort: /api/alarms?sort=<fieldname1>,
-<fieldname2> Pagination /api/alarms?page[size]=<page
size>&page[number]=<page number> Default: page size = 30 page number = 1 Examples: ·
ID Range Filter /api/alarms?id[from]=<from id>&id[tp]=<to id> Example /api/alarms?id[from]=1&id[to]=10 ·
Combination
Example http://127.0.0.1:3001/api/alarms?filter=[{"name":
"severity","op": "in_","val": ["EVENT_SEVERITY_ERROR","EVENT_SEVERITY_WARNING","EVENT_SEVERITY_CRITICAL"]},{"name":"source_name","op":"in_","val":["Sensor0014","Device0001"]}]&sort=-occurred_time&page[size]=5&page[number]=1 ·
Get
all cleared alarms http://127.0.0.1:3001/api/alarms?page[size]=5&page[number]=1&filter=[{"name":
"cleared","op": "eq","val": true}] ·
Get
all acknowledged alarms http://127.0.0.1:3001/api/alarms?page[number]=1&filter=[{"name":
"acknowledged","op": "eq","val":
true}] |
Success Response |
Code: 200 Content: { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET
One Alarm |
URL |
|
Method |
GET |
Success Response |
Code: 200 Content: { "meta": { "id":
"request id",
"constraints": {},
"validation": [
{
"attribute": "event_key",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "event_source_type",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_SOURCE_TYPE_DEVICE",
"EVENT_SOURCE_TYPE_AUTOPROBE",
"EVENT_SOURCE_TYPE_SYSTEM"
],
"type": "enum"
},
{
"attribute": "source_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "severity",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_SEVERITY_EMERGENCY",
"EVENT_SEVERITY_ALERT",
"EVENT_SEVERITY_CRITICAL",
"EVENT_SEVERITY_ERROR",
"EVENT_SEVERITY_WARNING",
"EVENT_SEVERITY_NOTICE",
"EVENT_SEVERITY_INFORMATIONAL",
"EVENT_SEVERITY_DEBUG"
],
"type": "enum"
},
{
"attribute": "detail",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "occurred_time",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "datetime"
},
{
"attribute": "cleared_time",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "datetime"
},
{
"attribute": "cleared",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "acknowledged",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "acknowledged_time",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "datetime"
},
{
"attribute": "localize",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
} ],
"path": "/api/alarms/5" },
"data": {
"type": "alarms",
} } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Acknowledge Alarms |
URL |
|
Method |
PATCH |
URL Params |
|
Data Params |
|
Success Response |
Code: 200 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Acknowledge All Alarms |
URL |
|
Method |
PATCH |
Success Response |
Code: 200 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
Return
empty array if there is no alarm to acknowledge |
Title |
GET Alarm Summary |
URL |
|
Method |
GET |
Success Response |
Code: 200 { "meta": {
"id": "ceac87cb-5753-426b-a665-647551f02b2e",
"constraints": {},
"validation": [
{
"attribute": "critical_alarm_count",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "warning_alarm_count",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "informational_alarm_count",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "total_alarm_count",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "high_severity",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"ALARM_SEVERITY_LEVEL_NONE",
"ALARM_SEVERITY_LEVEL_CRITICAL",
"ALARM_SEVERITY_LEVEL_WARNING",
"ALARM_SEVERITY_LEVEL_INFORMATIONAL"
],
"type": "enum"
} ],
"path": "/api/alarms/summary" }, "data": {
"type": "alarms",
"attributes": {
"critical_alarm_count": <int>
"warning_alarm_count": <int>,
"informational_alarm_count": <int>,
"total_alarm_count": <int>,
"high_severity": "Enum ALARM SEVERITY" } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
Return
empty array if there is no alarm to acknowledge |
PowerAlert uses an OAuth 2.0
token-based authentication model. Under this model, a user calls POST
/api/outh/token to request access token. An access token is returned if the
credential passed in the POST request is valid. An access token passed in the
headers of each subsequent request and used to determine if the user is
authorized to perform the operation. Token request (login), refresh token and
logout are separate API each of them explained in detail below.
An authentication token is
required to interact with PowerAlert APIs. Once obtained, this token must
appear in the HTTP header of any subsequent requent.
HEADERS
Authorization
Bearer {access_token}
Title |
Login |
URL |
|
Method |
POST |
Data Params |
{
"username":"localadmin",
"password":"localadmin",
"grant_type": "password" } |
Success Response |
Code:
200 {
"access_token": "<string>",
"msg": "Logged in as localadmin",
"refresh_token": "<String>" } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
Return
empty array if there is no alarm to acknowledge |
Title |
Refresh Token |
URL |
|
Method |
POST |
URL Params |
HTTP Header required: Authorization: Bearer {refresh_token} Where refresh_token comes from login request |
Success Response |
Code: 200 {
"access_token": "<string>",
"msg": "Logged in as localadmin",
"refresh_token": "<String>" } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
Return
empty array if there is no alarm to acknowledge |
Title |
Logout |
URL |
|
Method |
POST |
URL Params |
HTTP Header required: Authorization:
Bearer {refresh_token} Where refresh_token comes from login request |
Success Response |
Code: 200 {} |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
Return
empty array if there is no alarm to acknowledge |
The
Alert Contact API enables creation, editing and deletion of alert notification
recipients. Three types of alert contact can be created: Email, SMS and SNMP.
For testing each type of alert contact, use the following enums:
last_test_status:
TEST_STATUS_UNSPECIFIED
TEST_STATUS_NONE
TEST_STATUS_SUCCESS are these the right enums for Alert Contaxt?
TEST_STATUS_FAIL
The
Email Contact API enables creating, editing, deleting and testing email
notification recipients.
Title |
GET
All Email Contacts |
URL |
|
Method |
|
URL Params |
|
Data Params |
|
Success Response |
Code: 200 Content: { "meta": { }, "data":[ "last_test_message": "<string>", } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Get One Email Contact |
URL |
|
Method |
GET |
URL Params |
Note: No HTTP header required to get by id http header "by: name" required to
update by name |
Success Response |
Code: 200 Content: { "meta": { }, "data":{ "last_test_message": "<string>", } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create
Email Contact |
URL |
|
Method |
|
Data Params |
{
} |
Success Response |
Code: 201 {
} |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete Email Contact |
URL |
|
Method |
PATCH |
URL Params |
Note: No HTTP header required to delete by id http header "by: name" required to delete
by name |
Success Response |
Code: 200 { "meta":{ "id":"<request id>" }, "data":{ "type":"email_contacts", "id":"<string, deleted contact id>", "attributes":{ "response":0 } }
} |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Test
Email Contact |
URL |
|
Method |
|
Data Params |
{ |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
SMS Contact API enables creating, editing, deleting and testing SMS
notification recipients.
Title |
GET
All SMS Contacts |
URL |
|
Method |
|
Success Response |
Code: 200 Content: { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET One SMS Contact |
URL |
|
Method |
GET |
URL Params |
Note: No HTTP header required to get by id http header "by: name" required to
update by name |
Success Response |
Code: 200 Content: { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create
SMS Contact |
URL |
|
Method |
|
Data Params |
{ |
Success Response |
Code: 201 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete SMS Contact |
URL |
|
Method |
DELETE |
URL Params |
Note: No HTTP header required to delete by id http header "by: name" required to
delete by name |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update
SMS Contact |
URL |
|
Method |
|
URL Params |
Note: No HTTP header required to update by id http header "by: name" required to
update by name |
Data Params |
{ |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET All SMS Providers
|
URL |
|
Method |
|
Success Response |
Code: 200 { ...
Example: { }, |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Test
SMS Contact |
URL |
|
Method |
|
Data Params |
{ |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
SNMP Contact API enables creating, editing, deleting and testing SNMP
notification recipients. It uses the following enums:
snmp_version:
SNMP_PROTOCOL_V1
SNMP_PROTOCOL_V2
SNMP_PROTOCOL_V3
notification_type:
NOTIFICATION_TYPE_TRAP
NOTIFICATION_TYPE_INFORM
last_test_status:
TEST_STATUS_SUCCESS
TEST_STATUS_FAIL
TEST_STATUS_NONE
privacy_mode:
SNMPV3_AUTH_NO_AUTH_NO_PRIV
SNMPV3_AUTH_AUTH_NOPRIV
SNMPV3_AUTH_AUTH_PRIV
auth_proto:
SNMPV3_AUTH_PROTO_MD5
SNMPV3_AUTH_PROTO_SHA
priv_proto:
SNMPV3_PRIV_PROTO_DES
SNMPV3_PRIV_PROTO_AES
Title |
GET All SNMP Contacts |
URL |
/api/snmp_contacts?snmpVersion=:snmpVersion |
Method |
GET |
URL Params |
Optional: snmpVersion=<enum, snmp version> example: snmpVersion=SNMP_PROTOCOL_V1 If empty, all snmp users, of all
versions are returned |
Success Response |
Code: 200 { "test_result_trap", "test_result_set" ], // v1/v2c contact:
"last_test_trap_timestamp":"<number in
seconds>", "community":"" // v3 contact
"last_test_trap_status":"<enum, test
status>", "user_name":"<string>", |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is used for SNMP v1, v2c,
and v3 variants. |
Title |
GET One SNMP Contact |
URL |
/api/snmp_contacts/:contactId
or /api/snmp_contacts/:contactName |
Method |
GET |
URL Params |
/api/snmp_contacts/:contactId
or /api/snmp_contacts/:contactName Note: No HTTP header required to get by id http header "by: name" required to
update by name |
Success Response |
Code: 200 {
"test_result_trap",
"test_result_set"
"last_test_trap_status": "<enum test
status>", } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/snmp_contacts/123 http://localhost:3001/api/snmp_contacts/somecontactname |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create
SNMP Contact |
URL |
/api/snmp_contacts |
Method |
|
Data Params |
{
"last_test_trap_status": "<enum test
status>", // for v1/v2c only: // for v3 only: |
Success Response |
Code: 201 {
"last_test_trap_status": "<enum test
status>", // for v1/v2c only: // for v3 only: |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
This API is used for SNMP v1, v2c,
and v3 variants. |
Title |
Delete SNMP Contact |
URL |
/api/snmp_contacts/:contactId or /api/snmp_contacts/:contactName |
Method |
DELETE |
URL Params |
/api/snmp_contacts/:contactId or /api/snmp_contacts/:contactName Note: No HTTP header required to delete by id http header "by: name" required to
delete by name |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update
SNMP Contact |
URL |
/api/snmp_contacts/:contactId
or /api/snmp_contacts/:contactName |
Method |
|
URL Params |
/api/snmp_contacts/:contactId
or /api/snmp_contacts/:contactName Note: No HTTP header required to update by id http header "by: name" required to
update by name |
Data Params |
{
"last_test_trap_status": "<enum test
status>", // for v1/v2c only: // for v3 only: |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Test SNMP Contact |
URL |
/api/snmp_contacts/traptest |
Method |
POST |
Data Params |
{ "type":"snmp_contacts_traptest", "id": "<contact
id>"
"<snmp contact>" } } see notes below for details on contact attribute |
Success Response |
Code: 201 { "message": "<string>",
"timestamp": "<number>" |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Test
SNMP Contact |
URL |
/api/snmp_contacts/settest |
Method |
|
Data Params |
{ "type":"snmp_contacts",
"id": "<contact id>"
"oid": "<oid string>",
"oid_data_type": <one of: "
"oid_value":
"<string>" see notes below for details on contact attribute |
Success Response |
Code: 201 {
"message": "<string>", "timestamp": "<number>" |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
·
In Data Params, id field in data
is required for an existing snmp contact only. id field is in the response
only for an existing snmp contact as well ·
Also in Data Params, the <snmp
contact> field is as it is defined in the 'Update one SNMP Contact'
section above as shown in "data": { · This Trap Port Test section is relevant for SNMP v1, v2,
and v3 |
The
AutoProbes API enables management of AutoProbes, which automatically execute a
prescribed action when the device loses network communication with specified
target device. This API is used for creating,
editing and deleting AutoProbes. It uses the following enums:
probe_type:
AUTOPROBE_TYPE_NTP
AUTOPROBE_TYPE_PING
AUTOPROBE_TYPE_SNMP
probe_status:
AUTOPROBE_STATUS_UNSPECIFIED
AUTOPROBE_STATUS_UNKNOWN
AUTOPROBE_STATUS_OK
AUTOPROBE_STATUS_FAILED
AUTOPROBE_STATUS_FAILED_INIT
snmp_version:
SNMP_PROTOCOL_V1
SNMP_PROTOCOL_V2
SNMP_PROTOCOL_V
auth_proto:
SNMPV3_AUTH_PROTO_MD5
SNMPV3_AUTH_PROTO_SHA
priv_proto:
SNMPV3_PRIV_PROTO_DES
SNMPV3_PRIV_PROTO_AES
privacy_mode:
SNMPV3_AUTH_NO_AUTH_NO_PRIV
SNMPV3_AUTH_AUTH_NOPRIV
SNMPV3_AUTH_AUTH_PRIV
Title |
GET
All AutoProbe Settings |
URL |
/api/autoprobe |
Method |
GET |
URL Params |
additive filters supported by
status, probe_type, probe_status GET all AutoProbe Entries by probe_type /api/autoprobe?filter[probe_type]=AUTOPROBE_TYPE_SNMP GET all AutoProbe Entries by status /api/autoprobe?filter[status]=true GET all AutoProbe Entries by probe_status /api/autoprobe?filter[probe_status]=AUTOPROBE_STATUS_FAILED_INIT GET all AutoProbe Entries by status, probe_type, probe_status /api/autoprobe?filter[status]=true&filter[probe_type] =AUTOPROBE_TYPE_SNMP&filter[probe_status]=AUTOPROBE_STATUS_FAILED_INIT |
Success Response |
Code: 200
Content: {
"meta": {
"id": "c5e3d122-f41b-4caf-b520-56316ae4c199",
"constraints": {}
"validation": [],
"count": 64,
"path": "/api/autoprobe" },
"data": [{
"type": "autoprobe", "id":
"3",
"attributes": {
"name": "<string>",
"status": <boolean>,
"description": "<string?",
"probe_type": "<Enum>",
"retries": <int>
"interval": <int>
"primary_address":
"<String>",
"primary_port": <int>,
"secondary_address":
"<string>",
"secondary_port": <int>,
"probe_status": "<Enum>",
"snmp_security": {
"snmp_version":
"<Enum>",
"community":
"<String>",
"user_name":
"<String>",
"privacy_mode":
"<Enum>",
"auth_proto":
"<Enum>",
"authentication_pass_phrase": "<String>",
"priv_proto":
"<Enum>",
"privacy_pass_phrase":
"<String>",
"primary_oid":
"<String>",
"secondary_oid":
"<String>"
}
}
}} } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET One AutoProbe Setting |
URL |
/api/autoprobe/:id OR /api/autoprobe/:name Note: NO
HTTP header required to get autoprobe by ID |
Method |
GET |
URL Params |
/api/autoprobe/:id OR /api/autoprobe/:name Note: No HTTP header required to get by id http header "by: name" required to
update by name Required: id=[integer] name=[string] example:
'autoprobe1' |
Success Response |
Code: 200 Content: {
"meta": {
"id": "c5e3d122-f41b-4caf-b520-56316ae4c199",
"constraints": {}
"validation": [],
"count": 64,
"path": "/api/autoprobe" },
"data": {
"type": "autoprobe",
"id": "3",
"attributes": {
"name": "<string>",
"status": <boolean>,
"description": "<string?",
"probe_type": "<Enum>",
"retries": <int>
"interval": <int>
"primary_address":
"<String>",
"primary_port": <int>,
"secondary_address":
"<string>",
"secondary_port": <int>,
"probe_status": "<Enum>",
"snmp_security": {
"snmp_version":
"<Enum>",
"community":
"<String>",
"user_name":
"<String>",
"privacy_mode":
"<Enum>",
"auth_proto":
"<Enum>",
"authentication_pass_phrase": "<String>",
"priv_proto":
"<Enum>",
"privacy_pass_phrase":
"<String>",
"primary_oid":
"<String>",
"secondary_oid":
"<String>"
}
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET
All AutoProbe Status |
URL |
/api/autoprobe_status |
Method |
GET |
Success Response |
Code: 200 Content: {
"meta": {
"id": "7de6d2f4-f8f5-4165-bbdb-54d659b29793",
"path": "/api/autoprobe_status" },
"data": [{
"type": "autoprobe",
"id": "1",
"attributes": {
"name":
"watchdog_ping",
"probe_status":
"AUTOPROBE_STATUS_UNKNOWN"
}
},
{
"type": "autoprobe",
"id": "2",
"attributes": {
"name":
"watchdog_ntp",
"probe_status":
"AUTOPROBE_STATUS_UNKNOWN"
}
},
{
"type": "autoprobe",
"id": "3",
"attributes": {
"name":
"autoprobe_name1",
"probe_status":
"AUTOPROBE_STATUS_FAILED_INIT"
}
},
{
"type": "autoprobe",
"id": "4",
"attributes": {
"name":
"autoprobe_name2",
"probe_status":
"AUTOPROBE_STATUS_FAILED_INIT"
}
} ] } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET One AutoProbe Status |
URL |
/api/autoprobe_status/:id OR /api/autoprobe_status/:name Note: NO
HTTP header required to get autoprobe status by ID |
Method |
GET |
URL Params |
/api/autoprobe_status/:id OR /api/autoprobe_status/:name Note: No HTTP header required to get by id http header "by: name" required to
update by name Required: id=[integer] name=[string] example:
'autoprobe1' |
Success Response |
Code: 200 Content: {
"meta": {
"id": "51b85c59-64ac-4d73-9e9b-7083a9f0b9b0",
"path": "/api/autoprobe_status/watchdog_ping" },
"data": {
"type": "autoprobe",
"id": "1",
"attributes": {
"name": "watchdog_ping",
"probe_status":
"AUTOPROBE_STATUS_UNKNOWN"
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create AutoProbe Settings |
URL |
/api/autoprobe |
Method |
POST |
Data Params |
{
"data": {
"type": "autoprobe",
"attributes": { //----
For Ping/NTP/Snmpv1/2/3
"name":
"autoprobe_name099",
"status": true,
"description":
"autoprobe_description",
"probe_type":
"AUTOPROBE_TYPE_SNMP",
"retries": 3,
"interval": 10,
"primary_address":
"10.10.10.10",
"secondary_address":
"20.20.20.20", //----
Only for /NTP/Snmpv1/2/3 "primary_port": 2020,
"secondary_port": 4040, //----
Only for Snmpv1/2/3
"snmp_security": {
"snmp_version": "SNMP_PROTOCOL_V3",
"community": "autoprobe_community",
"user_name": "autoprobe_user_name",
"privacy_mode": "SNMPV3_AUTH_AUTH_PRIV",
"auth_proto" : "SNMPV3_AUTH_PROTO_MD5",
"authentication_pass_phrase":
"autoprobe_auth_pass_phrase",
"priv_proto": "SNMPV3_PRIV_PROTO_AES",
"privacy_pass_phrase": "autoprobe_pass_phrase",
"primary_oid": "autoprobe_primary_oid",
"secondary_oid": "autoprobe_secondary_oid"
}
} } } |
Success Response |
Code: 200 {
"meta": {
"id": "ea66350c-d95e-45c4-92fb-d8381e9eeb8c",
"path": "/api/autoprobe" },
"data": {
"type": "autoprobe",
"id": "6",
"attributes": {
"response": 0
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update AutoProbe Settings |
URL |
/api/autoprobe/:id OR /api/autoprobe/:name |
Method |
PATCH |
URL Params |
/api/autoprobe/:id OR /api/autoprobe/:name Note: No HTTP header required to update by id http header "By: name" required to
update by name Required: id=[integer] name=[String]
- example name=autoprobe1 |
Data Params |
{
"data": {
"type": "autoprobe",
"attributes": { //----
For Ping/NTP/Snmpv1/2/3
"name":
"autoprobe_name3",
"status": true,
"description":
"autoprobe_description",
"probe_type":
"AUTOPROBE_TYPE_SNMP",
"retries": 3,
"interval": 10,
"primary_address":
"10.10.10.10",
"secondary_address":
"20.20.20.20", //----
Only for NTP/Snmpv1/2/3
"primary_port": 2020,
"secondary_port": 4040, //----
Only for Snmpv1/2/3
"snmp_security": {
"snmp_version": "SNMP_PROTOCOL_V3",
"community": "autoprobe_community",
"user_name": "autoprobe_user_name",
"privacy_mode": "SNMPV3_AUTH_AUTH_PRIV",
"auth_proto":
"SNMPV3_AUTH_PROTO_MD5",
"authentication_pass_phrase":
"autoprobe_auth_pass_phrase",
"priv_proto": "SNMPV3_PRIV_PROTO_AES",
"privacy_pass_phrase": "autoprobe_pass_phrase",
"primary_oid":
"autoprobe_primary_oid",
"secondary_oid": "autoprobe_secondary_oid"
}
} } } |
Success Response |
Code: 200 { "meta":{ "id":"<request id>" }, "data":{ "type":"autoprobe", "id":"<string, id>", "attributes":{ "response":0 } }
} |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete AutoProbe Settings |
URL |
/api/autoprobe/:id OR /api/autoprobe/:name |
Method |
DELETE |
URL Params |
/api/autoprobe/:id OR /api/autoprobe/:name Note: No HTTP header required to delete by id http header "By: name" required to
delete by name Required: id=[integer] example: id=12 OR name=[String] example:
name=autoprobe1 |
Success Response |
Code: 200 {
"meta":{ |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Device Control API enables control of the device in the form of Turn On, Turn Off
and Reboot. This applies only to devices that supports these functions.
Title |
Turn
On Device
|
URL |
|
Method |
|
Data Params |
{ "data": {
"type": "controls_turnon_device",
"attributes": {
"device_id": "< int device ID >", // OR
"device_name": "<sting name of device>
"turn_on_delay": "< int time in sec >" } } } |
Success Response |
Code: 201 { "meta": {
"id": "bbf554c7-38e6-42c5-81f5-3256388dbc67" }, "data": {
"type": "controls_turnon_device",
"id": 0,
"attributes": {
"response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Turn
Off Device
|
URL |
|
Method |
|
Data Params |
{ "data": {
"type": "controls_turnoff_device",
"attributes": {
"device_id": "< int device ID >", // OR
"device_name": "<sting name of device>
"turn_off_delay": "< int time in sec >" } } } |
Success Response |
Code: 200 { "meta": {
"id": "bbf554c7-38e6-42c5-81f5-3256388dbc67" }, "data": {
"type": "controls_turnoff_device",
"id": 0,
"attributes": {
"response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Reboot
Device
|
URL |
|
Method |
|
Data Params |
{ "data": {
"type": "controls_reboot_device",
"attributes": {
"device_id": "< int device ID >", // OR
"device_name": "<sting name of device>
"turn_off_delay": "< int time in sec >",
"turn_on_delay": "< int time in
sec >" } } } |
Success Response |
Code: 200 { "meta": {
"id": "bbf554c7-38e6-42c5-81f5-3256388dbc67" }, "data": {
"type": "controls_turnoff_device",
"id": 0,
"attributes": {
"response": 0 } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Device Properties API displays properties of the device and all connected
peripherals, as well as allowing updates of device attributes. It uses the
following enums:
device_state:
DEVICE_STATE_NORMAL
DEVICE_STATE_CRITICAL
DEVICE_STATE_WARNING
DEVICE_STATE_INFORMATION
DEVICE_STATE_STATUS
DEVICE_STATE_OFFLINE
device_type:
DEVICE_TYPE_UNKNOWN
DEVICE_TYPE_UPS
DEVICE_TYPE_PDU
DEVICE_TYPE_ENVIROSENSE
DEVICE_TYPE_AC
DEVICE_TYPE_KVM
DEVICE_TYPE_ASSETTRACKER
DEVICE_TYPE_ATS
DEVICE_TYPE_SWITCH
port_mode:
DEVICE_COMM_UNKNOWN
DEVICE_COMM_RS232
DEVICE_COMM_HID
DEVICE_COMM_USB
DEVICE_COMM_SIMULATED
init_state:
DEVICE_INIT_STATE_INACTIVE
DEVICE_INIT_STATE_INITIALIZING
DEVICE_INIT_STATE_INITIALIZED
device_battery_synchronization_state:
DEVICE_BATTERY_SYNCHRONIZATION_STATE_NONE
DEVICE_BATTERY_SYNCHRONIZATION_STATE_READING
DEVICE_BATTERY_SYNCHRONIZATION_STATE_WRITING
DEVICE_BATTERY_SYNCHRONIZATION_STATE_VERIFYING
Title |
GET
All Devices |
URL |
|
Method |
|
Success Response |
Code: 200 { { { "init_state": "<ENUM - DeviceInitializeState>", "configured_device_id": <init>, "configured_asset_tag": "<string>", "led_ready": <boolean>, "load_receptacle_supported": <boolean>, "configured_device_id_minimum": <int>, "configured_device_id_maximum": <int>, "device_battery_synchronization_state": <ENUM - DeviceBatterySynchronizationState>, "ramp_shed_config_in_progress": <boolean> "init_state": "<ENUM - DeviceInitializeState>", "configured_device_id": <init>, "configured_asset_tag": "<string>", "led_ready": <boolean>, "load_receptacle_supported": <boolean>, "configured_device_id_minimum": <int>, "configured_device_id_maximum": <int>, "device_battery_synchronization_state": <ENUM - DeviceBatterySynchronizationState>, "device_factory_reset_supported" : <boolean>, "ramp_shed_config_in_progress": <boolean>
|
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/devices |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
This
API gets basic information about the device and all connected peripherals. It returns only device id, name,
type and state.
Title |
GET
Basic Device Information |
URL |
|
Method |
GET |
Data Params |
{ "data": {
"type": "controls_turnoff_device",
"attributes": {
"device_id": "< int device ID >", // OR
"device_name": "<sting name of device>
"turn_off_delay": "< int time in sec >" } } } |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET Basic Device
Information by ID/Name
|
URL |
/api/devices/:deviceName |
Method |
|
URL Params |
/api/devices/:deviceName Note: No HTTP header required to update by id http header "by: name" required to
update by name |
Success Response |
Code: 200 { "init_state": "<ENUM - DeviceInitializeState>", "configured_device_id": <init>, "configured_asset_tag": "<string>", "led_ready": <boolean>, "load_receptacle_supported": <boolean>, "configured_device_id_minimum": <int>, "configured_device_id_maximum": <int>, "device_battery_synchronization_state": <ENUM - DeviceBatterySynchronizationState>, "device_factory_reset_supported" : <boolean>
|
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Device Properties
|
URL |
|
Method |
|
URL Params |
/api/devices/:deviceName Note: No HTTP header required to update by id http header "by: name" required to
update by name |
Data Params |
Code: 200 Content: { "data":{ "importance":<uint32>, |
Success Response |
Code: 201 { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/devices/123 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete
Inactive Device |
URL |
OR
|
Method |
DELETE |
URL Params |
/api/devices/:deviceName Note: No HTTP header required to update by id http header "by: name" required to
update by name |
Success Response |
CODE 200 |
Sample Call |
curl –i -H "Accept: application/vnd.api+json" http://localhost:3001/api/devices/123 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Device Metrics API enables retrieval of device metrics, including those of any
connected peripherals. It uses the following enums:
data_type:
VARTYPE_NONE
VARTYPE_INTEGER
VARTYPE_FLOAT
VARTYPE_STRING
VARTYPE_DATE
VARTYPE_ENUMSTRING
VARTYPE_BYTE
VARTYPE_ENUMINTEGER
group:
VARGROUP_ALL
VARGROUP_NONE
VARGROUP_SYSTEM
VARGROUP_DEVICE
VARGROUP_CONTACT
VARGROUP_WATCHDOG
VARGROUP_LOAD
VARGROUP_BATTERY
VARGROUP_INPUT
VARGROUP_OUTPUT
VARGROUP_BYPASS
VARGROUP_ENVIRONMENT
purpose:
VARPURPOSE_NONE
VARPURPOSE_STATUS
VARPURPOSE_PERSONAL
VARPURPOSE_EQUIPMENT
VARPURPOSE_THRESHOLD
VARPURPOSE_BEHAVIOR
supports:
VARSUPPORTS_READONLY
VARSUPPORTS_UPDATE
VARSUPPORTS_CONTROLEXECUTION
state:
DEVICE_STATE_CRITICAL
DEVICE_STATE_INFORMATION
DEVICE_STATE_NORMAL
DEVICE_STATE_WARNING
This
API enables retrieval of all device variables and those of connected
peripherals.
Title |
GET All Variables |
URL |
/api/variables |
Method |
|
URL Params |
Additive filters supported by
device_id, device_name, group, purpose, parents, keywords GET all variable by device_Id /api/variables?filter[device_id]=1 GET all variables by device_name /api/variables?filter[device_name]=Device0001 GET all variables by purpose /api/variables?filter[purpose]=VARPURPOSE_EQUIPMENT GET all variables by group /api/variables?filter[purpose]=VARGROUP_DEVICE GET all variables by deviceId or deviceName and group /api/variables?filter[device_id]=1& filter[purpose]=VARGROUP_DEVICE /api/variables?filter[device_name]=Device0001& filter[purpose]=VARGROUP_DEVICE GET all variables by deviceId or deviceName and purpose /api/variables?filter[device_id]=1&filter[purpose]=VARGROUP_DEVICE /api/variables?filter[device_name]=Device0001&filter[purpose]=VARGROUP_DEVICE GET all variables by keywords /api/variables?filter[device_id]=1?filter[keywords]=keyword1&filter[keywords]=keyword2&filter[keywords]=keyword3 GET all variables by parent id without descendants - for variable id
140 /api/variables?filter[device_id]=1?filter[parent_id]=140 GET all variables by parent with descendants - for variable id 140 /api/variables?filter[device_id]=1?filter[parent_id]=140&filter[all_descendants]=true GET all variables that has control_key value /api/variables?filter[has_control_key]=true GET all variables that has nondisplay text /api/variables?filter[include_nondisplay_text]=true device_id : <integer> device_name: <string> purpose: enum<purpose> -
purpose allowed values are given above group: enum <purpose> -
group allowed values are given about |
Success Response |
Code: 200 Content: {
"meta": {
"id": "<request id>",
"constraints": {},
"validation": [
{
"attribute": "key",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "device_id",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "device_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "device_type",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"DEVICE_TYPE_UNKNOWN",
"DEVICE_TYPE_UPS",
"DEVICE_TYPE_PDU",
"DEVICE_TYPE_ENVIROSENSE",
"DEVICE_TYPE_AC",
"DEVICE_TYPE_KVM",
"DEVICE_TYPE_ASSETTRACKER",
"DEVICE_TYPE_ATS",
"DEVICE_TYPE_SWITCH"
],
"type": "enum"
},
{
"attribute": "label",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "display_label",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "value",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "raw_value",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "min_value",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "float"
},
{
"attribute": "max_value",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "float"
},
{
"attribute": "suffix",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "group",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"VARGROUP_ALL",
"VARGROUP_NONE",
"VARGROUP_SYSTEM",
"VARGROUP_DEVICE",
"VARGROUP_CONTACT",
"VARGROUP_WATCHDOG",
"VARGROUP_LOAD",
"VARGROUP_BATTERY",
"VARGROUP_INPUT",
"VARGROUP_OUTPUT",
"VARGROUP_BYPASS",
"VARGROUP_ENVIRONMENT",
"VARGROUP_COOLING"
],
"type": "enum"
},
{
"attribute": "purpose",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"VARPURPOSE_NONE",
"VARPURPOSE_STATUS",
"VARPURPOSE_PERSONAL",
"VARPURPOSE_EQUIPMENT",
"VARPURPOSE_THRESHOLD",
"VARPURPOSE_BEHAVIOR"
],
"type": "enum"
},
{
"attribute": "data_type",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"VARTYPE_NONE",
"VARTYPE_INTEGER",
"VARTYPE_FLOAT",
"VARTYPE_STRING",
"VARTYPE_DATE",
"VARTYPE_ENUMSTRING",
"VARTYPE_BYTE",
"VARTYPE_ENUMINTEGER"
],
"type": "enum"
},
{
"attribute": "state",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"DEVICE_STATE_CRITICAL",
"DEVICE_STATE_INFORMATION",
"DEVICE_STATE_NORMAL",
"DEVICE_STATE_WARNING"
],
"type": "enum"
},
{
"attribute": "line_num",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "supports",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"VARSUPPORTS_READONLY",
"VARSUPPORTS_UPDATE",
"VARSUPPORTS_CONTROLEXECUTION"
],
"type": "enum"
},
{
"attribute": "editable",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "advanced_editable",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "control_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "control_key",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "expandable",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "parent_id",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "enum_values",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "object"
},
{
"attribute": "keywords",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
}
],
"path": "/api/variables/140" },
"data":[ {
"type": "variables",
"id": "<String Id>",
"attributes": {
"key": <unit32>,
"device_id": <unit32>,
"device_name": <string>,
"device_type": "<Enum Device Type",
"label": "<strings>",
"value": "<string>",
"min_value": <float>,
"max_value": <float>,
"suffix": "<string>",
"group": "<Enum Group>",
"purpose": "<Enum Purpose>",
"data_type": "<Enum Device Type>",
"state": "<Enum state>",
"display_label": "<string>",
"raw_value": "<string>",
"supports": "<Enum Support>",
"control_name": "<string>",
"control_key": "<unit32>",
"expandable": "<boolean>",
"parent_id": <"unit32>",
"advanced_editable": <"boolean>,
"line_num": "<float>",
"editable": <Boolean>,
"enum_values": <Enum Array []>,
"keywords": "< Array of strings>",
"cli_keywords": [],
} }] } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET One Variable |
URL |
/api/variables/:variableId OR /api/variables/:variableName OR /api/variables/:variableKey Note: NO
HTTP header required to get variables by ID |
Method |
|
URL Params |
/api/variables/:variableId
(Id) – Default OR /api/variables/:variableName
OR /api/variables/:variableKey Note: NO
HTTP header required to get variables by ID For
variableName the following HTTP Header is Required: By:
'name' deviceId : 'device_id' Where device_id is id for device Example if Id of device is 1 then
deviceId :'1' For
variableKey the following HTTP Header is Required: By:
'key' deviceId : 'device_id' Where device_id is id for device Example if Id of device is 1 then
deviceId :'1' Required: variableId=[integer] variableName=[string]
deviceId=[integer] example:
variableName=variablename2 |
Success Response |
Code: 200 Content: {
"meta": {
"id": "<request id>",
"constraints": {},
"validation": [
{
"attribute": "key",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "device_id",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "device_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "device_type",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"DEVICE_TYPE_UNKNOWN",
"DEVICE_TYPE_UPS",
"DEVICE_TYPE_PDU",
"DEVICE_TYPE_ENVIROSENSE",
"DEVICE_TYPE_AC",
"DEVICE_TYPE_KVM",
"DEVICE_TYPE_ASSETTRACKER",
"DEVICE_TYPE_ATS",
"DEVICE_TYPE_SWITCH"
],
"type": "enum"
},
{
"attribute": "label",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "display_label",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "value",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "raw_value",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "min_value",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "float"
},
{
"attribute": "max_value",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "float"
},
{
"attribute": "suffix",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "group",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"VARGROUP_ALL",
"VARGROUP_NONE",
"VARGROUP_SYSTEM",
"VARGROUP_DEVICE",
"VARGROUP_CONTACT",
"VARGROUP_WATCHDOG",
"VARGROUP_LOAD",
"VARGROUP_BATTERY",
"VARGROUP_INPUT",
"VARGROUP_OUTPUT",
"VARGROUP_BYPASS",
"VARGROUP_ENVIRONMENT",
"VARGROUP_COOLING"
],
"type": "enum"
},
{
"attribute": "purpose",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"VARPURPOSE_NONE",
"VARPURPOSE_STATUS",
"VARPURPOSE_PERSONAL",
"VARPURPOSE_EQUIPMENT",
"VARPURPOSE_THRESHOLD",
"VARPURPOSE_BEHAVIOR"
],
"type": "enum"
},
{
"attribute": "data_type",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"VARTYPE_NONE",
"VARTYPE_INTEGER",
"VARTYPE_FLOAT",
"VARTYPE_STRING",
"VARTYPE_DATE",
"VARTYPE_ENUMSTRING",
"VARTYPE_BYTE",
"VARTYPE_ENUMINTEGER"
],
"type": "enum"
},
{
"attribute": "state",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"DEVICE_STATE_CRITICAL",
"DEVICE_STATE_INFORMATION",
"DEVICE_STATE_NORMAL",
"DEVICE_STATE_WARNING"
],
"type": "enum"
},
{
"attribute": "line_num",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "supports",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"VARSUPPORTS_READONLY",
"VARSUPPORTS_UPDATE",
"VARSUPPORTS_CONTROLEXECUTION"
],
"type": "enum"
},
{
"attribute": "editable",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "advanced_editable",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "control_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "control_key",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "expandable",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "parent_id",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "enum_values",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "object"
},
{
"attribute": "keywords",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
}
],
"path": "/api/variables/140" },
"data":[ {
"type": "variables",
"id": "<String Id>",
"attributes": {
"key": <unit32>,
"device_id": <unit32>,
"device_name": <string>,
"device_type": "<Enum Device Type",
"label": "<strings>",
"value": "<string>",
"min_value": <float>,
"max_value": <float>,
"suffix": "<string>",
"group": "<Enum Group>",
"purpose": "<Enum Purpose>",
"data_type": "<Enum Device Type>",
"state": "<Enum state>",
"display_label": "<string>",
"raw_value": "<string>",
"supports": "<Enum Support>",
"control_name": "<string>",
"control_key": "<unit32>",
"expandable": "<boolean>",
"parent_id": <"unit32>",
"advanced_editable": <"boolean>,
"line_num": "<float>",
"editable": <Boolean>,
"enum_values": <Enum Array []>,
"keywords": "< Array of strings>",
"cli_keywords": [<Array of Strings>], "numeric": <Boolean>,
} }] } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Variable |
URL |
/api/variables/:variableId
|
Method |
PATCH |
URL Params |
Required: variableId=[integer] |
Data Params |
{ |
Success Response |
Code: 200 Content: {
"meta": {
"id": "<String request ID>",
"path": "/api/variables/<identifier>" },
"data": {
"type": "variables",
"id": "<String variable identifier>",
"attributes": {
"response": 0
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
For enum fields, appropriate enum
value needs to be provided · User can update new_value or tolerance or both in single
request |
Title |
Update Variable |
URL |
/api/variables/:variableName |
Method |
PATCH |
URL Params |
Required
HTTP Header: "By" : 'name' Required: variableName=[string] |
Data Params |
{ "tolerance": <float>, "device_name":<string> } |
Success Response |
Code: 200 Content: {
"meta": {
"id": "<String request ID>",
"path": "/api/variables/<identifier>" },
"data": {
"type": "variables",
"id": "<String variable identifier>",
"attributes": {
"response": 0
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
For enum fields, appropriate enum
value needs to be provided Make sure to provide device_name or device_id in the
PATCH payload to update variable · User can update new_value or tolerance or both in single
request |
The
Events API displays the status and configuration all events applicable to the device
and connected peripherals. It also enables configuration of Auto-Acknowledgement
and Logging for all events. It uses the following enums:
event_source_type:
EVENT_SOURCE_TYPE_DEVICE
EVENT_SOURCE_TYPE_AUTOPROBE
EVENT_SOURCE_TYPE_SYSTEM
event_type:
EVENT_TYPE_STATEFUL
EVENT_TYPE_STATELESS_SETTING
EVENT_TYPE_STATELESS_CLEARING
EVENT_TYPE_STATELESS
severity:
EVENT_SEVERITY_EMERGENCY
EVENT_SEVERITY_ALERT
EVENT_SEVERITY_CRITICAL
EVENT_SEVERITY_ERROR
EVENT_SEVERITY_WARNING
EVENT_SEVERITY_NOTICE
EVENT_SEVERITY_INFORMATIONAL
EVENT_SEVERITY_DEBUG
event_source_type:
EVENT_SOURCE_TYPE_DEVICE
EVENT_SOURCE_TYPE_AUTOPROBE
EVENT_SOURCE_TYPE_SYSTEM
Title |
GET All Events |
URL |
/api/events |
Method |
GET |
Filters |
additive filters supported for
attributes -source_id, severity,device_name, event_source_type, category, enabled GET all Events by source_id /api/events?filter[source_id]=1 GET all Events by source_name /api/events?filter[source_name]=1Device0001 GET all Events by Severity /api/events?filter[severity]=EVENT_SEVERITY_INFORMATIONAL GET all events by source_type /api/events?filter[event_source_type]=EVENT_SOURCE_TYPE_DEVICE GET all events by category /api/events?filter[category]=EVENT_CATEGORY_VALUE GET all events by enabled=true /api/event?filter[enabled]=true GET all events by set_label /api/event?filter[set_label]=Loads Not All On GET all events by clear_label /api/event?filter[clear_label]=All Loads On Additive filters example: /api/events?filter[source_id]=1&filter[severity]=EVENT_SEVERITY_INFORMATIONAL &filter[event_source |
URL Params |
source_id: <integer> source_name: <string> severity: <enum event severity> event_type: <enum event type> event_source_type:
<enum event source type> category: <enum event category> enabled: <boolean> set_label: <String> clear_label: <String> |
Success Response |
Code: 200 Content: {
"meta": {
"id":"<request id>",
"constraints": {},
"validation": [
{
"attribute": "event_key",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "set_label",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "clear_label",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "source_id",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "source_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "event_source_type",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_SOURCE_TYPE_DEVICE",
"EVENT_SOURCE_TYPE_AUTOPROBE",
"EVENT_SOURCE_TYPE_SYSTEM"
],
"type": "enum"
},
{
"attribute": "event_category",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_CATEGORY_PROBE",
"EVENT_CATEGORY_SETTINGS",
"EVENT_CATEGORY_CONTROL",
"EVENT_CATEGORY_EVENT",
"EVENT_CATEGORY_LOAD",
"EVENT_CATEGORY_LOAD_GROUP",
"EVENT_CATEGORY_MAIN_LOAD",
"EVENT_CATEGORY_MISCELLANEOUS",
"EVENT_CATEGORY_THRESHOLD",
"EVENT_CATEGORY_VALUE",
"EVENT_CATEGORY_DIAGNOSTICS",
"EVENT_CATEGORY_ENERGY_WISE",
"EVENT_CATEGORY_MAINTENANCE",
"EVENT_CATEGORY_USER_MANAGEMENT"
],
"type": "enum"
},
{
"attribute": "event_type",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_TYPE_STATEFUL",
"EVENT_TYPE_STATELESS_SETTING",
"EVENT_TYPE_STATELESS_CLEARING",
"EVENT_TYPE_STATELESS"
],
"type": "enum"
},
{
"attribute": "oid_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "enabled",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "auto_acknowledge",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "logging",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "syslog_msg_id",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "severity",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_SEVERITY_EMERGENCY",
"EVENT_SEVERITY_ALERT",
"EVENT_SEVERITY_CRITICAL",
"EVENT_SEVERITY_ERROR",
"EVENT_SEVERITY_WARNING",
"EVENT_SEVERITY_NOTICE",
"EVENT_SEVERITY_INFORMATIONAL",
"EVENT_SEVERITY_DEBUG"
],
"type": "enum"
},
{
"attribute": "hysteresis",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "float"
},
{
"attribute": "localize_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "can_edit_rule",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "can_delete",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
}
],
"path": "/api/events" },
"data": [
{
"type": "events",
"id": "1",
"attributes": {
"event_key":<unit32>,
"set_label": "<String>",
"clear_label": "<String>",
"source_id": <unit32>,
"source_name": <String>,
"event_source_type": <enum Event Source Type>,
"event_category": <enum Event Category>,
"event_type": <enum Event Type>,
"oid_name": <String>,
"enabled": <boolean>,
"auto_acknowledge": <boolean>,
"logging": <boolean>,
"syslog_msg_id": <int>,
"severity": "<Enum Severity>",
"hysteresis": <flot>,
"localize_name": boolean,
"can_edit_rule": boolean,
"can_delete": boolean, "action_flags": [ ]
}
} ] } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/events |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET One Event |
URL |
/api/events/:eventId OR /api/events/:eventName OR /api/events/:eventKey |
Method |
|
URL Params |
/api/events/:eventId OR /api/events/:eventName OR /api/events/:eventKey Note: No HTTP header required to get by id If URL uses :eventName, then Required
HTTP Header: By: 'name' sourceType: <Source Type
Enum> - Example sourceType: EVENT_SOURCE_TYPE_DEVICE sourceName: 'source
Name' - If the source is a device device name should be
provided - Example sourceName:Device0391 if URL uses :eventKey, then Required
HTTP Header: By: 'key' sourceType: <Source Type
Enum> - Example sourceType: EVENT_SOURCE_TYPE_DEVICE sourceName: 'source
Name' - If the source is a device device name should be
provided - Example sourceName:Device0391 |
Success Response |
Code: 200 Content: {
"meta": {
"id":"<request id>",
"constraints": {},
"validation": [
{
"attribute": "event_key",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "set_label",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "clear_label",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "source_id",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "source_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "event_source_type",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_SOURCE_TYPE_DEVICE",
"EVENT_SOURCE_TYPE_AUTOPROBE",
"EVENT_SOURCE_TYPE_SYSTEM"
],
"type": "enum"
},
{
"attribute": "event_category",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_CATEGORY_PROBE",
"EVENT_CATEGORY_SETTINGS",
"EVENT_CATEGORY_CONTROL",
"EVENT_CATEGORY_EVENT",
"EVENT_CATEGORY_LOAD",
"EVENT_CATEGORY_LOAD_GROUP",
"EVENT_CATEGORY_MAIN_LOAD",
"EVENT_CATEGORY_MISCELLANEOUS",
"EVENT_CATEGORY_THRESHOLD",
"EVENT_CATEGORY_VALUE",
"EVENT_CATEGORY_DIAGNOSTICS",
"EVENT_CATEGORY_ENERGY_WISE",
"EVENT_CATEGORY_MAINTENANCE",
"EVENT_CATEGORY_USER_MANAGEMENT"
],
"type": "enum"
},
{
"attribute": "event_type",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_TYPE_STATEFUL",
"EVENT_TYPE_STATELESS_SETTING",
"EVENT_TYPE_STATELESS_CLEARING",
"EVENT_TYPE_STATELESS"
],
"type": "enum"
},
{
"attribute": "oid_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "string"
},
{
"attribute": "enabled",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "auto_acknowledge",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "logging",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "syslog_msg_id",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "severity",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"EVENT_SEVERITY_EMERGENCY",
"EVENT_SEVERITY_ALERT",
"EVENT_SEVERITY_CRITICAL",
"EVENT_SEVERITY_ERROR",
"EVENT_SEVERITY_WARNING",
"EVENT_SEVERITY_NOTICE",
"EVENT_SEVERITY_INFORMATIONAL",
"EVENT_SEVERITY_DEBUG"
],
"type": "enum"
},
{
"attribute": "hysteresis",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "float"
},
{
"attribute": "localize_name",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "can_edit_rule",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
},
{
"attribute": "can_delete",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
}
],
"path": "/api/events" },
"data": {
"type": "events",
"id": "1",
"attributes": {
"event_key":<unit32>,
"set_label": "<String>",
"clear_label": "<String>",
"source_id": <unit32>,
"source_name": <String>,
"event_source_type": <enum Event Source Type>,
"event_category": <enum Event Category>,
"event_type": <enum Event Type>,
"oid_name": <String>,
"enabled": <boolean>,
"auto_acknowledge": <boolean>,
"logging": <boolean>,
"syslog_msg_id": <int>,
"severity": "<Enum Severity>",
"hysteresis": <flot>,
"localize_name": boolean,
"can_edit_rule": boolean,
"can_delete": boolean, "action_flags": [ ] } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Event |
URL |
/api/events/:eventId OR /api/events/:eventName OR /api/events/:eventKey |
Method |
|
URL Params |
/api/events/:eventId OR /api/events/:eventName OR /api/events/:eventKey Note: No HTTP header required to get by id If URL uses :eventName, then Required
HTTP Header: By: 'name' Required
HTTP Header: if URL uses :eventKey, then Required: By:
'key' |
Data Params |
{"data": {
"type": "events",
"attributes": {
"source_id": <integer> /*(either source_id or source_name required
for key or name request)*/
"source_name": <String>, /*(either source_id or source_name required
for key or name request)*/
"source_type": <Enum: SourceType>, /*(This is required if the
request is by key or name)*/
"enabled": <boolean>,
"auto_acknowledge": <boolean>,
"logging": <boolean>,
"severity": <enum Event Severity>,
"hysteresis": <flot>
"syslog_msg_id": <int>, "action_selection": [ "add_action_selection": [ "remove_action_identity": [ { "id":<string>, "name": <string> } ]
} } } NOTE: If the request is by name or key, source_id or source_name and
source_type must be provided in the request body. |
Success Response |
Code: 200 Content: {
"meta": {
"id": "<request id>",
"path": "/api/events/<id>" },
"data": {
"type": "events",
"id": "16",
"attributes": {
"response": 0
} } } |
Sample Call |
http://127.0.0.1:3001/api/events/16 Request Body: {"data": {
"type": "events",
"attributes": {
"enabled": false,
"auto_acknowledge": true,
"logging": true,
"severity": "EVENT_SEVERITY_NOTICE",
"hysteresis": 6.6,
"syslog_msg_id": 25, "action_selection":
[
} } } Sucess Response: {
"meta": {
"id": "bdc88179-2cb8-40b6-b47e-d234fa60c5c5",
"path": "/api/events/16" },
"data": {
"type": "events",
"id": "16",
"attributes": {
"response": 0
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete Event |
URL |
/api/events/:eventId OR /api/events/:eventName OR /api/events/:eventKey |
Method |
|
URL Params |
/api/events/:eventId OR /api/events/:eventName OR /api/events/:eventKey Note: No HTTP header required to get by id If URL uses :eventName, then Required
HTTP Header: By: 'name' sourceType: <Source Type
Enum> - Example sourceType: EVENT_SOURCE_TYPE_DEVICE sourceName: 'source
Name' - If the source is a device device name should be
provided - Example sourceName:Device0391 Required
HTTP Header: if URL uses :eventKey, then Required: By:
'key' sourceType: <Source Type
Enum> - Example sourceType: EVENT_SOURCE_TYPE_DEVICE sourceName: 'source
Name' - If the source is a device device name should be
provided - Example sourceName:Device0391 |
Success Response |
Code: 200 Content: {
"meta": {
"id": "<request id>",
"path": "/api/events/<id>" },
"data": {
"type": "events",
"id": "16",
"attributes": {
"response": 0
} } } |
Sample Call |
http://127.0.0.1:3001/api/events/16 Request Body: Sucess Response: {
"meta": {
"id": "bdc88179-2cb8-40b6-b47e-d234fa60c5c5",
"path": "/api/events/16" },
"data": {
"type": "events",
"id": "16",
"attributes": {
"response": 0
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Help API is used for retrieving Help information.
Title |
GET Help Information |
URL |
/api/help |
Method |
|
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Loads API retrives a summary of the device’s loads, including status and outlet
level metrics, if applicable. It can also be used to change the state of individual
loads or the main loads. It uses the following enums:
state:
LOAD_STATE_UNKNOWN
LOAD_STATE_OFF
LOAD_STATE_MIXED
receptacle_type_supported:
LOAD_RECEPTACLE_UNKNOWN
LOAD_RECEPTACLE_HUBBELL_CS8365C
LOAD_RECEPTACLE_IEC_309_16A
LOAD_RECEPTACLE_IEC_309_3032A
LOAD_RECEPTACLE_IEC_309_6063A
LOAD_RECEPTACLE_IEC_309_30A
LOAD_RECEPTACLE_IEC_309_60A
LOAD_RECEPTACLE_IEC_320_C14
LOAD_RECEPTACLE_IEC_320_C20
LOAD_RECEPTACLE_LOCK_L1520P
LOAD_RECEPTACLE_LOCK_L1530P
LOAD_RECEPTACLE_LOCK_L2120P
LOAD_RECEPTACLE_LOCK_L2130P
LOAD_RECEPTACLE_LOCK_L2230P
LOAD_RECEPTACLE_NEMA_515P
LOAD_RECEPTACLE_NEMA_520P
LOAD_RECEPTACLE_NEMA_530P
LOAD_RECEPTACLE_NEMA_L515P
LOAD_RECEPTACLE_NEMA_L520P
LOAD_RECEPTACLE_NEMA_L530P
LOAD_RECEPTACLE_NEMA_L620P
LOAD_RECEPTACLE_NEMA_L630P
LOAD_RECEPTACLE_NEMA_L1430P
LOAD_RECEPTACLE_NEMA_L1530P
LOAD_RECEPTACLE_NEMA_L2120P
LOAD_RECEPTACLE_OUTLET_NONE
LOAD_RECEPTACLE_OUTLET_NEMA_515R
LOAD_RECEPTACLE_OUTLET_NEMA_520R
LOAD_RECEPTACLE_OUTLET_NEMA_530R
LOAD_RECEPTACLE_OUTLET_IEC_320_C13
LOAD_RECEPTACLE_OUTLET_IEC_320_C19
LOAD_RECEPTACLE_OUTLET_NEMA_L515R
LOAD_RECEPTACLE_OUTLET_NEMA_L520R
LOAD_RECEPTACLE_OUTLET_NEMA_L530R
LOAD_RECEPTACLE_OUTLET_NEMA_L615R
LOAD_RECEPTACLE_OUTLET_NEMA_L620R
LOAD_RECEPTACLE_OUTLET_NEMA_L630R
load_action:
LOAD_ACTION_IDLE
LOAD_ACTION_OFF
LOAD_ACTION_ON
LOAD_ACTION_CYCLE
ramp_action:
LOAD_RAMP_REMAINOFF
LOAD_RAMP_OFFAFTERDELAY
shed_action:
LOAD_SHED_REMAINOFF
LOAD_SHED_OFFAFTERDELAY
This
API allows reading and updating data of individual loads as well as the main
load. This applies only to devices that support these functions.
Title |
GET All Loads |
URL |
|
Method |
|
URL Params |
Filters: Using device_id: · /api/loads?filter=[{"name":
"device_id", "op": "in_", "val":
[1,2,3]} ] Using group · /api/loads?filter=[{"name":
"group", "op": "in_", "val":
["group1","group2"]} ] Using controllable · /api/loads?filter=[{"name":
"controllable", "op": "in_", "val":
[true]} ] Using receptacle_type · /api/loads?filter=[{"name":
"receptacle_type", "op": "in_", "val":
["LOAD_RECEPTACLE_UNKNOWN"]} ] using state: /api/loads?filter=[{"name": "state",
"op": "in_", "val":
["LOAD_STATE_ON"]}]
· /api/loads?filter=[{"name":
"state", "op": "in_", "val":
["LOAD_STATE_OFF"]}, {"name": "device_id",
"op": "in_", "val": [1,2,3]}] |
Success Response |
Code:
200 Content: { "meta": { "id": "<request
id>", "constraints": { "max_items": 0, "min_items": 0, "editable_attributes":
[ "name", "group_id", "group_name", "description" ], "required_attributes":
[ "name" ], "delete_allowed":
false }, "validation": [{ "attribute":
"load_number", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"name", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
1, "max_length":
32, "pattern":
"", "enum": [ ], "type":
"string" }, { "attribute":
"device_id", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"device_name", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"string" }, { "attribute":
"bank", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"circuit", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"group_id", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"group_name", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"string" }, { "attribute":
"state", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ "LOAD_STATE_UNKNOWN", "LOAD_STATE_OFF", "LOAD_STATE_ON", "LOAD_STATE_MIXED" ], "type":
"enum" }, { "attribute":
"description", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
255, "pattern":
"", "enum": [ ], "type":
"string" }, { "attribute":
"phase", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"controllable", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"receptacle_type_supported", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"receptacle_type", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ "LOAD_RECEPTACLE_UNKNOWN", "LOAD_RECEPTACLE_INPUT_HUBBELL_CS8365C", "LOAD_RECEPTACLE_INPUT_IEC_309_16A", "LOAD_RECEPTACLE_INPUT_IEC_309_3032A", "LOAD_RECEPTACLE_INPUT_IEC_309_6063A", "LOAD_RECEPTACLE_INPUT_IEC_309_30A", "LOAD_RECEPTACLE_INPUT_IEC_309_60A", "LOAD_RECEPTACLE_INPUT_IEC_320_C14", "LOAD_RECEPTACLE_INPUT_IEC_320_C20", "LOAD_RECEPTACLE_INPUT_LOCK_L1520P", "LOAD_RECEPTACLE_INPUT_LOCK_L1530P", "LOAD_RECEPTACLE_INPUT_LOCK_L2120P", "LOAD_RECEPTACLE_INPUT_LOCK_L2130P", "LOAD_RECEPTACLE_INPUT_LOCK_L2230P", "LOAD_RECEPTACLE_INPUT_NEMA_515P", "LOAD_RECEPTACLE_INPUT_NEMA_520P", "LOAD_RECEPTACLE_INPUT_NEMA_530P", "LOAD_RECEPTACLE_INPUT_NEMA_L515P", "LOAD_RECEPTACLE_INPUT_NEMA_L520P", "LOAD_RECEPTACLE_INPUT_NEMA_L530P", "LOAD_RECEPTACLE_INPUT_NEMA_L620P", "LOAD_RECEPTACLE_INPUT_NEMA_L630P", "LOAD_RECEPTACLE_INPUT_NEMA_L1430P", "LOAD_RECEPTACLE_INPUT_NEMA_L1530P", "LOAD_RECEPTACLE_INPUT_NEMA_L2120P", "LOAD_RECEPTACLE_OUTLET_NONE", "LOAD_RECEPTACLE_OUTLET_NEMA_515R", "LOAD_RECEPTACLE_OUTLET_NEMA_520R", "LOAD_RECEPTACLE_OUTLET_NEMA_530R", "LOAD_RECEPTACLE_OUTLET_IEC_320_C13", "LOAD_RECEPTACLE_OUTLET_IEC_320_C19", "LOAD_RECEPTACLE_OUTLET_NEMA_L515R", "LOAD_RECEPTACLE_OUTLET_NEMA_L520R", "LOAD_RECEPTACLE_OUTLET_NEMA_L530R", "LOAD_RECEPTACLE_OUTLET_NEMA_L615R", "LOAD_RECEPTACLE_OUTLET_NEMA_L620R", "LOAD_RECEPTACLE_OUTLET_NEMA_L630R" ], "type":
"enum" }, { "attribute": "voltage_supported", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"voltage", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"float" }, { "attribute":
"current_supported", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"current", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"float" }, { "attribute":
"current_precision", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"power_supported", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"power", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" } ] }, "data": [{ "type":
"loads", "id":
"<string>", "attributes": { "load_number":
"<Integer>", "name":
"<Sring>", "device_id":
"<Interger>", "device_name":
"<String>", "circuit": "<Interger>", "group_id":
"<Interger>", "group_name":
"<String>", "state": "<Enum
LoadState Example: LOAD_STATE_ON>", "description":
"<String>", "phase":
"<Integer>", "controllable":
"<Boolean>", "receptacle_type_supported":
"<Boolean>", "receptacle_type":
"<ENUM LoadReceptacle>", "voltage_supported":
"<Boolean>", "voltage":
"<String>", "ramp_action":
"<Enum LoadRampAction>", "ramp_delay":
"<Integer>", "shed_action":
"<Enum LoadShedAction>", "shed_delay": "<Integer>", "current_supported":
"<Boolean>", "current":
"<String>", "power_supported":
"<Boolean>", "power":
"<String>", "device_type":
"DEVICE_TYPE_UPS", "apparent_power_supported":
"<Boolean>", "apparent_power":
"<String>", "reactive_power_supported":
"<Boolean>", "reactive_power":
"<String>", "power_factor_supported":
"<Boolean>", "power_factor":
"<String>", "frequency_supported":
"<Boolean>", "frequency":
"<String>", "utilization_supported":
"<Boolean>", "utilization":
"<String>", "output_24hr_energy_supported":
"<Boolean>", "output_24hr_energy":
"<String>", "peak_power_supported":
"<Boolean>", "peak_power":
"<String>", "overcurrent_alarm_supported":
"<Boolean>", "overcurrent_alarm":
"<String>", "crest_factor_supported":
"<Boolean>", "crest_factor":
"<String>", "current_limit_supported":
"<Boolean>", "current_limit":
"<String>", "power_limit_supported":
"<Boolean>", "power_limit":
"<String>" } }] } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/loads |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET One Load |
URL |
|
Method |
|
URL Params |
OR
OR
If URL uses : HTTP
Header Required: By: 'name' deviceId
: 'device_id' If URL uses : HTTP
Header Required: By: 'number' deviceId
: 'device_id' Where device_id is id for device Example if Id of device is 1 then deviceId :'1' NOTE in both cases, devieId is required |
Success Response |
Code:
200 Content: { "meta": { "id": "<request
id>", "constraints": { "max_items": 0, "min_items": 0, "editable_attributes":
[ "name", "group_id", "group_name", "description" ], "required_attributes":
[ "name" ], "delete_allowed":
false }, "validation": [{ "attribute":
"load_number", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"name", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
1, "max_length":
32, "pattern":
"", "enum": [ ], "type":
"string" }, { "attribute":
"device_id", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"device_name", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"string" }, { "attribute":
"bank", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"circuit", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"group_id", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"group_name", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"string" }, { "attribute":
"state", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ "LOAD_STATE_UNKNOWN", "LOAD_STATE_OFF", "LOAD_STATE_ON", "LOAD_STATE_MIXED" ], "type":
"enum" }, { "attribute":
"description", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
255, "pattern":
"", "enum": [ ], "type":
"string" }, { "attribute":
"phase", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"controllable", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"receptacle_type_supported", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"receptacle_type", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ "LOAD_RECEPTACLE_UNKNOWN", "LOAD_RECEPTACLE_INPUT_HUBBELL_CS8365C", "LOAD_RECEPTACLE_INPUT_IEC_309_16A", "LOAD_RECEPTACLE_INPUT_IEC_309_3032A", "LOAD_RECEPTACLE_INPUT_IEC_309_6063A", "LOAD_RECEPTACLE_INPUT_IEC_309_30A", "LOAD_RECEPTACLE_INPUT_IEC_309_60A", "LOAD_RECEPTACLE_INPUT_IEC_320_C14", "LOAD_RECEPTACLE_INPUT_IEC_320_C20", "LOAD_RECEPTACLE_INPUT_LOCK_L1520P", "LOAD_RECEPTACLE_INPUT_LOCK_L1530P", "LOAD_RECEPTACLE_INPUT_LOCK_L2120P", "LOAD_RECEPTACLE_INPUT_LOCK_L2130P", "LOAD_RECEPTACLE_INPUT_LOCK_L2230P", "LOAD_RECEPTACLE_INPUT_NEMA_515P", "LOAD_RECEPTACLE_INPUT_NEMA_520P", "LOAD_RECEPTACLE_INPUT_NEMA_530P", "LOAD_RECEPTACLE_INPUT_NEMA_L515P", "LOAD_RECEPTACLE_INPUT_NEMA_L520P", "LOAD_RECEPTACLE_INPUT_NEMA_L530P", "LOAD_RECEPTACLE_INPUT_NEMA_L620P", "LOAD_RECEPTACLE_INPUT_NEMA_L630P", "LOAD_RECEPTACLE_INPUT_NEMA_L1430P", "LOAD_RECEPTACLE_INPUT_NEMA_L1530P", "LOAD_RECEPTACLE_INPUT_NEMA_L2120P", "LOAD_RECEPTACLE_OUTLET_NONE", "LOAD_RECEPTACLE_OUTLET_NEMA_515R", "LOAD_RECEPTACLE_OUTLET_NEMA_520R", "LOAD_RECEPTACLE_OUTLET_NEMA_530R", "LOAD_RECEPTACLE_OUTLET_IEC_320_C13", "LOAD_RECEPTACLE_OUTLET_IEC_320_C19", "LOAD_RECEPTACLE_OUTLET_NEMA_L515R", "LOAD_RECEPTACLE_OUTLET_NEMA_L520R", "LOAD_RECEPTACLE_OUTLET_NEMA_L530R", "LOAD_RECEPTACLE_OUTLET_NEMA_L615R", "LOAD_RECEPTACLE_OUTLET_NEMA_L620R", "LOAD_RECEPTACLE_OUTLET_NEMA_L630R" ], "type":
"enum" }, { "attribute":
"voltage_supported", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"voltage", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"float" }, { "attribute":
"current_supported", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"current", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"float" }, { "attribute":
"current_precision", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" }, { "attribute":
"power_supported", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"boolean" }, { "attribute":
"power", "maximum":
0, "minimum":
0, "default":
0, "multiple_of":
0, "min_length":
0, "max_length":
0, "pattern":
"", "enum": [ ], "type":
"integer" } ] }, "data": { "type":
"loads", "id":
"<string>", "attributes": { "load_number":
"<Integer>", "name":
"<Sring>", "device_id":
"<Interger>", "device_name":
"<String>", "circuit":
"<Interger>", "group_id":
"<Interger>", "group_name":
"<String>", "state":
"LOAD_STATE_ON", "description":
"<Enum LoadState>", "phase":
"<Integer>", "controllable":
"<Boolean>", "receptacle_type_supported":
"<Boolean>", "receptacle_type":
"<ENM LoadReceptacle>", "voltage_supported":
"<Boolean>", "voltage":
"<String>", "ramp_action":
"<Enum LoadRampAction>", "ramp_delay":
"<Integer>", "shed_action":
"<Enum LoadShedAction>", "shed_delay":
"<Integer>", "current_supported":
"<Boolean>", "current":
"<String>", "power_supported":
"<Boolean>", "power":
"<String>", "device_type":
"DEVICE_TYPE_UPS", "apparent_power_supported":
"<Boolean>", "apparent_power":
"<String>", "reactive_power_supported":
"<Boolean>", "reactive_power":
"<String>", "power_factor_supported":
"<Boolean>", "power_factor":
"<String>", "frequency_supported":
"<Boolean>", "frequency":
"<String>", "utilization_supported":
"<Boolean>", "utilization":
"<String>", "output_24hr_energy_supported":
"<Boolean>", "output_24hr_energy":
"<String>", "peak_power_supported":
"<Boolean>", "peak_power":
"<String>", "overcurrent_alarm_supported":
"<Boolean>", "overcurrent_alarm":
"<String>", "crest_factor_supported":
"<Boolean>", "crest_factor": "<String>", "current_limit_supported":
"<Boolean>", "current_limit":
"<String>", "power_limit_supported":
"<Boolean>", "power_limit":
"<String>" } } } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/loads/1 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Load |
URL |
|
Method |
|
URL Params |
OR
OR
If URL uses : HTTP
Header Required: By: 'name' If URL uses : HTTP
Header Required: By: 'number' |
Success Response |
Code:
200 Content: {
"data": {
"type": "loads",
"attributes": {
"name": <string>,
"description": <string>,
"device_id":
<unit32>,
"group_id": <unit32> } } } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/loads/1 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
This API endpoint provides the main load information of a device.
Title |
GET Main Load |
URL |
|
Method |
|
Success Response |
Code : 200 Content: { "meta": {
"id": "9dc939c5-73b7-434b-9f58-2ac16edf1cf7",
"constraints": {},
"validation": [
{
"attribute": "device_id",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "integer"
},
{
"attribute": "state",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [
"LOAD_STATE_UNKNOWN",
"LOAD_STATE_OFF",
"LOAD_STATE_ON",
"LOAD_STATE_MIXED"
],
"type": "enum"
},
{
"attribute": "controllable",
"maximum": 0,
"minimum": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern": "",
"enum": [],
"type": "boolean"
} ],
"path": "/api/loads/main" }, "data": [ {
"type": "loads_main",
"id": "1",
"attributes": {
"device_id": "<uint32>",
"state": "<Enum Load State>",
"controllable": "<Boolean>"
} } ] } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/loads/main |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Load Control APIs enable turn on, turn off and power cycle of individual loads as
well as the main load. This applies only to devices that support these
functions.
Title |
Control Individual Loads |
URL |
|
Method |
|
URL Params |
If URL uses : HTTP
Header Required: By: 'name' If URL uses : HTTP
Header Required: By: 'number' |
Data Params |
{"data": {
"type": "loads_execute",
"attributes": {
"device_id": <uinit32>,
"load_action": <Enum :LoadAction>
} } } |
Success Response |
Code: 200 Content: { "meta": {
"id": "e4a4fed4-f3bc-4879-8180-1e4d9d0044f6",
"path": "/api/ }, "data": {
"type": "loads_execute",
"id": "<load identifier>",
"attributes": {
"response": 0 } } } |
Sample Call |
curl –i -H "Accept: application/vnd.api+json" http://localhost:3001/api/ |
Version |
"Accept-Version: 1.0.0" – If no
version provided, the service return the latest one |
Title |
Control Main Loads |
URL |
|
Method |
|
URL Params |
if URL uses : Required
Header: By:
'name' |
Data Params |
{"data": {
"type": "loads_execute_main",
"attributes": {
"load_action": <Enum :LoadAction>
} } } |
Success Response |
Code: 200 Content: { "meta": {
"id": "e4a4fed4-f3bc-4879-8180-1e4d9d0044f6",
"path": "/api/ }, "data": {
"type": "loads_execute_main",
"id": "<load identifier>",
"attributes": {
"response": 0 } } } |
Sample Call |
curl –i -H "Accept: application/vnd.api+json" http://localhost:3001/ |
Version |
"Accept-Version: 1.0.0" – If no
version provided, the service return the latest one |
The
Load Groups API retrives a summary of configured Load Groups. It also enables
creation, editing and deletion of
Load Groups. It uses the following enums:
loads:
LOAD_STATE_UNKNOWN
LOAD_STATE_OFF
LOAD_STATE_MIXED
Title |
GET All Load Groups |
URL |
/api/loads_group |
Method |
|
URL Params |
Filters:
|
Success Response |
Code: 200 { } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/loads_group |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET One Load Group |
URL |
/api/loads_group/:loadGroupId OR /api/loads_group/:loadGroupName |
Method |
|
URL Params |
/api/loads_group/:loadGroupId OR /api/loads_group/:loadGroupName If URL uses :loadName, then the following HTTP
Header Required: By:
'name' deviceId
: <device id> Note: NO HTTP header required to get load by loadGroupId |
Success Response |
Code: 200 { } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/loads_group/1 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Load Group |
URL |
OR /api/loads_group/:loadGroupName NOTE
: No HTTP header is required to update load group by load group id |
Method |
PATCH |
URL Params |
/api/loads_group/:loadGroupId OR /api/loads_group/:loadGroupName If URL uses :loadName, then the following HTTP
Header Required: By:
'name' Note: NO HTTP header required to get load by loadGroupId |
Data Params |
{ } OR using current_load_id { } |
Success Response |
Code: 200 {
"meta": {
"id": "1c3a50fd-b568-4ff6-928f-227e2aa5ee77",
"path": "/api/loads_group/1" },
"data": {
"type": "loads_group",
"id": "<load group identifier>",
"attributes": {
"response": 0
} } } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/loads_group/1 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
·
Add_load_id or remove_load_id
fields either a list of valid load ids [{id:<loadId>}] or list of valid
load name [{name:<loadName>}] can be used current_load_id
can be one of the following ·
[{id :
'loadId'}] - list of load ids ·
[{name :
'loadName'}] - list of load names · [{load_number : 'loadNumber'}] - List of load numbers |
Title |
Create Load Group |
URL |
/api/loads_group |
Method |
POST |
Data Params |
{ } |
Success Response |
Code: 200 {
"meta": {
"id": "1c3a50fd-b568-4ff6-928f-227e2aa5ee77",
"path": "/api/loads_group/1" },
"data": {
"type": "loads_group",
"id": "<load group identifier>",
"attributes": {
"response": 0
} } } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/loads_group |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete Load Group |
URL |
/api/loads_group/:loadGroupId OR /api/loads_group/:loadGroupName NOTE
: No HTTP header is required to delete load group by load group id |
Method |
DELETE |
URL Params |
/api/loads_group/:loadGroupId OR /api/loads_group/:loadGroupName If URL uses :loadName, then the following HTTP
Header Required: By:
'name' Note: NO HTTP header required to get load by loadGroupId |
Success Response |
Code: 200 {
"meta": {
"id": "1c3a50fd-b568-4ff6-928f-227e2aa5ee77",
"path": "/api/loads_group/1" },
"data": {
"type": "loads_group",
"id": "<load group identifier>",
"attributes": {
"response": 0
} } } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/loads_group/1 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
· Add_load_id or remove_load_id fields either a list of
valid load ids [{id:<loadId>}] or list of valid load name
[{name:<loadName>}] can be used current_load_id
can be one of the following · [{id : 'loadId'}] - list of load
ids · [{name : 'loadName'}] - list of
load names · [{load_number : 'loadNumber'}] - List of load numbers |
The Logs API enables
display, configuration and and export of log data. PowerAlert supports four
type of logs and uses a separate endpoint for each.
·
Accounting
Log
·
Application
Log
·
Data
Log
·
Event
Log
The
Accounting Log API enables retrieval of Accounting Log data.
Title |
GET All Accounting Log Entries |
URL |
/api/logs/accounting |
Method |
|
URL Params |
Filtering 'filter' query parameter is used for filtering: Field
Equals to Value: /api/logs/accounting?filter=[{"name":"<field
name>","op":"eq","val":<field
value>}] Field
Contains a Sub String: /api/logs/accounting?filter=[{"name":"<field
name>","op":"like","val":"%<sub
string to search>%"}] Combinations: /api/logs/accounting?filter=[{"name":"<field
name>","op":"<op>","val":<val>},
{"name":"<field
name>","op":"<op>","val":<val>}] Timestamp Range: /api/logs/accounting?filter=[{"name":"datetime","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"},
{"name":"datetime","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}] Timestamp
from Date Time: /api/logs/accounting?filter=[{"name":"datetime","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"}] Timestamp
till Date Time: /api/logs/accounting?filter=[{"name":"datetime","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}] Sorting 'sort' query parameter is used for sorting: /api/logs/accounting?sort=<fieldname> Descendant Sort: /api/logs/accounting?sort=-<fieldname> Multiple Sort: /api/logs/accounting?sort=<fieldname1>,
<fieldname2> Multiple + Descendant Sort: /api/logs/accounting?sort=<fieldname1>,
-<fieldname2> Pagination /api/logs/accounting?page[size]=<page
size>&page[number]=<page number> Default: page
size = 30 page
number = 1 |
Success Response |
Code: 200 { "category":"<string, category type>", "origin":"<string, host name or ip>", |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET One Accounting Log Entry |
URL |
|
Method |
|
Success Response |
Code: 200 { "category":"<string, category type>", "origin":"<string, host name or ip>", |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/logs/accounting/1 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET Accounting Logs Filtering
Metadata |
URL |
|
Method |
|
Success Response |
Code: 200 { "unique_category":[ |
Sample Call |
curl –i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting_log/fitering/1 |
Version |
"Accept-Version: 1.0.0" – If no version provided, the
service return the latest one |
The
Data Log API enables retrieval of Time-Series and Historical Roll-Up device
metrics. The Time Series view displays the device’s metrics taken at 1-minute
increments. The Historical Roll-Up view displays a summary view of the device’s
metrics at the following increments: hourly, daily, weekly, monthly and yearly.
This API uses the following enums:
device_type:
DEVICE_TYPE_UNKNOWN
DEVICE_TYPE_UPS
DEVICE_TYPE_PDU
DEVICE_TYPE_ENVIROSENSE
DEVICE_TYPE_AC
DEVICE_TYPE_KVM
DEVICE_TYPE_ASSETTRACKER
DEVICE_TYPE_ATS
DEVICE_TYPE_SWITCH
data_type:
VARTYPE_NONE
VARTYPE_INTEGER
VARTYPE_FLOAT
VARTYPE_STRING
VARTYPE_DATE
VARTYPE_ENUMSTRING
VARTYPE_BYTE
VARTYPE_ENUMINTEGER
group:
VARGROUP_ALL
VARGROUP_NONE
VARGROUP_SYSTEM
VARGROUP_DEVICE
VARGROUP_CONTACT
VARGROUP_WATCHDOG
VARGROUP_LOAD
VARGROUP_BATTERY
VARGROUP_INPUT
VARGROUP_OUTPUT
VARGROUP_BYPASS
VARGROUP_ENVIRONMENT
VARGROUP_COOLING
This
API endpoint provides the meta-data for all metrics collected in the data log.
The response includes variable name (e.g. Output Current), identifier, group,
device name and unit of measurement for each metric.
Title |
GET All Data Log Meta-Data |
URL |
|
Method |
|
Success Response |
Code: 200 { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/logs/data |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
This
API endpoint provides the meta-data of a specific metric, as determined by its
identifier (entry_id).
Title |
GET Data Log Meta-Data By ID |
URL |
|
Method |
|
Success Response |
Code: 200 { "data": {
"id":"<string, entry id>", } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/logs/data/1 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Data Log API retrieves the device’s Time-Series metrics taken at 1-minute
increments.
Title |
GET
All Data Log Points |
URL |
|
Method |
|
URL Params |
Filtering 'filter'
query parameter is used for filtering: Field
Equals to Value, Supported Filters: /api/logs/data_log_points?filter[resolution]=<resolution
type> Resolution types: seconds <--- default Aggregation
methods: average <--- default
Filtering
by id, device_id, key: /api/logs/data_log_points?filter[id]=<id> /api/logs/data_log_points?filter[device_id]=<device_id> /api/logs/data_log_points?filter[key]=<key> Filtering
with provided values list: /api/logs/data_log_points?filter=[{"name":"id","op":"in","val":[<number>,
<number>, ...]}] /api/logs/data_log_points?filter=[{"name":"device_id","op":"in","val":[<number>,
<number>, ...]}] /api/logs/data_log_points?filter=[{"name":"key","op":"in","val":[<number>,
<number>, ...]}] Timestamp
Range: /api/logs/data/<data
header entry
id>/data_log_points?filter=[{"name":"timestamp","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"}, {"name":"timestamp","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}] /api/logs/data_log_points?filter=[{"name":"timestamp","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"},
{"name":"timestamp","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}] Timestamp
from Date Time: /api/logs/data/<data
header entry
id>/data_log_points?filter=[{"name":"timestamp","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"}] /api/logs/data_log_points?filter=[{"name":"timestamp","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"}] Timestamp
till Date Time: /api/logs/data/<data header entry
id>/data_points?filter=[{"name":"timestamp","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}] /api/logs/data_points?filter=[{"name":"timestamp","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}]
Pagination /api/logs/data?page[size]=<page
size>&page[number]=<page number> /api/logs/data/<data header entry
id>?page[size]=<page size>&page[number]=<page number> Default: page size = 30 page number = 1 |
Success Response |
Code: 200 Content: { }, "id": <string, variable header entry>, "links": { "self": "/api/logs/data/<variable header entry>/data_log_points" } } ], "links": { "self": "http://<ip>/api/logs/data_log_points", "first": "http://<ip>/api/logs/data_log_points", "last": "http://<ip>/api/logs/data_log_points?page[number]=<last page>", "next": "http://<ip>/api/logs/data_log_points?page[number]=<next page>" }, "meta": { "count": 1440 }, "jsonapi": { "version": "1.0" } } |
Sample Call |
curl –i -H "Accept: application/vnd.api+json" http://localhost:3001/ |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Get
Data Log Points for specific Metrics Identifier |
URL |
/api/logs/data/<metrics
id>/data_log_points |
Method |
|
URL Params |
Filtering, pagination and sorting is the same as in data_log_points |
Success Response |
Code: 200 { }, "id": <string, variable header entry>, "links": { "self": "/api/logs/data/<variable header entry>/data_log_points" } } ], "links": { "self": "http://<ip>/api/logs/data/<data log header entry>/data_log_points", "first": "http://<ip>/api/logs/data/<data log header entry>/data_log_points", "last": "http://<ip>/api/logs/data/<data log header entry>/data_log_points?page[number]=<last page>", "next": "http://<ip>/api/logs/data/<data log header entry>/data_log_points?page[number]=<next page>" }, "meta": { "count": <data log points count> }, "jsonapi": { "version": "1.0" } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
This API retrieves a historical summary of the device’s metrics at the following increments: hourly, daily, weekly, monthly and yearly.
Title |
Show
All Data Log Points Roll-up |
URL |
|
Method |
|
URL Params |
Same filtering queries as in data_log_points, not including timestamp and resolution pagination and sorting is the same as in data_log_points |
Success Response |
Code: 200 { }, "id": <string, variable header entry>, "links": { "self": "/api/logs/data/<variable header entry>/data_log_rollup" } } ], "links": { "self": "http://<ip>/api/logs/data_log_rollup", }, "meta": { "count": 5 }, "jsonapi": { "version": "1.0" } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET
Data Log Filtering Metadata |
URL |
|
Method |
|
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Event Log API enables retrieval and configuration of system-related and device
events. It uses the following enums:
log_entry_type:
LOG_ENTRY_TYPE_SYSTEM_EVENT
LOG_ENTRY_TYPE_DEVICE_EVENT
LOG_ENTRY_TYPE_VAR_THRESHOLD_CROSSING
LOG_ENTRY_TYPE_CONTROL_EXECUTION
severity:
EVENT_LOG_SEVERITY_EMERGENCY
EVENT_LOG_SEVERITY_ALERT
EVENT_LOG_SEVERITY_CRITICAL
EVENT_LOG_SEVERITY_ERROR
EVENT_LOG_SEVERITY_WARNING
EVENT_LOG_SEVERITY_NOTICE
EVENT_LOG_SEVERITY_INFO
EVENT_LOG_SEVERITY_DEBUG
event_type:
EVENT_TYPE_STATEFUL
EVENT_TYPE_STATELESS_SETTING
EVENT_TYPE_STATELESS_CLEARING
EVENT_TYPE_STATELESS
Title |
GET
All Event Log Entries |
URL |
|
Method |
|
URL Params |
Filtering 'filter'
query parameter is used for filtering: Field
Equals to Value: /api/logs/event?filter=[{"name":"<field
name>","op":"eq","val":<field
value>}] Field
Contains a Sub String: /api/logs/event?filter=[{"name":"<field
name>","op":"like","val":"%<sub
string to search>%"}] Combinations: /api/logs/event?filter=[{"name":"<field
name>","op":"<op>","val":<val>},
{"name":"<field
name>","op":"<op>","val":<val>}] Timestamp
Range: /api/logs/event?filter=[{"name":"timestamp","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"},
{"name":"timestamp","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}] Timestamp
from Date Time: /api/logs/event?filter=[{"name":"timestamp","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"}] Timestamp
till Date Time: /api/logs/event?filter=[{"name":"timestamp","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}] Sorting: 'sort'
query parameter is used for sorting: /api/logs/event?sort=<fieldname> Descendant Sort: /api/logs/event?sort=-<fieldname> Multiple Sort: /api/logs/event?sort=<fieldname1>,
<fieldname2> Multiple + Descendant Sort: /api/logs/event?sort=<fieldname1>,
-<fieldname2> Default: Default
sorting is by timestamp descending Pagination /api/logs/event?page[size]=<page
size>&page[number]=<page number> Default: page size = 30 page number = 1 |
Success Response |
Code: 200 { "next":"http://<ip>/api/logs/event?page%5Bnumber%5D=<next page>", |
Version |
"Accept-Version:
1.0.0" – If no version provided, the service return the latest one |
Title |
Show
All Event Log Entries, include Data Points |
URL |
|
Method |
|
URL Params |
Filtering 'filter'
query parameter is used for filtering: Field
Equals to Value: /api/logs/event?filter=[{"name":"<field
name>","op":"eq","val":<field
value>}] Field
Contains a Sub String: /api/logs/event?filter=[{"name":"<field
name>","op":"like","val":"%<sub
string to search>%"}] Combinations: /api/logs/event?filter=[{"name":"<field
name>","op":"<op>","val":<val>},
{"name":"<field
name>","op":"<op>","val":<val>}] Timestamp
Range: /api/logs/event?filter=[{"name":"timestamp","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"},
{"name":"timestamp","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}] Timestamp
from Date Time: /api/logs/event?filter=[{"name":"timestamp","op":"ge","val":
"YYYY-MM-DD HH:mm:ss"}] Timestamp
till Date Time: /api/logs/event?filter=[{"name":"timestamp","op":"le","val":
"YYYY-MM-DD HH:mm:ss"}] Sorting: 'sort'
query parameter is used for sorting: /api/logs/event?sort=<fieldname> Descendant Sort: /api/logs/event?sort=-<fieldname> Multiple Sort: /api/logs/event?sort=<fieldname1>,
<fieldname2> Multiple + Descendant Sort: /api/logs/event?sort=<fieldname1>,
-<fieldname2> Default: Default
sorting is by timestamp descending Pagination /api/logs/event?page[size]=<page
size>&page[number]=<page number> Default: page size = 30 page
number = 1 |
Success Response |
Code: 200 { { "type":"event_log", "attributes":{ "description":"<string, event description>", "device_model":"<string, relevant if device event>", "device_name":"<string, relevant if device event>", "log_entry_type":"<enum, log entry type>", "message_id":"<uint64, associated syslog message id>", "event_type": "<enum, event type>", "event_id": "<uint32, event id>", "severity":"<enum, log severity>", "timestamp":"<datetime, in format of YYYY-MM-DDTHH:mm:ss+00:00>", "count":"<number of event occurrences, for flood protection>" }, "id":"<string, entry id>", "links":{ "self":"/api/logs/event/<entry id>" }, "relationships":{ "data_points":{ "data":[ { "id":"<string, data point id>", "type":"data_point" }, { "id":"<string, data point id>", "type":"data_point" }, { "id":"<string, data point id>", "type":"data_point" } ] } } } ], "included":[ { "attributes":{ "event_id":"<string, associated event log entry id>", "name":"<string, data point name>", "value":"<string, data point value>", "time_offset": "<int64, time offset from event occurred>" }, "id":"<string, data point id>", "links":{ "self":"/api/logs/event_data_points/<data point id>" }, "type":"data_point" }, { "attributes":{ "event_id":"<string, associated event log entry id>", "name":"<string, data point name>", "value":"<string, data point value>", "time_offset": "<int64, time offset from event occurred>" }, "id":"<string, data point id>", "links":{ "self":"/api/logs/event_data_points/<data point id>" }, "type":"data_point" }, { "attributes":{ "event_id":"<string, associated event log entry id>", "name":"<string, data point name>", "value":"<string, data point value>", "time_offset": "<int64, time offset from event occurred>" }, "id":"<string, data point id>", "links":{ "self":"/api/logs/event_data_points/<data point id>" }, "type":"data_point" } ], "links":{ "first":"http://<ip>/api/logs/event?include=data_points", "last": "http://<ip>/api/logs/event?include=data_points&page%5Bnumber%5D=<last page>", "next": "http://<ip>/api/logs/event?include=data_points&page%5Bnumber%5D=<next page>", "self":"http://<ip>/api/logs/event?include=data_points" }, "meta":{ "count":"<number, total event log entries count>" } } |
Version |
"Accept-Version:
1.0.0" – If no version provided, the service return the latest one |
Title |
GET
One Event Log Entry |
URL |
|
Method |
|
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET
One Event Log Entry with its Data Points |
URL |
|
Method |
|
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET
Event Log Filtering Metadata |
URL |
|
Method |
|
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
following enums are used for on-demand Log Rotation.
logtype:
LOG_TYPE_ACCOUNTING
LOG_TYPE_EVENT
LOG_TYPE_DATA
LOG_TYPE_DATA_ROLLUP
LOG_TYPE_APPLICATION
LOG_TYPE_ALERTS
format:
LOG_FORMAT_CSV
LOG_FORMAT_XML
export_method:
LOG_ROTATION_ACTION_EMAIL
LOG_ROTATION_ACTION_DOWNLOAD
Manual Export
Title |
Manual
Export |
URL |
|
Method |
|
URL Params |
Required:
Example:
logType='LOG_TYPE_EVENT' |
Data Params |
{ |
Success Response |
Code: 201 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
For LOG_TYPE_DATA: attribute export_method must be LOG_FORMAT_CSV
· attribute clear_log is
ignored (the log is not cleared) |
Title |
GET Log Export Availability |
URL |
|
Method |
|
Data Params |
|
Success Response |
Code: 200 { } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Scheduled Actiona API enables creation and management of scheduled actions, as
applicable to the device and connected peripherals.
·
OperationType – This sets
the type of scheduled Action. Each operation type has its own set of required
attributes.Refer to Table 1 for details.
·
FrequencyType
- This
sets how often the action occurs. Refer to the ScheduleFrequencyType enums for
avialble options. Refer to Table 2 for parameter details related to each frequency
type
·
RangeType – This sets
the range for a scheduled action. Refer to Table
3 for details on the parameters associated with each range type.
This API uses the following enums:
operation_type:
SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST
SCHEDULED_OPERATION_TYPE_ENABLE_ONLINE_MODE
SCHEDULED_OPERATION_TYPE_EXPORT_APPLICATION_LOG
SCHEDULED_OPERATION_TYPE_EXPORT_LOG
SCHEDULED_OPERATION_TYPE_LOAD
SCHEDULED_OPERATION_TYPE_LOAD_GROUP
SCHEDULED_OPERATION_TYPE_RAMP
SCHEDULED_OPERATION_TYPE_REBOOT_OPERATING_SYSTEM
SCHEDULED_OPERATION_TYPE_REBOOT_WEBCARD_LX
SCHEDULED_OPERATION_TYPE_RESTART_DEVICE
SCHEDULED_OPERATION_TYPE_SENSOR
SCHEDULED_OPERATION_TYPE_SHED
SCHEDULED_OPERATION_TYPE_SHUTDOWN_OPERATING_SYSTEM
SCHEDULED_OPERATION_TYPE_TURN_OFF_DEVICE
SCHEDULED_OPERATION_TYPE_TURN_ON_DEVICE
SchedulingDayOfWeek:
SCHEDULING_DAY_OF_WEEK_SUNDAY
SCHEDULING_DAY_OF_WEEK_MONDAY
SCHEDULING_DAY_OF_WEEK_TUESDAY
SCHEDULING_DAY_OF_WEEK_WEDNESDAY
SCHEDULING_DAY_OF_WEEK_THURSDAY
SCHEDULING_DAY_OF_WEEK_FRIDAY
SCHEDULING_DAY_OF_WEEK_SATURDAY
SchedulingMonthOfYear:
SCHEDULING_MONTH_OF_YEAR_JANUARY
SCHEDULING_MONTH_OF_YEAR_FEBRUARY
SCHEDULING_MONTH_OF_YEAR_MARCH
SCHEDULING_MONTH_OF_YEAR_APRIL
SCHEDULING_MONTH_OF_YEAR_MAY
SCHEDULING_MONTH_OF_YEAR_JUNE
SCHEDULING_MONTH_OF_YEAR_JULY
SCHEDULING_MONTH_OF_YEAR_AUGUST
SCHEDULING_MONTH_OF_YEAR_SEPTEMBER
SCHEDULING_MONTH_OF_YEAR_OCTOBER
SCHEDULING_MONTH_OF_YEAR_NOVEMBER
SCHEDULING_MONTH_OF_YEAR_DECEMBER
SchedulingOrdinalType:
SCHEDULING_ORDINAL_FIRST
SCHEDULING_ORDINAL_SECOND
SCHEDULING_ORDINAL_THIRD
SCHEDULING_ORDINAL_FOURTH
SCHEDULING_ORDINAL_LAST
SCHEDULING_MONTH_OF_YEAR_DECEMBER
frequency_type:
SCHEDULING_FREQUENCY_TYPE_ONCE
SCHEDULING_FREQUENCY_TYPE_DAILY
SCHEDULING_FREQUENCY_TYPE_WEEKLY
SCHEDULING_FREQUENCY_TYPE_MONTHLYDAYOFMONTH
SCHEDULING_FREQUENCY_TYPE_MONTHLYDAYSOFWEEK
SCHEDULING_FREQUENCY_TYPE_YEARLYDAYOFMONTH
SCHEDULING_FREQUENCY_TYPE_YEARLYORDINAL
range_type:
SCHEDULING_RANGE_TYPE_REPEAT_FOREVER
SCHEDULING_RANGE_TYPE_REPEAT_TIMES
SCHEDULING_RANGE_TYPE_REPEAT_UNTIL
SchedulingLogType:
SCHEDULING_LOG_TYPE_ACCOUNTING
SCHEDULING_LOG_TYPE_EVENT
SCHEDULING_LOG_TYPE_DATA
SCHEDULING_LOG_TYPE_DATA_ROLLUP
SchedulingLogFormatType:
SCHEDULING_LOG_FORMAT_TYPE_CSV
SCHEDULING_LOG_FORMAT_TYPE_XML
SchedulingSensorState:
SCHEDULING_SENSOR_STATE_OPEN
SCHEDULING_SENSOR_STATE_CLOSED
SchedulingSensorContact:
SCHEDULING_SENSOR_CONTACT_ONE
SCHEDULING_SENSOR_CONTACT_TWO
Load Action:
LOAD_ACTION_CYCLE
LOAD_ACTION_ON
LOAD_ACTION_OFF
LOAD_ACTION_IDLE
Table 1 - Operation Type
Selection Table
Table 2 – Frequency Type Selection Table
Table
3 – Range Type Selection Table
Range
Type |
Required
Parameters |
Field
Description |
SCHEDULING_RANGE_TYPE_REPEAT_FOREVER |
No
parameter required |
The
operation runs forever |
SCHEDULING_RANGE_TYPE_REPEAT_TIMES |
repeat_times: <integer> |
The
operation runs <integer> times |
SCHEDULING_RANGE_TYPE_REPEAT_UNTIL |
repeat_until: <calendar timestamp>
|
Specifies the calendar
date and time that the operation runs for the last time |
Title |
GET All Scheduling Tasks |
URL |
/api/schedulings |
Method |
GET |
Success Response |
"data": [
{
"type": "schedulings",
"id": "<Stinrg Number Value>",
"attributes": {
"name": "<String Task Name>",
"enabled": <Boolean Value> ,
"run_on": "<datetime, in format of
YYYY-MM-DDTHH:mm:ss+00:00 - Example 2019-05-06T14:39:35-05:00>",
"run_last": "<datetime, in format of
YYYY-MM-DDTHH:mm:ss+00:00 - Example 2019-05-06T14:39:35-05:00>",
"run_next": "<datetime, in format of
YYYY-MM-DDTHH:mm:ss+00:00 - Example 2019-05-06T14:39:35-05:00>",
"fired_count": <int value>,
"operation_type": "ENUM ScheduledOperationType",
//Based on operation_type selection,
addational attribute will be included - Look at Table 1
"frequency_type": "ENUM SchedulingFrequencyType ",
//Based on frequency_type
selection, addational attribute will be included – Look at Table 2
"range_type": "ENUM SchedulingRangeType",
//Additional Valid attributes will be included based on range_type selection
– Look at Table 3
}
} ] |
Sample Call |
Request: http://127.0.0.1:3001/api/schedulings {
"meta": {
"id": "8b3985f8-d29f-477a-a2c4-97fd8a33e27f",
"constraints": {
"max_items": 0,
"min_items": 0,
"editable_attributes": [
"name",
"enabled",
"run_on",
"frequency",
"range"
],
"required_attributes": [
"name",
"enabled",
"run_on",
"operation"
],
"delete_allowed": true
},
"validation": [{
"attribute":
"name",
"maximum": 0,
"minimum": 0,
"default": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern":
"",
"enum": [],
"type":
"string"
},
{
"attribute":
"run_on",
"maximum": 0,
"minimum": 0,
"default": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern":
"",
"enum": [],
"type":
"datetime"
}
],
"path": "/api/schedulings" },
"data": [{
"type": "schedulings",
"id": "1",
"attributes": {
"name":
"task-01",
"enabled": false,
"run_on":
"2019-12-06T14:38:54-06:00",
"run_last":
"",
"run_next":
"2019-12-17T14:38:54-06:00",
"fired_count": 0,
"operation_type":
"SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST",
"device_id": 1,
"device_name": "",
"frequency_type":
"SCHEDULING_FREQUENCY_TYPE_ONCE",
"once": true,
"range_type":
"SCHEDULING_RANGE_TYPE_REPEAT_FOREVER",
"repeat_forever": true
}
},
{
"type": "schedulings",
"id": "2",
"attributes": {
"name":
"task-02",
"enabled": false,
"run_on":
"2019-12-06T14:38:54-06:00",
"run_last":
"",
"run_next":
"2019-12-17T14:38:54-06:00",
"fired_count": 0,
"operation_type":
"SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST",
"device_id": 2,
"device_name":
"",
"frequency_type": "SCHEDULING_FREQUENCY_TYPE_ONCE",
"once": true,
"range_type":
"SCHEDULING_RANGE_TYPE_REPEAT_FOREVER",
"repeat_forever": true
}
},
{
"type": "schedulings",
"id": "3",
"attributes": {
"name":
"task-05",
"enabled": false,
"run_on":
"2019-12-06T14:38:54-06:00",
"run_last":
"",
"run_next":
"2019-12-17T14:38:54-06:00",
"fired_count": 0,
"operation_type":
"SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST",
"device_id": 3,
"device_name":
"",
"frequency_type":
"SCHEDULING_FREQUENCY_TYPE_ONCE",
"once": true,
"range_type":
"SCHEDULING_RANGE_TYPE_REPEAT_FOREVER",
"repeat_forever": true
}
},
{
"type": "schedulings",
"id": "4",
"attributes": {
"name":
"task-06",
"enabled": false,
"run_on":
"2019-12-06T14:38:54-06:00",
"run_last":
"",
"run_next":
"2019-12-17T14:38:54-06:00",
"fired_count": 0,
"operation_type":
"SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST",
"device_id": 4,
"device_name":
""
"frequency_type":
"SCHEDULING_FREQUENCY_TYPE_ONCE",
"once": true,
"range_type":
"SCHEDULING_RANGE_TYPE_REPEAT_FOREVER",
"repeat_forever": true
}
},
{
"type": "schedulings",
"id": "5",
"attributes": {
"name":
"task-11",
"enabled": true,
"run_on":
"2019-12-06T14:38:54-06:00",
"run_last":
"",
"run_next":
"2019-12-18T14:38:54-06:00",
"fired_count": 0,
"operation_type": "SCHEDULED_OPERATION_TYPE_ENABLE_ONLINE_MODE",
"device_id": 1,
"device_name":
"",
"frequency_type":
"SCHEDULING_FREQUENCY_TYPE_DAILY",
"range_type":
"SCHEDULING_RANGE_TYPE_REPEAT_UNTIL",
"frequency_days": 2,
"repeat_until":
""
}
} ] } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
Check List of
Enumeration for ENUMS and Table 1, Table 2 and Tabel 3for all allowed
attribute of each of operationType, frequencyType or rangeType selection |
Title |
GET One Scheduling Task |
URL |
/api/schedulings/:id OR /api/schedulings/:name Note: NO
HTTP header required to get schedulings task by ID |
Method |
GET |
URL Params |
/api/schedulings/:id OR /api/schedulings/:name Note: No HTTP header required to get by id http header "By: name" required to get
by name Required: id=[integer] name=[string] example:
‘task1’ |
Success Response |
Code: 200 Content: {{
"data": {
"type": "schedulings",
"id": "<Stinrg Number Value>",
"attributes": {
"name": "<String Task
Name>",
"enabled": "< Boolean Value
>",
"run_on": "<datetime, in format of
YYYY-MM-DDTHH:mm:ss+00:00 - Example 2019-05-06T14:39:35-05:00>",
"run_last": "<datetime, in format
of YYYY-MM-DDTHH:mm:ss+00:00 - Example 2019-05-06T14:39:35-05:00>",
"run_next": "<datetime, in format
of YYYY-MM-DDTHH:mm:ss+00:00 - Example 2019-05-06T14:39:35-05:00>",
"fired_count": "< int value
>",
"operation_type": "ENUM
ScheduledOperationType",
//Based on operation_type selection, addational
attribute will be include – Look at Table 1
"frequency_type": "ENUM
SchedulingFrequencyType ",
//Based on frequency_type selection, addational
attribute will be included - Look at Table 2
"range_type": "ENUM
SchedulingRangeType",
//Addational Valid attributes will be included based
on range_type selection - Look at Table 3
} } } |
Sample Call |
http://127.0.0.1:3001/api/schedulings/1 - by Id {
"meta": {
"id": "38532ad3-8302-4e0a-9cb0-b488958cd805",
"constraints": {
"max_items": 0,
"min_items": 0,
"editable_attributes": [
"name",
"enabled",
"run_on",
"frequency",
"range"
],
"required_attributes": [
"name",
"enabled",
"run_on",
"operation"
],
"delete_allowed": true
},
"validation": [{
"attribute":
"name",
"maximum": 0,
"minimum": 0,
"default": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern":
"",
"enum": [],
"type":
"string"
},
{
"attribute":
"run_on",
"maximum": 0,
"minimum": 0,
"default": 0,
"multiple_of": 0,
"min_length": 0,
"max_length": 0,
"pattern":
"",
"enum": [],
"type":
"datetime"
}
],
"path": "/api/schedulings/1" },
"data": {
"type": "schedulings",
"id": "1",
"attributes": {
"name": "task-01",
"enabled": false,
"run_on":
"2019-12-06T14:38:54-06:00",
"run_last": "",
"run_next":
"2019-12-17T14:38:54-06:00",
"fired_count": 0,
"operation_type":
"SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST",
"device_id": 1,
"device_name": "",
"frequency_type":
"SCHEDULING_FREQUENCY_TYPE_ONCE",
"once": true,
"range_type":
"SCHEDULING_RANGE_TYPE_REPEAT_FOREVER",
"repeat_forever": true
} } }
http://127.0.0.1:3001/api/schedulings/task01 |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Create Scheduling Task |
URL |
/api/schedulings |
Method |
POST |
Data Params |
{
"data": {
"type": "schedulings",
"attributes": {
"name": "<String Task
Name>",
"operation_type": "ENUM
ScheduledOperationType", //Look at Table 1 (Operation Type Selection
Table)
//based on the operaton_type selection additional attribute is required -
Example for operation_type SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST,
device_id or device_name is required
"enabled": "<Boolean
Value>",
"run_on": "<datetime, in format of
YYYY-MM-DDTHH:mm:ss+00:00 - Example 2019-05-06T14:39:35-05:00>",
"frequency_type": "ENUM
SchedulingFrequencyType", //Look at Table 2 (Frequency Selction Table)
//Based on frequency_type selection, additional
attribute will be included
"range_type": "ENUM
SchedulingRangeType", // Look at Table 3 – Range Type Selection
//Additional Valid attributes will be included based on range_type
selection
} } } |
Success Response |
Code: 200 {
"meta": {
"id": "99c0144b-fd89-4cfe-96b4-65e0689911e3",
"path":
"/api/schedulings/SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST" },
"data": {
"type": "/api/schedulings",
"id": "7",
"attributes": {
"response": 0
} } } |
Sample Call |
URL -
http://localhost:3001/api/schedulings POST Body: {
"data": {
"type": "schedulings",
"attributes": {
"name":
"taskBatterselfTestOnce",
"enabled": false,
"run_on":
"2019-12-26T15:38:54-05:00",
"operation_type":
"SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST",
"frequency_type": "SCHEDULING_FREQUENCY_TYPE_ONCE",
"device_id": 1
} } } Response {
"meta": {
"id": "99c0144b-fd89-4cfe-96b4-65e0689911e3",
"path":
"/api/schedulings/SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST" },
"data": {
"type": "/api/schedulings",
"id": "7",
"attributes": {
"response": 0
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update Scheduling Task |
URL |
/api/schedulings/:id OR /api/schedulings/:name Note: No
HTTP Header required to update scheduling task using id |
Method |
PATCH |
URL Params |
/api/schedulings/:id OR /api/schedulings/:name Note: No HTTP header required to get by id http header "by: name" required to
update by name Required: id=[integer] name=[string] example:
'autoprobe1' |
Data Params |
{
"data": {
"type": "schedulings",
"attributes": {
"name": "<String Task
Name>",
//based on the operaton_type selection additional attribute is required -
Example for operation_type SCHEDULED_OPERATION_TYPE_BATTERY_SELF_TEST,
device_id or device_name is required
"enabled": "<Boolean
Value>",
"run_on": "<datetime, in format of
YYYY-MM-DDTHH:mm:ss+00:00 - Example 2019-05-06T14:39:35-05:00>",
"frequency_type": "ENUM
SchedulingFrequencyType", //
//Based on frequency_type selection, additional
attribute will be included – Look at Table 1 FrequencyType Selection
"range_type": "ENUM
SchedulingRangeType", //Look at Table 3 Range Type Selection
//Additional Valid attributes will be included based on range_type selection
- Look at Table 3 Range Type Selection
} } } |
Success Response |
Code: 200 Content: {
"meta": {
"id": "<request id>",
"path": "<api uri path>" },
"data": {
"type": "schedulings",
"id": "<scheduling task id>",
"attributes": {
"response": 0
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
·
operation_type cannot be updated
but operation type related attribute can be update. ·
device_id and device_name can be
updated for device related operation type (Example:
SCHEDULED_OPERATION_TYPE_LOAD, SCHEDULED_OPERATION_TYPE_LOAD_GROUP and etc). ·
operation_type needed to be
provided to updated allowed operation attribute but type it self can not be
updated – Look at Operation Type Selection Table (Table 1) ·
frequency_type and allowed
attribute for that frequency type needs to be provided to update frequency –
Look at Table 2 – Frequency Type Selection
range_type and allowed attribute
for that range type needs to be provided to update range – Look at Range Type
Selection Table |
Title |
Delete Scheduling Task |
URL |
/api/schedulings/:schedulingId OR /api/schedulings/:schedulingName Note: No HTTP Header required to delete scheduling task using schedulingId |
Method |
PATCH |
URL Params |
/api/schedulings/:schedulingId OR /api/schedulings/:schedulingName Note: No HTTP header required to update by id http header "By: name" required to delete
by name Required: schedulingId=[int] schedulingName=[string] example: schedulingName=task01 |
Success Response |
Code: 200 {
"meta": {
"id": "<request id>",
"path": "<api uri path>" },
"data": {
"type": "schedulings",
"id": "<scheduling task id>",
"attributes": {
"response": 0
} } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET
Supported Scheduling Operations |
URL |
|
Method |
|
Success Response |
Code: 200 { "meta": {
"id": "3f29fec7-5907-4161-9bd1-808f2feed0d6",
"path": "/api/schedulings/supported" }, "data": {
"type": "schedulings_supported",
"id": "SchedulingsSupported",
"attributes": {
"export_application_log_supported": false,
"export_log_supported": false,
"reboot_operating_system_supported": false,
"reboot_webcard_lx_supported": true,
"shutdown_operating_supported": false,
"load_supported": {
"load_identity_per_device": [{
"device": {
"id": 1,
"name": ""
},
"loads": [{
"id": "1",
"name": "Load 1"
},
{
"id": "2",
"name": "Load 2"
}
]
}]
},
"load_group_supported": {
"load_identity_per_device": [{
"device": {
"id": 1,
"name":
""
},
"loads": [{
"id": "1",
"name": "Load 1"
},
{
"id": "2",
"name": "Load 2"
}
]
}]
},
"battery_self_test_supported": {
"devices": [{
"id": 1,
"name": ""
}]
},
"enable_online_mode_supported": {},
"ramp_supported": {
"devices": [{
"id": 1,
"name": ""
}]
},
"restart_device_supported": {
"devices": [{
"id": 1,
"name": ""
}]
},
"sensor_supported": {},
"shed_supported": {
"devices": [{
"id": 1,
"name": ""
}]
},
"turn_off_device_supported": {},
"turn_on_device_supported": {} } } } |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
System API enables retrieval of ready state, uptime and system configuration information
(MAC address, serial number, Operating System, etc).
Title |
GET
System Ready Status |
URL |
/api/ready |
Method |
GET |
Success Response |
|
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
1.
The
system is ready when "system_state" is equal to
"ready" 2.
Service
state could be: ·
loading, service is loading ·
started, service is started, but cannot
be accessible because Node.js is not ready ·
down, service is failed to boot
up · ready, service is ready and can be accessible via REST
API |
Title |
GET System Uptime |
URL |
/api/system_uptime |
Method |
GET |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
This
API retrieves system details – MAC address, serial number, Operating System info,
etc. It uses the following enums:
agent_type:
AGENT_TYPE_PAL_PC
AGENT_TYPE_PAL_PC
AGENT_TYPE_PANSA
AGENT_TYPE_DELTA_WEBCARD
AGENT_TYPE_SINETICA_WEBCARD
AGENT_TYPE_PAL_NETOS6
AGENT_TYPE_PAL_NETOS7
AGENT_TYPE_PANMS
AGENT_TYPE_PAL_NMC5
driver_status:
DRIVER_FILE_NORMAL
DRIVER_FILE_INTERNAL_FAILURE
DRIVER_FILE_MISSING
DRIVER_FILE_CORRUPTED
DRIVER_FILE_OUTDATED
Title |
GET System Details |
URL |
/api/system_details |
Method |
GET |
Success Response |
Code: 200 Content: { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
This
API enables creation and management of user accounts: Local Users, SNMP Users and
Remote Servers. The Local User API is used for creating, editing and deleting
local users. SNMP V1/V2 and V3 API is used for creating, editing and deleting
SNMP V1/V2 and V3 users, respectively. The Remote Server API API is used for
creating, editing and deleting remote server users, i.e. LDAP and RADIUS.
The
Local User API uses the following enums:
preferred_temperature_unit:
TEMPERATURE_CELSIUS
TEMPERATURE_FAHRENHEIT (default)
preferred_date_format:
DATEFORMAT_MDYYYY (default)
DATEFORMAT_MDYY
DATEFORMAT_MMDDYY
DATEFORMAT_MMDDYYYY
DATEFORMAT_YYMMDD
DATEFORMAT_YYYY_MM_DD
DATEFORMAT_DD_MM_YY
DateFormat Enum |
Real Date Format |
DATEFORMAT_MDYYYY |
M/d/yyyy |
DATEFORMAT_MDYY |
M/d/yy |
DATEFORMAT_MMDDYY |
MM/dd/yy |
DATEFORMAT_MMDDYYYY |
MM/dd/yyyy |
DATEFORMAT_YYMMDD |
yy/MM/DD |
DATEFORMAT_YYYY_MM_DD |
yyyy-MM-dd |
DATEFORMAT_DD_MM_YY |
dd-MM-yy |
preferred_time_format:
TIMEFORMAT_HMMSSTT
(default)
TIMEFORMAT_HHMMSSTT
TIMEFORMAT_HMMSS
TIMEFORMAT_HHMMSS
TimeFormat
Enum |
Real
Time Format |
TIMEFORMAT_HMMSSTT |
h:mm:ss tt |
TIMEFORMAT_HHMMSSTT |
hh:mm:ss tt |
TIMEFORMAT_HMMSS |
h:mm:ss |
TIMEFORMAT_HHMMSS |
hh:mm:ss |
preferred_pressure_unit:
PRESSURE_DEFAULT
PRESSURE_BAR
PRESSURE_MPA
PRESSURE_PSI
Title |
GET
All Local Users |
URL |
|
Method |
|
Success Response |
Code: 200 { "meta": { "id": "<request id>", "constraints": { "max_items": 64, "min_items": 0, "editable_attributes": [ "name", "role", "session_timeout", "enabled", "password", "full_name", "contact", "description", "sshkey", "preferred_temperature_unit", "preferred_timezone", "preferred_language", "preferred_date_format", "preferred_time_format", "preferred_pressure_unit", "ip", "mask", "idle_timeout", "idle_timeout_enabled", "session_timeout_enabled", "password_aging_enabled", "password_aging_min_age", "password_aging_max_age" ], "required_attributes": [ "name", "password", "role", "session_timeout_enabled", "idle_timeout_enabled" ], "delete_allowed": true }, "validation": [{ "attribute": "name", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 6, "max_length": 32, "pattern": "[^#\\+,\\-:~\\s][^,:\\s]*", "enum": [
], "type": "string" }, { "attribute": "password", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 8, "max_length": 32, "pattern": "[ -~]*", "enum": [
], "type": "string" }, { "attribute": "full_name", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 64, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "contact", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 64, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "description", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 64, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "enabled", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "boolean" }, { "attribute": "role", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 1, "max_length": 32, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "sshkey", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 4096, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "preferred_timezone", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 64, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "preferred_language", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 8, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "preferred_date_format", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [ "DATEFORMAT_DEFAULT", "DATEFORMAT_MDYYYY", "DATEFORMAT_MDYY", "DATEFORMAT_MMDDYY", "DATEFORMAT_MMDDYYYY", "DATEFORMAT_YYMMDD", "DATEFORMAT_YYYY_MM_DD", "DATEFORMAT_DD_MMM_YY" ], "type": "enum" }, { "attribute": "preferred_time_format", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [ "TIMEFORMAT_DEFAULT", "TIMEFORMAT_HMMSSTT", "TIMEFORMAT_HHMMSSTT", "TIMEFORMAT_HMMSS", "TIMEFORMAT_HHMMSS" ], "type": "enum" }, { "attribute": "preferred_temperature_unit", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [ "TEMPERATURE_DEFAULT", "TEMPERATURE_CELSIUS", "TEMPERATURE_FAHRENHEIT" ], "type": "enum" }, { "attribute": "preferred_pressure_unit", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [ "PRESSURE_DEFAULT", "PRESSURE_BAR", "PRESSURE_MPA", "PRESSURE_PSI" ], "type": "enum" }, { "attribute": "ip", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 45, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "mask", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 45, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "session_timeout", "maximum": 999, "minimum": 30, "default": 360, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "integer" }, { "attribute": "idle_timeout", "maximum": 999, "minimum": 5, "default": 60, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "integer" }, { "attribute": "password_aging_enabled", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "boolean" }, { "attribute": "password_aging_min_age", "maximum": 999, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "integer" }, { "attribute": "password_aging_max_age", "maximum": 999, "minimum": 1, "default": 30, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "integer" }, { "attribute": "idle_timeout_enabled", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "boolean" }, { "attribute": "session_timeout_enabled", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "boolean" }, { "attribute": "ui_settings", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 2048, "pattern": "", "enum": [
], "type": "string" } ], "count": 64 }, "data": [{ "type": "localusers", "id": "<string>", "attributes": { "uid": "<string>", "enabled": "<boolean>", "name": "<string>", "role_id": "<number>", "role_name": "<string>", "role": "<string>", "session_timeout": "<number>", "idle_timeout": "<number>", "session_timeout_enabled": "<boolean>", "idle_timeout_enabled": "<boolean>", "ip": "<string>", "mask": "<string>", "password": "<string>", "proto": "", "full_name": "< string > ", "contact": "< string > ", "description": "< string > ", "password_aging_enabled": "<boolean>", "password_aging_min_age": "<number>", "password_aging_max_age": "<number>", "preferred_timezone": "<string>", "preferred_language": "<string>", "preferred_date_format": "<enum, Date Format>", "preferred_time_format": "<enum, Time Format>", "preferred_temperature_unit": "<enum, Temperature Unit>", "preferred_pressure_unit": "<enum, Pressure Unit>" } }] } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET
One Local User |
URL |
|
Method |
|
URL Params |
By:
'name' |
Success Response |
Code: 200 { "meta": { "id": "<request id>", "constraints": { "max_items": 64, "min_items": 0, "editable_attributes": [ "name", "role", "session_timeout", "enabled", "password", "full_name", "contact", "description", "sshkey", "preferred_temperature_unit", "preferred_timezone", "preferred_language", "preferred_date_format", "preferred_time_format", "preferred_pressure_unit", "ip", "mask", "idle_timeout", "idle_timeout_enabled", "session_timeout_enabled", "password_aging_enabled", "password_aging_min_age", "password_aging_max_age" ], "required_attributes": [ "name", "password", "role", "session_timeout_enabled", "idle_timeout_enabled" ], "delete_allowed": true }, "validation": [{ "attribute": "name", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 6, "max_length": 32, "pattern": "[^#\\+,\\-:~\\s][^,:\\s]*", "enum": [
], "type": "string" }, { "attribute": "password", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 8, "max_length": 32, "pattern": "[ -~]*", "enum": [
], "type": "string" }, { "attribute": "full_name", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 64, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "contact", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 64, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "description", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 64, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "enabled", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "boolean" }, { "attribute": "role", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 1, "max_length": 32, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "sshkey", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 4096, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "preferred_timezone", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 64, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "preferred_language", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 8, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "preferred_date_format", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [ "DATEFORMAT_DEFAULT", "DATEFORMAT_MDYYYY", "DATEFORMAT_MDYY", "DATEFORMAT_MMDDYY", "DATEFORMAT_MMDDYYYY", "DATEFORMAT_YYMMDD", "DATEFORMAT_YYYY_MM_DD", "DATEFORMAT_DD_MMM_YY" ], "type": "enum" }, { "attribute": "preferred_time_format", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [ "TIMEFORMAT_DEFAULT", "TIMEFORMAT_HMMSSTT", "TIMEFORMAT_HHMMSSTT", "TIMEFORMAT_HMMSS", "TIMEFORMAT_HHMMSS" ], "type": "enum" }, { "attribute": "preferred_temperature_unit", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [ "TEMPERATURE_DEFAULT", "TEMPERATURE_CELSIUS", "TEMPERATURE_FAHRENHEIT" ], "type": "enum" }, { "attribute": "preferred_pressure_unit", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [ "PRESSURE_DEFAULT", "PRESSURE_BAR", "PRESSURE_MPA", "PRESSURE_PSI" ], "type": "enum" }, { "attribute": "ip", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 45, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "mask", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 45, "pattern": "", "enum": [
], "type": "string" }, { "attribute": "session_timeout", "maximum": 999, "minimum": 30, "default": 360, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "integer" }, { "attribute": "idle_timeout", "maximum": 999, "minimum": 5, "default": 60, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "integer" }, { "attribute": "password_aging_enabled", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "boolean" }, { "attribute": "password_aging_min_age", "maximum": 999, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "integer" }, { "attribute": "password_aging_max_age", "maximum": 999, "minimum": 1, "default": 30, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "integer" }, { "attribute": "idle_timeout_enabled", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "boolean" }, { "attribute": "session_timeout_enabled", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 0, "pattern": "", "enum": [
], "type": "boolean" }, { "attribute": "ui_settings", "maximum": 0, "minimum": 0, "default": 0, "multiple_of": 0, "min_length": 0, "max_length": 2048, "pattern": "", "enum": [
], "type": "string" } ], "count": 64 }, "data": { "type": "localusers", "id": "<string>", "attributes": { "uid": "<string>", "enabled": "<boolean>", "name": "<string>", "role_id": "<number>", "role_name": "<string>", "role": "<string>", "session_timeout": "<number>", "idle_timeout": "<number>", "session_timeout_enabled": "<boolean>", "idle_timeout_enabled": "<boolean>", "ip": "<string>", "mask": "<string>", "password": "<string>", "proto": "", "full_name": "< string > ", "contact": "< string > ", "description": "< string > ", "password_aging_enabled": "<boolean>", "password_aging_min_age": "<number>", "password_aging_max_age": "<number>", "preferred_timezone": "<string>", "preferred_language": "<string>", "preferred_date_format": "<enum, Date Format>", "preferred_time_format": "<enum, Time Format>", "preferred_temperature_unit": "<enum, Temperature Unit>", "preferred_pressure_unit": "<enum, Pressure Unit>" } } } |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete
One Local User |
URL |
|
Method |
|
URL Params |
By:
'name' Required:
|
Success Response |
{ |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete
Mutiple Local Users |
URL |
|
Method |
|
Data Params |
|
Success Response |
Code: 200 Content: { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided, the
service return the latest one |
Title |
Create
Local User |
URL |
|
Method |
|
Data Params |
{ |
Success Response |
Code: 201 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update
Local User |
URL |
|
Method |
|
URL Params |
By:
'name' Required:
|
Data Params |
{ |
Success Response |
Code: 200 { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
SNMPV1/V2C API endpoint enables creation and management ofg SNMP V1/V2 users. It
uses the following enums:
proto:
SNMP_PROTOCOL_V1
SNMP_PROTOCOL_V2
SNMP_PROTOCOL_V3
SNMP_PROTOCOL_NONE
Title |
GET
All SNMPv1/v2c Users |
URL |
|
Method |
|
Success Response |
Code: 200 Content: { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
GET
One SNMPv1/v2c User |
URL |
|
Method |
|
URL Params |
By: 'name' |
Success Response |
Code: 200 Content: { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete
One SNMPV1/V2C |
URL |
|
Method |
|
URL Params |
By:
'name' Required:
|
Success Response |
Code: 200 Content: { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete
Mutiple SNMPV1/V2c Users |
URL |
|
Method |
|
Data Params |
|
Success Response |
Code: 200 Content: { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
In case of partial success, the response shall include a list of successfully deleted ids and an errors object with error details. Code: <HTTP Error Code> Content: { "id":"<string, successfully deleted id>" ·
"id":"<string, successfully deleted id>" |
Title |
Create
SNMPv1/v2c User |
URL |
|
Method |
|
URL Params |
|
Data Params |
{ |
Success Response |
Code: 201 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update
SNMPv1/v2c user |
URL |
|
Method |
|
URL Params |
By:
'name' Required:
|
Data Params |
{ |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
This
API enables creation and management of SNMP V3 users. It uses the following enums:
proto:
SNMP_PROTOCOL_V1
SNMP_PROTOCOL_V2
SNMP_PROTOCOL_V3
SNMP_PROTOCOL_NONE
auth_proto:
SNMPV3_AUTH_NO_AUTH_NO_PRIV
SNMPV3_AUTH_AUTH_NOPRIV
SNMPV3_AUTH_AUTH_PRIV
priv_proto:
SNMPV3_PRIV_PROTO_DES
SNMPV3_PRIV_PROTO_AES
SNMPV3_AUTH_PROTO_MD5
SNMPV3_AUTH_PROTO_SHA
Title |
GET
All SNMPV3 Users |
URL |
|
Method |
|
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Get
One |
URL |
|
Method |
|
URL Params |
By: 'name' |
Success Response |
Code: 200 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete
One SNMPV3 User |
URL |
|
Method |
|
URL Params |
By:
'name' Required:
|
Success Response |
Code: 200 Content: { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Delete
Mutiple SNMP V3 Users |
URL |
|
Method |
|
Data Params |
|
Success Response |
Code: 200 Content: { |
Sample Call |
curl -i -H "Accept: application/vnd.api+json" http://localhost:3001/api/accounting |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
NOTE |
In case of partial success, the response shall include a list of successfully deleted ids and an errors object with error details. Code: <HTTP Error Code> Content: { "id":"<string, successfully deleted id>" ·
"id":"<string, successfully deleted id>" |
Title |
Create
SNMPv3 User |
URL |
|
Method |
|
Data Params |
{ |
Success Response |
Code: 201 { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Title |
Update
SNMPV3 User |
URL |
|
Method |
|
URL Params |
By:
'name' Required:
|
Data Params |
{ |
Success Response |
Code: 200
{ |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Change Password API enables changing the login password.
Title |
Change
Password |
URL |
|
Method |
|
URL Params |
By:
'name' Required:
|
Data Params |
{ |
Success Response |
Code: 200 Content: { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
Th
AAA Schemes API enables setting the preferred Accounting and AuthorizationScheme.
The available options are listed in the following enums:
accounting_scheme or authorization_scheme:
AAA_SCHEME_LOCAL_ONLY
AAA_SCHEME_REMOTE_ONLY
AAA_SCHEME_LOCAL_THEN_REMOTE
AAA_SCHEME_REMOTE_THEN_LOCAL
Title |
Get Accounting and Authorization Scheme |
URL |
|
Method |
|
Success Response |
Code: 200 Content: { |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
The
Remote Servers API enables creation and configuration of Accounting and
Authorization servers (RADIUS and LDAP). It uses the following enums:
schema:
RADIUS_AUTH_PAP
RADIUS_AUTH_CHAP
RADIUS_AUTH_MS_CHAP
server_type:
SERVER_TYPE_LDAP
SERVER_TYPE_RADIUS
ldap_type:
LDAP_TYPE_OPEN_LDAP
LDAP_TYPE_MS_ACTIVE_DIRECTORY
last_test_status:
TEST_STATUS_UNSPECIFIED
TEST_STATUS_NOT_TESTED
TEST_STATUS_SUCCESS
TEST_STATUS_FAIL
This
API retrieves the information of all configured Accounting and Authorization
servers
Title |
Get
All Accounyting and Authorization Servers |
URL |
|
Method |
|
URL Params |
additive filters
supported by device_id, device_name, group, purpose, parents, keywords Get all aaa_servers by
server_type
|
Data Params |
|
Success Response |
Code: 200 Content: { // For Radius only: "schema":"<enum, Radius Auth Schema>", // For LDAP only: "ldap_type":"<enum, LDAP Type>", |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
This
API retrieves the information of a specific Accounting and Authorization server
based on ID or name.
Title |
Get
ONE Accounting and Authorization Server |
URL |
|
Method |
|
URL Params |
By:
'name' Required:
|
Success Response |
Code: 200 Content: { // For Radius only: "schema":"<enum, Radius Auth Schema>", // For LDAP only: "ldap_type":"<enum, LDAP Type>", |
Version |
"Accept-Version: 1.0.0" – If no version provided,
the service return the latest one |
HTTP Code |
HTTP Description |
Details |
200 |
OK |
The request was completed
successfully |
400 |
Bad Request |
The request was not understood by
the server. e.g. improper syntax |
401 |
Unauthorized |
The request did not include an
authentication token or the token was expired |
403 |
Forbidden |
The user did not have permission
to access the requested entity |
404 |
Not Found |
The server could not locate the
requested entity |
409 |
Conflict |
The request could not be completed
due to a conflict; for example, attempting to create a user with a name that
already exists |
412 |
Precondition Failed |
The request did not meet a
pre-condition; for example, attempting to delete a role that is in use |
422 |
Unprocessable Entity |
The server was not able to process
the instructions contained in the request |
429 |
Too Many Requests |
Excessive requests were sent in a
given time period |
499 |
Client Closed Request |
The connection was closed while
the server was processing a request |
500 |
Internal Server Error |
The request was not completed due
to an internal error on the server side. |
501 |
Not Implemented |
The server lacks the functionality
required to fulfill the request |
503 |
Service Unavailable |
The server was unavailable |
504 |
Gateway Timeout |
The server did not receive a
timely response from the upstream server |
{
"errors": [
{
"code": <http
code, e.g: 400>,
"status": <http
status string, e.g: 'Bad Request'>,
"title": <general
error message>,
"detail": <detail
error message>
}
]
}
Keyword |
Description |
attribute |
Name of
attribute in the JSON API "data/attributes" section that validation
rules applied to. |
multipleOf |
The value of
"multipleOf" MUST be a number, strictly greater than 0.A numeric
instance is valid only if division by this keyword's value results in an
integer. |
maximum |
The value of
"maximum" MUST be a number, representing an inclusive upper limit
for a numeric instance.If the instance is a number, then this keyword
validates only if the instance is less than or exactly equal to
"maximum". |
minimum |
The
value of "minimum" MUST be a number, representing an inclusive
upper limit for a numeric instance.If the instance is a number, then this
keyword validates only if the instance is greater than or exactly equal to
"minimum". |
maxLength |
The
value of this keyword MUST be a non-negative integer. A string instance is
valid against this keyword if its length is less than, or equal to, the value
of this keyword. The length of a string instance is defined as the number of
its characters as defined by RFC 7159 [RFC7159]. |
minLength |
The
value of this keyword MUST be a non-negative integer. A string instance is
valid against this keyword if its length is greater than, or equal to, the
value of this keyword. The length of a string instance is defined as the
number of its characters as defined by RFC 7159 [RFC7159]. Omitting this
keyword has the same behavior as a value of 0. |
pattern |
The
value of this keyword MUST be a string. This string SHOULD be a valid regular
expression, according to the ECMA 262 regular expression dialect.A string
instance is considered valid if the regular expression matches the instance
successfully. Recall: regular expressions are not implicitly anchored. |
enum |
The
value of this keyword MUST be an array. This array SHOULD have at least one
element. Elements in the array SHOULD be unique.An instance validates
successfully against this keyword if its value is equal to one of the
elements in this keyword's array value.Elements in the array might be of any
value, including null. |
type |
The
value of this keyword MUST be one of the following types (
"boolean", "object", "array",
"number", or "string", "enum", "float","integer")
which matches any number with a zero fractional part. An instance validates
if and only if the instance is in any of the sets listed for this keyword. |