Skip to main content

editMonitoredRulesAccess

You can use this method to restrict or allow access to behavioral profiles based on the recommendation generated by a specific PHASR rule.

This option will automatically apply the actions suggested by the recommendation and restrict or allow access for the selected targets to the recommended assets.

Each PHASR recommendation contains behavioral profiles on which the learning phase is completed. Behavioral profiles are pairs of users and their device. A single user may have multiple devices. As a result, different recommendations may contain same user but different devices.

Parameters

Name

Description

Included in request

Type

Values

companyId

The ID of the company the rule belongs to.

Optional

String

The user making the request must have Network administrator rights for The company the ID belongs to.

Default value: The ID of the company associated with the API key used for the request.

ruleId

The ID of the rule on which the recommendation is based.

Mandatory

Integer

No additional requirements.

action

The action that is to be taken on the specified behavioral profiles.

Mandatory

Integer

Possible values:

  • 0 - Allow access - Grants access for the specified behavioral profiles to the assets identified in the recommendation generated by the specified rule.

  • 1 - Restrict access - Restricts access for the specified behavioral profiles to the assets identified in the recommendation generated by the specified rule.

targets

A list of the IDs of the behavioral profiles to which you want to apply the recommendation generated by the specified rule.

Mandatory

Array of strings

A behavioral profile ID is constructed by combining the identityId of a user with the resourceId of a device they are paired with.

targetType

The type of the specified behavioral profiles.

Optional

Integer

Possible values:

  • 0 - Profile

General parameters

These are common parameters, available across all public API methods.

Parameter

Description

Included in request

Type

Values

id

This parameter adds an identifier to the request, linking it to its corresponding response.

The target replies with the same value in the response, allowing easy call tracking.

Mandatory

String

No additional requirements

method

The name of the method you are using to send the request.

Mandatory

String

Must be a valid method name.

jsonrpc

The version of JSON-RPC used by the request and the response.

Mandatory

Integer

Possible values:

  • 2.0

params

An object containing the configuration of the request.

Mandatory

Object

No additional requirements.

Return value

Attribute

Type

Description

updated_profiles

Array of strings

A list of the IDs of the behavioral profiles that were successfully modified as a result of the request.

already_restricted

Array of strings

A list of behavioral profile IDs that could not be restricted because they were already restricted.

already_allowed

Array of strings

A list of behavioral profile IDs that could not be allowed because they were already allowed.

errors

Array of objects

A list of error objects returned for behavioral profiles that could not be updated due to issues other than already being restricted or allowed.

The behavioral profiles are grouped based on the reason the request failed. Each object includes a message explaining the reason for failing and all the objects that failed for that specific reason.

Objects

errors

Attribute

Type

Description

targets

Array of strings

A list of profile IDs that failed the operation due to a specific reason.

message

String

A description of the reason the update failed.

Example

Request:

{
    "params": {
      "companyId": "68306c15c9b5cb3e920ffe22",
      "ruleId": 1,
      "action": 0,
      "targets": ["Local_S-1-5-21-2018264366-2484004464-1617746128-1001_68308694de453e6a039e1f6d6a7f1642-bdbc-810b-a42b-e04f2611c538-005056965bef",
                    "AD_S-1-5-21-4282359893-3999216301-2697700004-110862c11642-236f-e7bd-cf05-0f91f9346073-005056961e20", 
                    "test123"],
      "targetType":0
    },
    "jsonrpc": "2.0",
    "method": "editMonitoredRulesAccess",
    "id": "d4d50719-3215-455a-a329-086fe77f6d72"
}

Response:

{
  "id": "d4d50719-3215-455a-a329-086fe77f6d72",
  "jsonrpc": "2.0",
  "result": {
    "updated_profiles": [
      "AD_S-1-5-21-4282359893-3999216301-2697700004-110862c11642-236f-e7bd-cf05-0f91f9346073-005056961e20"
    ],
    "already_restricted": [
      "Local_S-1-5-21-2018264366-2484004464-1617746128-1001_68308694de453e6a039e1f6d6a7f1642-bdbc-810b-a42b-e04f2611c538-005056965bef"
    ],
    "errors": [
      {
        "targets": [
          "test123"
        ],
        "message": "Profile ID(s) not found. A valid profile ID should be constructed by concatenating the identityId and resourceId of the behavioral profile."
      }
    ]
  }
}