POST   checks/browser

Creates a new browser check.

Remarks

Use GET checks/browser/locations route to get the list of values applicable for location_code.
Use GET groups route to get sub-groups ids applicable monitor_groups_ids.

Thresholds

There is a set of properties (each starts with threshold_) used for thresholds definition. Read more on thresholds here.

Scheduled Inclusion/Exclusion

The scheduled_inclusion and scheduled_exclusion parameters define specific day/time ranges when the check will run or not run respectively.
If no value specified (or null) it means 'always' for scheduled_inclusion and 'none' for scheduled_exclusion. Read more on the schedule syntax here.

Interval

The interval_seconds field defines the frequency of running check. If no value specified (or null), the check will run with default interval. Set interval_seconds = 0 if the check should run manually.

Returns HTTP 201 when created (the Location header must contain URL to the new check).

Request example and description

curl --request POST "https://api-asm1.apica.io/v3/checks/browser?auth_ticket=C471ADC4-19B4-4219-BBF4-671A97EC653E" --header "Content-Type: application/json" --data-raw "{
  \"url\": \"apica.io\",
  \"result_mode\": 0,
  \"custom_hdrs\": {
    \"X-check-id\": \"%CHECK_ID%\",
    \"X-private-req\": \"true\"
  },
  \"block_domains\": [
    \"fast.com\",
    \"fast2.com\"
  ],
  \"allow_domains\": [
    \"apica.io\",
    \"apica2.io\"
  ],
  \"stop_urls\": [
    \"fast3.com\",
    \"fast1.com\"
  ],
  \"screen_resolution\": \"1280x1024x24\",
  \"screenshot_mode\": \"OnTransition\",
  \"blurring_mode\": 1,
  \"ignore_file_types\": [
    {
      \"status_codes\": \"404,5*\",
      \"types\": \"png,gif,jp*\"
    },
    {
      \"status_codes\": \"404,5*\",
      \"types\": \"png,gif,jp*\"
    },
    {
      \"status_codes\": \"404,5*\",
      \"types\": \"png,gif,jp*\"
    }
  ],
  \"ignore_mime_types\": [
    {
      \"status_codes\": \"404,5*\",
      \"types\": \"png,gif,jp*\"
    },
    {
      \"status_codes\": \"404,5*\",
      \"types\": \"png,gif,jp*\"
    },
    {
      \"status_codes\": \"404,5*\",
      \"types\": \"png,gif,jp*\"
    }
  ],
  \"url_severity_mapping\": [
    {
      \"url_format\": \"wildcard\",
      \"url\": \"www.example.com*\",
      \"status_codes\": \"5*, 404\",
      \"severity\": \"F\"
    },
    {
      \"url_format\": \"wildcard\",
      \"url\": \"www.example.com*\",
      \"status_codes\": \"5*, 404\",
      \"severity\": \"F\"
    },
    {
      \"url_format\": \"wildcard\",
      \"url\": \"www.example.com*\",
      \"status_codes\": \"5*, 404\",
      \"severity\": \"F\"
    }
  ],
  \"url_severity_mapping_preserve_time\": true,
  \"url_severity_mapping_error_wildcard\": 0,
  \"fail_over\": true,
  \"name\": \"Test check\",
  \"description\": \"It is a test check.\",
  \"monitor_groups_ids\": [
    34,
    35,
    36
  ],
  \"interval_seconds\": 3600,
  \"interval_manual\": true,
  \"max_attempts\": 3,
  \"attempt_pause\": 30000,
  \"location_code\": \"b8dce6d7-2222-1111-92e9-4a98eb706b13|europe.northern-europe.se.na.stockholm.ipv6-aaaaa|chromium|87\",
  \"secondary_location_codes\": null,
  \"Timezone\": 1,
  \"check_fail_severity\": \"F\",
  \"threshold_w\": 15000,
  \"threshold_w_set_0\": true,
  \"threshold_w_dynamic\": {
    \"baseline_measure\": \"avg\",
    \"baseline_period_h\": 2,
    \"factor\": 2.0,
    \"offset\": 0
  },
  \"threshold_e\": 25000,
  \"threshold_e_set_0\": false,
  \"threshold_e_dynamic\": {
    \"baseline_measure\": \"avg\",
    \"baseline_period_h\": 2,
    \"factor\": 2.0,
    \"offset\": 0
  },
  \"threshold_lo_w\": 5000,
  \"threshold_lo_w_set_0\": true,
  \"threshold_lo_w_dynamic\": {
    \"baseline_measure\": \"avg\",
    \"baseline_period_h\": 2,
    \"factor\": 2.0,
    \"offset\": 0
  },
  \"threshold_lo_e\": 10000,
  \"threshold_lo_e_set_0\": false,
  \"threshold_lo_e_dynamic\": {
    \"baseline_measure\": \"avg\",
    \"baseline_period_h\": 2,
    \"factor\": 2.0,
    \"offset\": 0
  },
  \"tags\": [
    1,
    2,
    3
  ],
  \"Enabled\": 1,
  \"scheduled_inclusion\": \"mon-fri: 21:30-22; sun:15-17; 0-1:12-18; 2012-04-01-2012-04-30:18-23\",
  \"scheduled_exclusion\": \"mon-fri: 21:30-22; sun:15-17; 0-1:12-18; 2012-04-01-2012-04-30:18-23\",
  \"target_sla\": 0.9,
  \"target_sla_2\": 0.9,
  \"verify_ping\": \"fast.com\",
  \"CheckID\": 1,
  \"CheckGUID\": \"06b9d178-a202-4e62-a4c4-d69ed8cbba14\"
}"
NameType Required Description
url String Yes

