POST /API/Pagespeed/Update

Basic Intro

Create a new Pagespeed test on your account. NOTE: Authentication and a valid plan required

Parameters

Optional parameters will use the default value if they are not included

Parameter Type Default Restrictions Description Required
name String - - A descriptive name for this test YES
website_url String - Must be a valid URL URL that should be checked YES
location_iso String - Valid: PRIVATE, AU, CA, DE, IN, NL, SG, UK, US 2-letter ISO code of the location YES
private_name String - Must select PRIVATE in location_iso. Must have private server Name of private server [NOT YET IMPLEMENTED] No
checkrate Integer - Valid: 1, 5, 10, 15, 30, 60, 1440 [Plan restrictions apply] Checkrate in minutes YES
contact_groups String <empty> String of positive integers, separated with a comma. IDs of selected Contact Groups. No
alert_smaller Integer 0 Positive numbers only. Set to 0 to disable. Size in kb, will alert to Contact Groups if actual size is smaller. No
alert_bigger Integer 0 Positive numbers only. Set to 0 to disable. Size in kb, will alert to Contact Groups if actual size is bigger. No
alert_slower Integer 0 Positive numbers only. Set to 0 to disable. Time in ms, will alert to Contact Groups if actual time is slower. No

Response Codes

Success

  • HTTP 200 - Success - The new test was created. The ID can be found in the data.

User Error

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

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": {
        "new_id": 1234  // The ID of the newly created test
    }       
}