URL

GET https://{api-url}/api/v2/tenants/{tenantId}/resources/{resourceId}/availability

Sample URLs

https://{api-url}/api/v2/tenants/client_4/resources/210269bf-28b0-4d39-ad4d-d4ef3ebb738d/availability?startTime=1493620027&endTime=1493622540

To view availability of a resource within a given time frame, provide the start time and end time.

Parameters

Both fields are mandatory:

FieldData TypeDescription
startTimeStringstartTime indicates the from date. (Convert the time frame to Epoch timestamp.)
For example, if 12 Dec 2018 10:00 AM is the start time, then epoch timestamp is 1544608800
endTimeStringendTime indicates the to date.
For example, if 17 Dec 2018 12:00 PM is the end time, then epoch timestamp is 1545048000

Status code

200 OK

Sample response

{

	"totalAvailability": 2.2682053322721845,
	"totalDowntime": 2456,
	"totalLogList": [{
			"key": "0443e878-92fb-4401-82b3-97bd961d50e5",
			"startTs": 1493622507,
			"endTs": 1493622540,
			"actStartTs": 1493622507,
			"state": 0,
			"rca": false,
			"schStartTs": 0,
			"schEndTs": 0
		},
		{
			"key": "0443e878-92fb-4401-82b3-97bd961d50e5",
			"startTs": 1493620027,
			"endTs": 1493622450,
			"actStartTs": 1493620027,
			"state": 0,
			"rca": false,
			"schStartTs": 0,
			"schEndTs": 0
		}
	],
	"downTimeList": [{
			"key": "0443e878-92fb-4401-82b3-97bd961d50e5",
			"startTs": 1493622507,
			"endTs": 1493622540,
			"actStartTs": 1493622507,
			"state": 0,
			"rca": false,
			"schStartTs": 0,
			"schEndTs": 0
		},
		{
			"key": "0443e878-92fb-4401-82b3-97bd961d50e5",
			"startTs": 1493620027,
			"endTs": 1493622450,
			"actStartTs": 1493620027,
			"state": 0,
			"rca": false,
			"schStartTs": 0,
			"schEndTs": 0
		}
	],
	"noOfOccurences": 2,
	"noOfPauseOccurences": 0,
	"degradedTimeList": [],
	"noOfDegradedOccurences": 0,
	"totalDegradedTime": 0,
	"pauseTimeList": [],
	"currentState": "down",
	"totalPauseTime": 0
}