This API is used to obtain the downtime data use of a monitor or a monitor group requested by the user for a specific period of time.
API for XML Response
https://[HOST]:[PORT]/AppManager/xml/GetDowntimeDetails?apikey=[API Key ]&type=[value]&period=[period]&resourceid=[resourceid]&showFullDetails=true
API for JSON Response
https://[HOST]:[PORT]/AppManager/json/GetDowntimeDetails?apikey=[API Key ]&type=[value]&period=[period]&resourceid=[resourceid]&showFullDetails=true
Supported HTTP methods: GET
Allowed roles: Administrator, Operator, User
Field | Description |
---|---|
apikey | The key generated using the Generate API Key option in the Settings tab. |
resourceid | The resource id of the monitor, using which you can ping the host corresponding to the monitor. You can get downtime details for multiple resource ids by using comma separated values. |
period |
The period for which the downtime details have been requested: Period: 0 ===> Today Period: 3 ===> Yesterday Period: 6 ===> This Week Period: 1 ===> Last 7 days Period: 12 ===> Last Week Period: 7 ===> This Month Period: 2 ===> Last 30 days Period: 11 ===> Last Month Period: 4 ===> Custom time period |
type | The Type parameter is used to list all the monitors in a specified monitor type. Possible values can be Linux, Windows XP, MYSQL-DB-server, Apache-server, UrlMonitor, Tomcat-server, etc. |
showFullDetails | An optional parameter used to specify if user needs downtime details on a daily basis as additional data in response. Values are true or false (false dy default). |
startTimeInMillis | This parameter is used to get the Starting time in milliseconds |
endTimeInMillis | This parameter is used to get the Ending time in milliseconds |
XML Input
https://apm-prod-server:8443/AppManager/xml/GetDowntimeDetails?apikey=aaaaaabbbbbbccccccddddddeeeeee&type=windows&period=6&resourceid=10000135&showFullDetails=true
http://localhost:9240/AppManager/json/GetDowntimeDetails?showFullDetails=true&period=4&resourceid=10000191&apikey=085b7816b06b714132b812a9b2e62c26&startTimeInMillis=1669419000000&endTimeInMillis=1669591800000
XML Response
<AppManager-response uri="/AppManager/xml/GetDowntimeDetails"> <result> <response response-code="4000"> <Monitor AvailabilityMessage="-" AvailabilitySeverity="-"DisplayName="app-centos5-64- 2" DownPercent="0.12" Period="20"ResourceId="10000143" SchedulePercent="0.0"TotalDownTimeInSecs="300" UnmanagePercent="0.0" UpPercent="99.88"/> </response> </result> </AppManager-response>
JSON Input
https://apm-prod-server:8443/AppManager/xml/GetDowntimeDetails?apikey=aaaaaabbbbbbccccccddddddeeeeee&type=windows&period=4&resourceid=10000135&showFullDetails=true
http://localhost:9240/AppManager/json/GetDowntimeDetails?showFullDetails=true&period=4&resourceid=10000191&apikey=085b7816b06b714132b812a9b2e62c26&startTimeInMillis=1669419000000&endTimeInMillis=1669591800000
JSON Response
{"response":{"result":[{"AvailabilityMessage":"-","SchedulePercent":"0.0","DisplayName":"appcentos5-64-2","ResourceId":"10000143","UnmanagePercent":"0.0",
"AvailabilitySeverity":"-","TotalDownTimeInSecs":"300","DownPercent":"0.12","UpPercent":"99.88","Period":"20"}],"uri":"/AppManager/json/GetDowntimeDetails"},"response-code":"4000"}
XML Input
https://apm-prod-server:8443/AppManager/xml/GetDowntimeDetails?apikey=aaaaaabbbbbbccccccddddddeeeeee&period=20&resourceid=10000110,10000171,10000108&showFullDetails=true
XML Response
<AppManager-response uri="/AppManager/xml/GetDowntimeDetails">
<result>
<response response-code="4000">
<Monitor AvailabilityMessage="-" AvailabilitySeverity="-" DisplayName="172.24.116.154_PGSQL"
DownPercent="0.0" Period="20" ResourceId="10000108" SchedulePercent="0.0"
TotalDownTimeInSecs="0" UnmanagePercent="0.0" UpPercent="100.0"/>
<Monitor AvailabilityMessage="-" AvailabilitySeverity="-" DisplayName="AppManager Home Page"
DownPercent="0.0" Period="20" ResourceId="10000110" SchedulePercent="0.0"
TotalDownTimeInSecs="0" UnmanagePercent="0.0" UpPercent="100.0"/>
<Monitor AvailabilityMessage="-" AvailabilitySeverity="-" DisplayName="Localhost"
DownPercent="0.0" Period="20" ResourceId="10000171" SchedulePercent="0.0"
TotalDownTimeInSecs="0" UnmanagePercent="0.0" UpPercent="100.0"/>
</response>
</result>
</AppManager-response>
Field | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AvailabilityMessage | The current availability RCA message of the resource. | ||||||||||||||||||||||||||||
SchedulePercent | The total scheduled downtime percentage of the resource. | ||||||||||||||||||||||||||||
DisplayName | The display name of the resource. | ||||||||||||||||||||||||||||
ResourceId | The resource id of the monitor, using which you can ping the host corresponding to the monitor. | ||||||||||||||||||||||||||||
UnmanagePercent | The total unmanaged downtime percentage of the resource. | ||||||||||||||||||||||||||||
TotalDownTimeInSecs | The total number of Seconds of Downtime. | ||||||||||||||||||||||||||||
AvailabilitySeverity | The current availability severity of the resource. | ||||||||||||||||||||||||||||
DownPercent | The total downtime percentage of the resource. | ||||||||||||||||||||||||||||
UpPercent | The total uptime percentage of the resource. | ||||||||||||||||||||||||||||
Period |
The period for which the downtime details have been requested: Period: 0 ===> Today Period: 3 ===> Yesterday Period: 6 ===> This Week Period: 1 ===> Last 7 days Period: 12 ===> Last Week Period: 7 ===> This Month Period: 2 ===> Last 30 days Period: 11 ===> Last Month Period: 4 ===> Custom time period |
||||||||||||||||||||||||||||
Downtimes ( displayed only when requested for FullDetails) |
|
Note: Refer here to learn more about Availability report calculation.