It seems the 'alarms' endpoint in the API is limited to 500 results (current & historical). Is there anyway to page the results or add filtering?
There does not seem to be anything documented, we are on FogLight Evolve 9.0.
Thank you,
Patrick
It seems the 'alarms' endpoint in the API is limited to 500 results (current & historical). Is there anyway to page the results or add filtering?
There does not seem to be anything documented, we are on FogLight Evolve 9.0.
Thank you,
Patrick
Hi Patrick,
You can change it by modify Foglight registry REST_MaxObjectCount from default 500 to a higher value. (this is global change)
or you can add a URL parameter MaxObjectCount when you call such APIs.
Hope this helps
Regards
-Lee
Sorry it should be URL parameter not http header. Here are more about registry and URL parameter
There are some registry variable build in FMS to configure the REST API default configuration, below are the details:
Name
|
Description
|
---|---|
REST_Audit_Enable | Specfic whether enable audit feature in rest api. The audit log can be seen in audit dashboard. Default is enable; |
REST_Audit_Filter | Configure audit feature in resource. It will disable audit feature if you configure the resource name here. Separate resource's names with commas; The resource name means the part behind "api" in url. For example, if the REST API is http://serverURL:port/api/v1/topology/query, the resource means "topology/query"; Support regular expression; |
REST_MaxDepth | The global object expand depth, it is start from 0. Take 'Host' as example, if the max depth is 0, we will only return the name and the unique id of the host, and if the max depth is 1, we will show first level properties of the host. Default value is 1. |
REST_MaxObjectCount | Define how many objects will be invoked in a respond. A object means an instance which contains multiple properties. |
REST_RetrieveMetricCurrentValue | Define whether to retrieve metric current value of a toplogy object. |
REST_RetrieveObservationValue | Define whether to retrieve observation current value. |
REST_ShowLinks | Define whether to show links field in respond. Currently, there are two kinds of link: One is the link point the the object type; The other is the link point to the object itself; Default value is false; |
REST_TokenExpirationTime | Specific the token expired time, the unit is second, it will take effect when any token is accessed, such as new API login or server received any API request. |
REST_CrossOriginResourceAllowedDomain | Access-Control-Allow-Origin response header to allow request from third party integrated site, default is allow none |
REST_AccessControlAllowCredentials | The Access-Control-Allow-Credentials response header indicates whether or not the response to the request can be exposed to the page. It can be exposed when the true value is returned; it can't in other cases. |
REST_ShowTopologyTypeLocalProperties | Define whether to show the property of TopologyObject type in a instance. Default value is false; |
We provide some url parameter to temporary override the REST API default configuration, below are the details:
Name
|
Description
|
---|---|
maxObjectCount | Same as registry variable REST_MaxObjectCount |
maxDepth | Same as registry variable REST_MaxDepth. |
durationMS | It will change the time range duration, it is used to define the time range start and end time. If the "startTimeMS" not set, then the endTime will be now, and startTime will be endTime subtract the duration. This parameter will not affect Topology Query/Batch Query. |
startTimeMS | To define the startTime, the endTime will be the startTime plus durationMS. This parameter will not affect Topology Query/Batch Query. |
retrieveMetricValue | Same as registry variable REST_RetrieveMetricCurrentValue |
retrieveObservationValue | Same as registry variable REST_RetrieveObservationValue |
showLinks | Same as registry variable REST_ShowLinks |
excludePropertyPatterns |
To exclude the properties in topology object. Example: http://server:port/api/v1/type/Host/instances?excludePropertyPatterns=.*Alarm.*,.*State.* [Note]: Above url will exclude property which name include "Alarm" and "State" |
includePropertyPatterns |
To include the properties in topology object. Example: http://server:port/api/v1/type/Host/instances?includePropertyPatterns=.*Alarm.*,.*State.* [Note]: Above url will include property which name include "Alarm" and "State"; If bout "excludePropertyPatterns" and "includePropertyPatterns" are set with the same key, then the same key in "excludePropertyPatterns" will be ignore. |
showTopologyTypeLocalProperties | Define whether to show the property of Topology type in a instance. |