The Rule related APIs include the following:
• |
API Name: Get all rules’ data |
• |
Description: Get data of all rules. |
• |
Request type: GET |
• |
API path: /api/v1/rule/allRules |
• |
Sample usage: http://<server>:<port>/api/v1/rule/allRules |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: Get rule by ID |
• |
Description: Filter out rules by a rule ID. |
• |
Request type: GET |
• |
API path: /api/v1/rule/ruleId |
• |
Sample usage: http://<server>:<port>/api/v1/rule/ruleId |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown |
The Script related API includes the following:
• |
API Name: Run Script |
• |
Description: You need be granted both the Administrator and API Access roles to use this API. This API is similar to the script console, but it does not support functionHelper, log, and out variables that are supported in the script console. |
Specifies the name of associated cartridge, and the name is case-sensitive. | |
Specifies the scope object. This item must be set if the scope variable is being used in scripts. |
• |
Request type: POST |
• |
API path: /api/v1/script/runScript |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: Run named scripts |
• |
Description: Foglight supports embedding named scripts into cartridges by editing the monitoring policy XML. This API is used to call those named scripts. |
• |
Request type: GET |
• |
API path: /api/v1/script/runNamedScript?scriptName=<namedScriptName>¶m=<script_parameter> |
• |
Sample usage: Consider for example there is a named script called 'getHostById', this named script requires the host instance id which type is string, then the sample API should be following: http://sever_url:port/api/v1/script/runNamedScript?scriptName=getHostById¶m=b1b3ad72-2460-4576-b1ec-3ffd57016deb. |
The token is retrieved after successfully logging in to the Management Server. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
The Subscribe related APIs include the following:
• |
API Name: Disconnect SSE |
• |
Description: Disconnect all the active Server-Sent Events (SSE) subscriptions. |
• |
Request type: GET |
• |
API path: /api/v1/subscription/disconnect/all/ |
• |
Sample usage: http://<server>:<port>/api/v1/subscription/disconnect/all/ |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: List SSE |
• |
Description: Filter out all the active SSE subscriptions. |
• |
Request type: GET |
• |
API path: /api/v1/subscription/list/ |
• |
Sample usage: http://<server>:<port>/api/v1/subscription/list |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: Subscribe alarms by object ID |
• |
Description: Watch the topology object by its topologyId, and subscribe to alarm-generated events through SSE. When the client is disconnected, there is no retry mechanism to send an event to the client. For more information, visit Server-Sent Events (SSE) Support and Server-Sent Events. |
NOTE: If the version of your Foglight Management Server is lower than 5.7.5.7, open the server.xml file under <fms_home>/server/tomcat/, then add asyncSupported="true" to all value items (for example, <Valve className="com.quest.nitro.web.tomcat.HttpsRedirectValve" asyncSupported="true"/>). |
• |
Request type: GET |
• |
API path: /api/v1/subscription/alarm/subscribe/topologyId |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: Subscribe to all alarms |
• |
Description: Subscribe to alarm-generated events through SSE. When the client is disconnected, there is no retry mechanism to send an event to the client. For more information, visit Server-Sent Events (SSE) Support and Server-Sent Events. |
NOTE: If the version of your Foglight Management Server is lower than 5.7.5.7, open the server.xml file under <fms_home>/server/tomcat/, then add asyncSupported="true" to all value items (for example, <Valve className="com.quest.nitro.web.tomcat.HttpsRedirectValve" asyncSupported="true"/>). |
• |
Request type: GET |
• |
API path: /api/v1/subscription/alarm/subscribe |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
The Topology related APIs include the following:
• |
API Name: Get properties’ value |
• |
Description: Get properties of one topology object based on path. This topology object is specified by uniqueId. |
• |
Request type: GET |
• |
API path: /api/v1/topology/topologyId/paths |
• |
Sample usage: http://<server>:<port>/api/v1/topology/3546fa55-11b6-4943-b7cb-84ddcf350bc5/paths?path=name&path=uniqueId&path=utilization |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: Get property value |
• |
Description: Get property values by the path defined based on the given topology ID. The result may be DataObject, Primitive Object, Observation, or else. |
• |
Request type: GET |
• |
API path: /api/v1/topology/topologyId/path |
• |
Sample usage: http://<server>:<port>/api/v1/topology/abc94b3d-f599-4766-a979-f32d372ff47d/cpus/utilization |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: Get topology object by IDs |
• |
Description: Filter out topology objects by an object ID. |
• |
Request type: GET |
• |
API path: /api/v1/topology/topologyObjectId |
• |
Sample usage: http://<server>:<port>/api/v1/topology/1f478dec-f920-4da9-a8d2-b9ba0dcd4394 |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: Get topology object by ids |
• |
Description: Filter out topology objects by multiple IDs. |
• |
Request type: GET |
• |
API path: /api/v1/topology/topologyIds |
• |
Sample usage: http://<server>:<port>/api/v1/topology/topologyIds?Id=3546fa55-11b6-4943-b7cb-84ddcf350bc5&Id=67beea68-fa6f-4cd3-b122-dcb20db50360 |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: Observations query |
• |
Description: Filter out observations value by a batch query. The following lists the retrievalType: |
Retrieve the raw data of an observation based on the time range. | |
Retrieve the aggregate data of an observation based on the time range. | |
Retrieve the aggregate and last data of an observation based on the time range. | |
Retrieve the last N data of the observation based on the time range. If retrievalType is set to LAST_N, you need configure the value of numberOfValue that defines the letter N of LAST_N. |
• |
Request type: POST |
• |
API path: /api/v1/topology/batchQuery |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: TopologyObject query |
• |
Description: Filter out topology objects by a batch query. |
• |
Request type: POST |
• |
API path: /api/v1/topology/query |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Specifies the response data format which can be either application/json or application/xml. The default value is application/json. |
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
API Name: Push data |
• |
Description: Push data to an existing topology object. The request body should be RAW data and the basic format can be set as below: |
• |
Ensure that the data type (typeName) already exists in the server; otherwise this operation will fail. |
• |
For the Observation type (including Metric) data, the data start time and end time use startTime and endTime in the request body. |
• |
If you see the message like “The rest agent cache queue is full...” in the log file, increase the value of the REST_AgentSubmitInfoQueueSize Registry Variable, and then run the following script in the Run Script dialog box. To run the following script, ensure that the value of Choose an Associated Cartridge (Optional) is set to Forge-RestAPI in the Administration > Tooling > Script Console > Scripts > Add > Run Script dialog box. |
• |
Request type: POST |
• |
API path: /api/v1/topology/pushData |
• |
The token is retrieved after successfully logging in to the Management Server. | ||
Either the response data format (JSON/XML) or exception message. | ||
Error code if some exception occurs; otherwise this field is not shown. |
• |
Case 1: Create a general topology type instance. Consider for example we create an FSMAgentBlackout type instance. Find the identity of type FSMAgentBlackout is name in the Schema Browser dashboard. Use the following request body to create the FSMAgentBlackout type instance. |
• |
Case 2: Create a Host instance. If you want to submit Host type data, the name property is mandatory while vmId and systemId properites are optional. You can set both optional properties if you know their values. hostId is automatically generated based upon values of name, systemId, and vmId, so it is not required to set manually. |
• |
Case 3: Create a type instance which identity property is a topology object. Consider for example we create a HostProcess type instance. In the Schema Browser dashboard, find the identity properties of type HostProcess are name and os. The name property is a string, while the os property is OperatingSystem which is a topology type. Use the uniqueId of OperatingSystem as the reference, then create the HostProcess type instance as follows. |
• |
Case 4: Create a custom type instance. Consider for example we have imported the below type definition in the Add Topology Type dashboard. |
• |
Case 5: Consider for example we have the following type definition. |
• |
Case 6: Consider for example we have the following type definition. |
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. 使用条款 隐私 Cookie Preference Center