Get Zone Bot Management Config
client.botManagement.get(BotManagementGetParams { zone_id } params, RequestOptionsoptions?): BotManagementGetResponse
GET/zones/{zone_id}/bot_management
Retrieve a zone's Bot Management Config
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Get Zone Bot Management Config
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const botManagement = await client.botManagement.get({
zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
});
console.log(botManagement);{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"ai_bots_protection": "block",
"cf_robots_variant": "policy_only",
"crawler_protection": "enabled",
"enable_js": true,
"fight_mode": true,
"is_robots_txt_managed": false,
"stale_zone_configuration": {
"optimize_wordpress": true,
"sbfm_definitely_automated": "sbfm_definitely_automated",
"sbfm_likely_automated": "sbfm_likely_automated",
"sbfm_static_resource_protection": "sbfm_static_resource_protection",
"sbfm_verified_bots": "sbfm_verified_bots",
"suppress_session_score": true
},
"using_latest_model": true
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"ai_bots_protection": "block",
"cf_robots_variant": "policy_only",
"crawler_protection": "enabled",
"enable_js": true,
"fight_mode": true,
"is_robots_txt_managed": false,
"stale_zone_configuration": {
"optimize_wordpress": true,
"sbfm_definitely_automated": "sbfm_definitely_automated",
"sbfm_likely_automated": "sbfm_likely_automated",
"sbfm_static_resource_protection": "sbfm_static_resource_protection",
"sbfm_verified_bots": "sbfm_verified_bots",
"suppress_session_score": true
},
"using_latest_model": true
}
}