Performance API behavior:
If time difference between start and stop time in the query
- is more than a day, then each record will contain a day information(i.e, 0-23hrs) and timestamp shows respective date information.
-
less than 24hrs, then each record will contain 1 hr (i.e 0-55minutes) data and in timestamp respective hour information will be shown.
API Illustration:
Example-1:
https://{{server}}/api/v1/{{device_types}}/XX:XX:XX:XX:XX:XX/performance?start_time=2018-08-06T10:00:00&stop_time=2018-08-07T10:00:00
In the above api, we are querying from 6 to 7 date performance data. Based on the given time-stamp for Aug 6th records 14hrs data will be be shown (i.e, 9-23), for 7th record 10hrs data will be shown(i.e, 0-9).
Below are the records with timestamp.
"timestamp": "2018-08-06T00:00:00+00:00"
"dl_throughput": {
"9": 3.325,
"10": 4.32636,
"11": 7.1675,
"12": 3.51583,
"13": 4.47833,
"14": 3.34545,
"15": 3.33167,
"16": 3.3475,
"17": 3.33083,
"18": 3.355,
"19": 3.33667,
"20": 3.33667,
"21": 3.33583,
"22": 3.34167,
"23": 3.33
},
"timestamp": "2018-08-07T00:00:00+00:00"
"dl_throughput": {
"0": 3.35167,
"1": 3.3275,
"2": 3.34167,
"3": 3.3425,
"4": 3.335,
"5": 3.33667,
"6": 3.35333,
"7": 3.33833,
"8": 3.37583,
"9": 3.325
}
Example-2:
If we want to get data for every 5minutes we have to give start_time & stop_time range less than 24hrs.
https://{{server}}/api/v1/{{device_types}}/XX:XX:XX:XX:XX:XX/performance?start_time=2018-08-07T17:00:00&stop_time=2018-08-07T17:00:00.
With this api can get only 17th hour data for every 5minutes.
ouput will be like below: Here keys will be minutes info.
timestamp": "2018-08-07T17:00:00+00:00",
"dl_throughput": {
"0": 3.43,
"5": 3.33,
"10": 3.38,
"15": 3.31,
"20": 3.33,
"25": 3.37,
"30": 3.34,
"35": 3.31,
"40": 3.17,
"45": 3.54,
"50": 3.35,
"55": 3.11
}
Now going back to your example output, you queried for 7days data, hence each record will contain 24hrs information.you can refer the timestamp attribute in response. If you want to query data for every 5minutes, you will need to adjust start_time, stop_time range as below in order to get 3 records, each record contains 1 hr data.
start_time=2018-08-07T7:00:00&stop_time=2018-08-07T10:00:00.