GET /API/Pagespeed/History

Basic Intro

Returns testing history for an existing Pagespeed test on your account. NOTE: Authentication and a valid plan required

Parameters
Parameter Type Default Value Restrictions Description Required
id Integer - - The ID of the test - Leave empty to retrieve all tests. Yes
days Integer 1 Between 1 and 14 [Plan restrictions apply] Amount of days to look up. No

Response Codes

Success

  • HTTP 200 - Success - The results can be found in the data output.

User Error

  • HTTP 400 - Request Failed - Generic Error: Please check output for more information.
  • HTTP 404 - Not Found - Nothing was found on this account.
  • HTTP 405 - Invalid Method - Invalid method used. Only supports GET.

Account Issues

  • HTTP 401 - Authorization Required - Provide Correct Username and API key
  • HTTP 402 - Payment Required - You do not have access to this function. Check your account for more information.
  • HTTP 429 - API Usage Limit Exceeded - Your limit was exceeded. Check your account for more information.

Example Output

The output is returned as a json array

{
    "success": true,            // Returns false on error
    "message": "",              // Additional information, if available
    "data": {
        "aggregated": {
            "loadtime_ms": {        // Calculated aggregate data for loadtime (in ms)
                "min": 162,
                "avg": 410.292,
                "max": 3344
            },
            "requests": {           // Calculated aggregate data for request count
                "min": 8,
                "avg": 8.129,
                "max": 9
            },
            "filesize_kb": {        // Calculated aggregate data for total filesize (in kb)
                "min": 160.513,
                "avg": 161.654,
                "max": 169.342
            },
            "results": 74           // Amount of results returned
        },
        "results": {
            "1509796703": {                                 // Unix timestamp key
                "time_unix": 1509796703,                    // Unix timestamp of test
                "time_utc": "2017-11-04T11:58:23+00:00",    // Human-readable format, UTC timezone
                "loadtime_ms": 361,                         // Loadtime in ms
                "requests": 9,                              // Request count
                "filesize_kb": 169.342                      // Total filesize in kb
            },
            "1509797924": { … },
            "1509799079": { … },
            …
        }
    }
}