PUT   checks/url-v2/{checkId}

Updates a URL check (version 2).

URL Parameters

NameDescription
checkId

Check identifier. Type: numeric.

Remarks

Use GET timezones route to get list of timezones timezone.
Check can include content verification: it fails if response content doesn’t match the content_pattern.
Content verification can be literal (content_pattern_type = 'literal') or regular expression (content_pattern_type = 'regex').
The field content_pattern_case_sensitive indicates whether content verification is case-sensitive or not.

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.
Set empty string to reset the value. Read more on the schedule syntax here.

Interval

The interval_seconds field defines the frequency of running check. Set interval_seconds = 0 if the check should run manually.

Request example and description

curl --request PUT "https://api-asm1.apica.io/v3/checks/url-v2/12345?auth_ticket=C471ADC4-19B4-4219-BBF4-671A97EC653E" --header "Content-Type: application/json" --data-raw "{
  \"Timeout\": 1,
  \"ConnectionTimeout\": 1,
  \"url\": \"https://cldemo.apica.io/\",
  \"content_pattern_type\": \"regex\",
  \"content_pattern\": \"ok\",
  \"content_pattern_case_sensitive\": false,
  \"request_method\": \"GET\",
  \"post_data\": \"{ \\"check_id\\": 12345}\",
  \"custom_hdrs\": {
    \"X-check-id\": \"12345\",
    \"X-private-req\": \"true\"
  },
  \"max_redirects\": 3,
  \"disable_certificate_verification\": true,
  \"authentication\": {
    \"type\": \"none\",
    \"username\": \"user\",
    \"password\": \"pass\"
  },
  \"proxy\": {
    \"type\": \"socks5\",
    \"host\": \"10.211.55.4\",
    \"port\": \"1080\",
    \"auth_type\": \"digest\",
    \"username\": \"user\",
    \"password\": \"pass\"
  },
  \"VerifyPort\": \"sample string 1\",
  \"AcceptedCodes\": \"sample string 2\",
  \"CodeSev\": \"sample string 3\",
  \"ReqHdrs\": true,
  \"RspHdrs\": true,
  \"SecureProtocolVersion\": \"sample string 4\",
  \"Http2\": true,
  \"Timezone\": 1,
  \"location_code\": \"b8dce6d7-2222-1111-92e9-4a98eb706b13|europe.northern-europe.se.na.stockholm.ipv6-aaaaa|chromium|87\",
  \"secondary_location_codes\": null,
  \"fail_over\": true,
  \"name\": \"Check name\",
  \"description\": \"Check description\",
  \"interval_seconds\": 300,
  \"max_attempts\": 3,
  \"attempt_pause\": 30000,
  \"check_fail_severity\": \"F\",
  \"threshold_w\": 15000,
  \"threshold_w_set_0\": true,
  \"threshold_w_dynamic\": {
    \"baseline_measure\": \"mdn\",
    \"baseline_period_h\": 2,
    \"factor\": 2.0,
    \"offset\": 0
  },
  \"threshold_e\": 30000,
  \"threshold_e_set_0\": false,
  \"threshold_e_dynamic\": {
    \"baseline_measure\": \"std\",
    \"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\": \"std\",
    \"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\": \"mdn\",
    \"baseline_period_h\": 2,
    \"factor\": 2.0,
    \"offset\": 0
  },
  \"enabled\": true,
  \"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\",
  \"tags\": [
    1,
    2,
    3
  ],
  \"target_sla\": 0.9,
  \"target_sla_2\": 0.9,
  \"verify_ping\": \"fast.com\"
}"
NameType Required Description
url String No

URL.

content_pattern_type String No

Response Content Verification Type. Available values: 'literal', 'regex'. Regex performs matching against the content with Regular Expressions. Literal matches using a basic string.

content_pattern String No

Content pattern.

content_pattern_case_sensitive Boolean No

Case sensitive content pattern. Enabling this option will make the Response Content Verification Pattern case sensitive.

request_method String No

HTTP request method.

post_data String No

Data for POST request.

custom_hdrs Object No

Request headers.

max_redirects Integer No

Maximum number of redirects.

disable_certificate_verification Boolean No

Disable Certificate Verification.

authentication Object No

Authentication data.

type String No

Authentication type. Available values: 'none', 'basic'.

username String No

Username.

password String No

Password.

proxy Object No

Proxy data.

type String No

Proxy type. Available values: 'none', 'http', 'socks4', 'socks5'.

host String No

Proxy (DNS) hostname or TCP/IP address.

port String No

Proxy TCP/IP port number.

auth_type String No

Proxy authentication type. Available values: 'none', 'basic', 'digest'.

username String No

Proxy authentication username.

password String No

Proxy authentication password.

VerifyPort String No

Verify port.

AcceptedCodes String No

Accepted codes.

CodeSev String No

Code severity.

ReqHdrs Boolean No

Store Request Headers.

RspHdrs Boolean No

Store Response Headers.

SecureProtocolVersion String No

Secure protocol version. Available values: 'default', 'sslv3','tlsv1'

Http2 Boolean No

Enable HTTP2.

Timezone Integer No

Timezone Timezone where check will run

location_code String No

The check run location.

secondary_location_codes Array No

Currently not supported.

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 No

The name of the check.

description String No

The check description.

interval_seconds Integer No

The check run interval in seconds.

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.

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.

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.

baseline_measure String No

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

baseline_period_h Integer No

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

factor Float No

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.

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.

baseline_measure String No

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

baseline_period_h Integer No

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

factor Float No

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.

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.

baseline_measure String No

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

baseline_period_h Integer No

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

factor Float No

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.

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.

baseline_measure String No

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

baseline_period_h Integer No

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

factor Float No

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

offset Integer No

The period's offset in hours.

enabled Boolean No

The check enabling status.

scheduled_inclusion String No

Inclusion Periods (Default: always).

scheduled_exclusion String No

Exclusion Periods (Default: none).

tags Array No

List of tag IDs.

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.

Timeout Integer No

Timeout.

ConnectionTimeout Integer No

Connection timeout.