API response changes while using Custom Time Period in Reports

API response changes while using Custom Time Period in Reports

If you've chosen a custom time period for generating a Summary report, Availability Summary report, or Performance report, and the resultant reporting range is equivalent to that of a system-provided time range, then the final API JSON response data will look similar to that of the system-provided time range.

For example, let's say you've specified a custom date range from 1st Dec, 2018 to 10th Dec, 2018 in your Performance report. Site24x7's reporting engine will automatically equate this period with the system-provided time period "This Month".

(Before the update) This is how the info node in the JSON response looked for Custom Period
  • {
      "code": 0,
      "message": "success",
      "data": {
        "info": {
          "formatted_end_time": "December 10, 2018 12:00 AM IST",
          "monitor_type": "URL",
          "resource_id": "xxxxxxxxxxxxxxxx",
          "resource_type_name": "xxxxx",
          "period_name": "Custom Period",
          "generated_time": "2018-12-10T15:18:09+0530",
          "metric_aggregation_name": "Average",
          "report_name": "Performance Report",
          "end_time": "2018-12-10T00:00:00+0530",
          "start_time": "2018-12-01T00:00:00+0530",
          "period": 50,
          "resource_name": "1232",
          "segment_type_name": "Hour of Day",
          "formatted_start_time": "December 1, 2018 12:00 AM IST",
          "formatted_generated_time": "December 10, 2018 3:18 PM IST"
        }
      }
    }
(Post the update) This is how the info node in the JSON response looks for Custom Period
  • {
    "code": 0,
    "message": "success",
    "data": {
    "info": {
    "formatted_end_time": "December 10, 2018 12:00 AM IST",
    "monitor_type": "URL",
    "resource_id": "xxxxxxxxxxxxxx",
    "resource_type_name": "xxxxxx",
    "period_name": "This Month",
    "generated_time": "2018-12-10T15:18:09+0530",
    "metric_aggregation_name": "Average",
    "report_name": "Performance Report",
    "end_time": "2018-12-10T00:00:00+0530",
    "start_time": "2018-12-01T00:00:00+0530",
    "period": 13,
    "resource_name": "1232",
    "segment_type_name": "Hour of Day",
    "formatted_start_time": "December 1, 2018 12:00 AM IST",
    "formatted_generated_time": "December 10, 2018 3:18 PM IST"
    }
    }
    }
Note: If you carefully notice the attributes in the info node, only the period name and period constant has changed.

    • Related Articles

    • API exceeded error

      Why do I get an API exceeded error after a few attempts? Every API has a certain limit to the number of requests a user can hit within a period of time, called the rate limit. An error message is triggered when a user does one of the following ...
    • List of granularity supported for each time period in Site24x7 reports

      Site24x7 offers raw, hour, day, week and month based reports for selected time periods. The detailed matrix is provided below: TIME PERIOD OPTIONS GRANULARITY SUPPORTED DEFAULT OPTION Last 1 Hour Raw, Hour Raw Last 6 Hours Raw, Hour Raw Last 12 Hours ...
    • Why is my website response time too high from China?

      If your website is hosted outside China and you have chosen China as the location for monitoring, then the website response time will be high. This is because of the Great Firewall policy followed by China wherein, all the data coming from outside ...
    • How to download the saved search data using API

      Use the below API to download saved search data in CSV or JSON format: https://www.site24x7.com/api/applog/saved_searches/download/<search_id>/<from_date>/<to_date>?data_format=json&range=1-100&order=desc The following are the field values passed to ...
    • Calculating average availability and response time SLAs in Executive Summary SLA reports

      Site24x7's Executive Summary SLA Report lets you gather comprehensive updates on availability and response time SLA targets achieved by individual monitors in your monitor group for a selected time period. You can additionally baseline your actual ...