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/tokenContent-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> |