URL.

result_mode Integer No

Type of value to return for the check. 10 - Total Browser Render Time, 20 - Total Response Time, 30 - Total Page Size, 40 - DOM Content Loaded, 50 - DOM Complete, 60 - DOM Interactive, 70 - Compressed Size, 80 - DNS Lookup.

custom_hdrs Object No

Custom headers values support a set of placeholders: "%CHECK_ID%" and "%CHECK_NAME%".

block_domains Array No

Deny access to these URLs. Regular Expressions may be used.

allow_domains Array No

Allow access to these URLs. Regular Expressions may be used.

stop_urls Array No

Stop loading content at these URLs.

screen_resolution String No

Browser screen resolution to use when accessing the URL.

screenshot_mode String No

Screenshots triggers. Empty string - don't trigger screenshots, OnTransition - trigger only if check changes severity e.g from OK > Warning or from Fatal > OK, OnError - only trigger screenshot when severity = Fatal, Always - always store screenshots (usually for debugging only).

blurring_mode Integer No

Enable blurring of screen captures to obscure details. 0 - None, 1(min), 2, 3, 4(max) - blur level.

ignore_file_types Array No

Ignore errors returned in the response by HTTP Response Code and File Types. E.g '500, 4* - *.png' = Ignore all 500 and all 4* errors for .png files (checked against the URI).

status_codes String Yes

Status codes. Separate with commas, asterisks are allowed.

types String Yes

File or MIME types that will be ignored for specified code. Separate with commas, asterisks are allowed.

ignore_mime_types Array No

