Skip to main content

behavior_detection_rules

Creates, updates, deletes, gets or lists a behavior_detection_rules resource.

Overview

Namebehavior_detection_rules
TypeResource
Idokta.behaviors.behavior_detection_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringID of the Behavior Detection Rule
namestringName of the Behavior Detection Rule
_linkobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
createdstringTimestamp when the Behavior Detection Rule was created
lastUpdatedstringTimestamp when the Behavior Detection Rule was last modified
statusstring
typestring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_behavior_detection_rulesselectsubdomainLists all behavior detection rules with pagination support
get_behavior_detection_ruleselectsubdomainRetrieves a Behavior Detection Rule by behaviorId
create_behavior_detection_ruleinsertsubdomain, data__name, data__typeCreates a new behavior detection rule
replace_behavior_detection_rulereplacesubdomain, data__name, data__typeReplaces a Behavior Detection Rule by behaviorId
delete_behavior_detection_ruledeletesubdomainDeletes a Behavior Detection Rule by behaviorId
activate_behavior_detection_ruleexecsubdomainActivates a behavior detection rule
deactivate_behavior_detection_ruleexecsubdomainDeactivates a behavior detection rule

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)

SELECT examples

Lists all behavior detection rules with pagination support

SELECT
id,
name,
_link,
created,
lastUpdated,
status,
type
FROM okta.behaviors.behavior_detection_rules
WHERE subdomain = '{{ subdomain }}' -- required;

INSERT examples

Creates a new behavior detection rule

INSERT INTO okta.behaviors.behavior_detection_rules (
data__name,
data__status,
data__type,
subdomain
)
SELECT
'{{ name }}' --required,
'{{ status }}',
'{{ type }}' --required,
'{{ subdomain }}'
RETURNING
id,
name,
_link,
created,
lastUpdated,
status,
type
;

REPLACE examples

Replaces a Behavior Detection Rule by behaviorId

REPLACE okta.behaviors.behavior_detection_rules
SET
data__name = '{{ name }}',
data__status = '{{ status }}',
data__type = '{{ type }}'
WHERE
subdomain = '{{ subdomain }}' --required
AND data__name = '{{ name }}' --required
AND data__type = '{{ type }}' --required
RETURNING
id,
name,
_link,
created,
lastUpdated,
status,
type;

DELETE examples

Deletes a Behavior Detection Rule by behaviorId

DELETE FROM okta.behaviors.behavior_detection_rules
WHERE subdomain = '{{ subdomain }}' --required;

Lifecycle Methods

Activates a behavior detection rule

EXEC okta.behaviors.behavior_detection_rules.activate_behavior_detection_rule 
@subdomain='{{ subdomain }}' --required;