Chat now with support
Chat with Support

Foglight 7.3.0 - REST API Reference Guide

Alarm

The Alarm related APIs include the following:

API Name: Acknowledge alarm by alarm ID
Description: Acknowledge an alarm by its ID.
API path: /api/v1/alarm/ack/alarmId
Sample usage: http://<server>:<port>/api/v1/alarm/ack/1f478dec-f920-4da9-a8d2-b9ba0dcd4394
API Name: Clear alarm by alarm ID
Description: Clear an alarm by its ID.
API path: /api/v1/alarm/clear/alarmId
Sample usage: http://<server>:<port>/api/v1/alarm/clear/1f478dec-f920-4da9-a8d2-b9ba0dcd4394
API Name: Get alarm by alarm ID
Description: Filter out alarms by alarm ID.
API path: /api/v1/alarm/alarmId
Sample usage: http://<server>:<port>/api/v1/alarm/1f478dec-f920-4da9-a8d2-b9ba0dcd4394
API Name: Get alarm by rule ID.
Description: Filter out alarms by a rule ID. Time range is the default value set in the Management Server, and you can customize the time range using the startTimeMS and durationMS parameter.
API path: /api/v1/alarm/ruleId/ruleId
Sample usage: http://<server>:<port>/api/v1/alarm/ruleId/se478dec-f920-4de9-a8d2-b9ba0dcasd94
API Name: Get current alarms
Description: Filter out current alarms.
API path: /api/v1/alarm/current
Sample usage: http://<server>:<port>/api/v1/alarm/current
API Name: Get history alarms
Description: Filter out all history alarms.
API path: /api/v1/alarm/history
Sample usage: http://<server>:<port>/api/v1/alarm/history
API Name: Get topology object current alarms
Description: Filter out current alarms by the ID of a topology object.
API path: /api/v1/alarm/current/topologyId
Sample usage: http://<server>:<port>/api/v1/alarm/current/se478dec-f920-4de9-a8d2-b9ba0dcasd94
API Name: Get topology object history alarms
Description: Filter out history alarms by the ID of a topology object.
API path: /api/v1/alarm/history/topologyId
Sample usage: http://<server>:<port>/api/v1/alarm/history/se478dec-f920-4de9-a8d2-b9ba0dcasd94
API Name: Push alarms
Description: Push an alarm to an existing topology object, and the imported alarm will show on the Alarm dashboard. The “topologyObjectId” field is mandatory and the "ruleId" field is optional. This API set the value of “ruleId” to ExternalAlarm by default, if this field is not set. If you invoke this API using both fields, ensure that ruleId is properly defined to link with its topologyObjectId; otherwise the alarm might be imported into a wrong topology object. Consider for example a rule “CPU Utilization” is related to the "HostCPUs" object. If you define topologyObjectId to Host, this API imports CPU Utilization to the Host object. Postman provides "Alarm - Push Alarm XML" and "Alarm - Push Alarm JSON” sample codes for reference. Click here to download and import the sample codes.
API path: /api/v1/alarm/pushAlarm
Sample usage: When using the pushAlarm API, note the following:
Make sure to use the following as the value of alarmMessage: AAA. BBB. AAA represents the title of the alarm dialog box, while BBB stands for the alarm message. Make sure to add a space between “.” and “BBB”.
To get the value of ruleId, do either of the following:
Execute the following scripts in the Administration > Tooling > Script Console dashboard:
def ruleName = <RULE_NAME>

Request body in XML:

Request body in JSON

API Name: Push alarms by properties
Description: Push alarms based on the properties of a topology object.
API path: /api/v1/alarm/pushAlarmByProperties
Sample usage: The following illustrates the sample code of request body in XML and JSON separately.

Request body in XML:

Request body in JSON

API Name: Push alarms by query
Description: Push alarms using the query.
API path: /api/v1/alarm/pushAlarmByQuery
Sample usage: The following illustrates the sample code of request body in XML and JSON separately.

Request body in XML:

Request body in JSON

Cartridge

The Cartridge related APIs include the following:

API Name: Get all cartridge’s data
Description: Get data of all cartridges.
API path: /api/v1/cartridge/allCartridges
Sample usage: http://<server>:<port>/api/v1/cartridge/allCartridges
API Name: Get all core cartridge’s data
Description: Get data of all the core cartridges.
API path: /api/v1/cartridge/allCartridges/core
Sample usage: http://<server>:<port>/api/v1/cartridge/allCartridges/core
API Name: Get all non-core cartridge’s data
Description: Get data of all the non-core cartridges.
API path: /api/v1/cartridge/allCartridges/nonCore
Sample usage: http://<server>:<port>/api/v1/cartridge/allCartridges/nonCore

Registry

The Registry related API includes the following:

API Name: Get all registries’ data
Description: Get data of all registries.
API path: /api/v1/registry/allRegistries
Sample usage: http://<server>:<port>/api/v1/registry/allRegistries

Remote client

The Remote related API includes the following:

API Name: Get all remote clients’ data
Description: Get data of all the remote clients.
API path: /api/v1/remoteClient/allRemoteClients
Sample usage: http://<server>:<port>/api/v1/remoteClient/allRemoteClients

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating