Get all behaviors and associated configuration
client.zeroTrust.riskScoring.behaviours.get(BehaviourGetParams { account_id } params, RequestOptionsoptions?): BehaviourGetResponse { behaviors }
GET/accounts/{account_id}/zt_risk_scoring/behaviors
Retrieves configured risk score behaviors that define how user actions affect their overall risk score.
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 all behaviors and associated configuration
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const behaviour = await client.zeroTrust.riskScoring.behaviours.get({ account_id: 'account_id' });
console.log(behaviour.behaviors);{
"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": {
"behaviors": {
"foo": {
"description": "description",
"enabled": true,
"name": "name",
"risk_level": "low"
}
}
}
}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": {
"behaviors": {
"foo": {
"description": "description",
"enabled": true,
"name": "name",
"risk_level": "low"
}
}
}
}