Ignore errors returned in the response by HTTP Response Code and Mime Types. E.g '500, 4* - image/*' = Ignore all 500 and all 4* errors for image/* mime types (checked against the Content-Type header).

status_codes String Yes

Status codes. Separate with commas, asterisks are allowed.

types String Yes

File or MIME types that will be ignored for specified code. Separate with commas, asterisks are allowed.

url_severity_mapping Array No

Specify Url Pattern, HTTP error status codes, and which severity you want to treat the error status codes as.

url_format String Yes

Url pattern type. Available values: 'wildcard', 'regex'.

url String Yes

Url pattern.

status_codes String Yes

Status codes. Separate with commas, asterisks are allowed.

severity String Yes

Treat url pattern as severity. I - Information, W - Warning, E - Error, F - Fatal. Default is F.

url_severity_mapping_preserve_time Boolean No

Enable this option to preserve the Returned Value for a check run with URL errors that are mapped to I, W, or E (and there is no selenium error). By default a check run with URL errors is shown as a failed check run and the Returned Value is not saved.

url_severity_mapping_error_wildcard Integer No

Error Status Codes pattern '*' applies to: 0 - Bad HTTP status(0, 4 *, 5 *) and any other URL error, 1 - Bad HTTP status only(0, 4 *, 5 *), 2 - Any HTTP status.

fail_over Boolean No

With Failover enabled the check will be executed on a second location if the result is not OK (Information). Only one attempt will be made from the failover location.

name String Yes

The name of the check.

description String No

The check description.

monitor_groups_ids Array No

ID of monitor groups in which a check will be included.

interval_seconds Integer No

Check run interval in seconds.

interval_manual Boolean No

The flag indicating whether check runmode is manual or interval.

max_attempts Integer No

The max number of attempts that can be made to verify the results. This setting applies to the primary location only, not any failover locations. Available values: from 1 to 5.

attempt_pause Integer No

Between every attempt there will be an Attempt Pause before the next attempt is performed. Milliseconds. Available values : 0, 50, 100, 200, 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 60000.

location_code String Yes

The check run location.

secondary_location_codes Array No

Currently not supported.

Timezone Integer No

Timezone where check will run

check_fail_severity String No

This will be the Severity that the check will get if it fails. This can be used to trigger a different Severity (and at the end, different alerts). I - Information, W - Warning, E - Error, F - Fatal. Default is F.

threshold_w Integer No

The value of high warning threshold. If not specified then no threshold.

threshold_w_set_0 Boolean No

The flag indicating whether or not the high warning threshold should be set to 0.

threshold_w_dynamic Object No

The object for configuring dynamic calculation of high warning threshold. If not specified then no dynamic calculation.

baseline_measure String Yes

The baseline for calculating dynamic threshold. Available values: 'avg', 'mdn', 'std'.

baseline_period_h Integer Yes

The period in hours for calculation depending on the specified baseline.

factor Float Yes

The percentage of the average/median return value or standard deviation of the return value.

offset Integer No

The period's offset in hours.

threshold_e Integer No

The value of high error threshold. If not specified then no threshold.

threshold_e_set_0 Boolean No

The flag indicating whether or not the high error threshold should be set to 0.

threshold_e_dynamic Object No

The object for configuring dynamic calculation of high error threshold. If not specified then no dynamic calculation.

baseline_measure String Yes

The baseline for calculating dynamic threshold. Available values: 'avg', 'mdn', 'std'.

baseline_period_h Integer Yes

The period in hours for calculation depending on the specified baseline.

factor Float Yes

The percentage of the average/median return value or standard deviation of the return value.

offset Integer No

The period's offset in hours.

threshold_lo_w Integer No

The value of low warning threshold. If not specified then no threshold.

threshold_lo_w_set_0 Boolean No

The flag indicating whether or not the low warning threshold should be set to 0.

threshold_lo_w_dynamic Object No

The object for configuring dynamic calculation of low warning threshold. If not specified then no dynamic calculation.

baseline_measure String Yes

The baseline for calculating dynamic threshold. Available values: 'avg', 'mdn', 'std'.

baseline_period_h Integer Yes

The period in hours for calculation depending on the specified baseline.

factor Float Yes

The percentage of the average/median return value or standard deviation of the return value.

offset Integer No

The period's offset in hours.

threshold_lo_e Integer No

The value of low error threshold. If not specified then no threshold.

threshold_lo_e_set_0 Boolean No

The flag indicating whether or not the low error threshold should be set to 0.

threshold_lo_e_dynamic Object No

The object for configuring dynamic calculation of low error threshold. If not specified then no dynamic calculation.

baseline_measure String Yes

The baseline for calculating dynamic threshold. Available values: 'avg', 'mdn', 'std'.

baseline_period_h Integer Yes

The period in hours for calculation depending on the specified baseline.

factor Float Yes

The percentage of the average/median return value or standard deviation of the return value.

offset Integer No

The period's offset in hours.

tags Array No

List of tag IDs.

Enabled Integer No

Enabled. Default value is 1.

scheduled_inclusion String No

Inclusion Periods (Default: always).

scheduled_exclusion String No

Exclusion Periods (Default: none).

target_sla Float No

Sets a 1st Target SLA in percentage e.g. 99.5 or 99. This is used in certain types reports. Set 0 to reset the value.

target_sla_2 Float No

Sets a 2nd Target SLA in percentage e.g. 99.5 or 99. This is used in certain types reports. Set 0 to reset the value.

verify_ping String No

After a failed result, verify connection against this hostname with a ping request.

CheckID Integer No

No documentation available.

CheckGUID Guid No

No documentation available.