メインコンテンツへスキップ
PATCH
https://{tenantDomain}/api/v2
/
attack-protection
/
bot-detection
Update Bot Detection settings
curl --request PATCH \
  --url https://{tenantDomain}/api/v2/attack-protection/bot-detection \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "allowlist": [
    "127.0.0.1"
  ],
  "monitoring_mode_enabled": true
}
'
import requests

url = "https://{tenantDomain}/api/v2/attack-protection/bot-detection"

payload = {
"allowlist": ["127.0.0.1"],
"monitoring_mode_enabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowlist: ['127.0.0.1'], monitoring_mode_enabled: true})
};

fetch('https://{tenantDomain}/api/v2/attack-protection/bot-detection', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/attack-protection/bot-detection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'allowlist' => [
'127.0.0.1'
],
'monitoring_mode_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{tenantDomain}/api/v2/attack-protection/bot-detection"

payload := strings.NewReader("{\n \"allowlist\": [\n \"127.0.0.1\"\n ],\n \"monitoring_mode_enabled\": true\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://{tenantDomain}/api/v2/attack-protection/bot-detection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowlist\": [\n \"127.0.0.1\"\n ],\n \"monitoring_mode_enabled\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{tenantDomain}/api/v2/attack-protection/bot-detection")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowlist\": [\n \"127.0.0.1\"\n ],\n \"monitoring_mode_enabled\": true\n}"

response = http.request(request)
puts response.read_body
{
  "allowlist": [
    "127.0.0.1"
  ],
  "monitoring_mode_enabled": true
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

ボディ

bot_detection_level
enum<string>

The level of bot detection sensitivity

利用可能なオプション:
low,
medium,
high
challenge_password_policy
enum<string>

The policy that defines how often to show CAPTCHA

利用可能なオプション:
never,
when_risky,
always
challenge_passwordless_policy
enum<string>

The policy that defines how often to show CAPTCHA

利用可能なオプション:
never,
when_risky,
always
challenge_password_reset_policy
enum<string>

The policy that defines how often to show CAPTCHA

利用可能なオプション:
never,
when_risky,
always
allowlist
(string<ipv4> | string<ipv6> | string<cidr> | string<ipv6_cidr>)[]

List of IP addresses or CIDR blocks to allowlist

IPv4 address

monitoring_mode_enabled
boolean

Whether monitoring mode is enabled (logs but does not block)

レスポンス

Bot detection configuration successfully updated.

bot_detection_level
enum<string>

The level of bot detection sensitivity

利用可能なオプション:
low,
medium,
high
challenge_password_policy
enum<string>

The policy that defines how often to show CAPTCHA

利用可能なオプション:
never,
when_risky,
always
challenge_passwordless_policy
enum<string>

The policy that defines how often to show CAPTCHA

利用可能なオプション:
never,
when_risky,
always
challenge_password_reset_policy
enum<string>

The policy that defines how often to show CAPTCHA

利用可能なオプション:
never,
when_risky,
always
allowlist
(string<ipv4> | string<ipv6> | string<cidr> | string<ipv6_cidr>)[]

List of IP addresses or CIDR blocks to allowlist

IPv4 address

monitoring_mode_enabled
boolean

Whether monitoring mode is enabled (logs but does not block)