Chatee ahora con Soporte
Chat con el soporte

Foglight 6.1.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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

2

Warning

3

Critical

4

Fatal

Access-Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

Content-Type

String

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

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

Access- Token

String

The token is retrieved after successfully logging in to the Management Server.

Accept

String

Specifies the response data format which can be either application/json or application/xml. The default value is application/json.

status

String

The response status.

data

String

Either the response data format (JSON/XML) or exception message.

error

String

Error code if some exception occurs; otherwise this field is not shown.

Documentos relacionados

The document was helpful.

Seleccionar calificación

I easily found the information I needed.

Seleccionar calificación