takeRequestAccessAction
Takes action on request access recommendations by either allowing or denying them. This method processes multiple recommendations in bulk and returns detailed status for each operation.
Note
This method handles only request access recommendations (type 2). Any recommendation IDs that are invalid or do not belong to the company are recorded under failedActions.
Processing continues for all remaining recommendations, regardless of individual failures.
The company must have the necessary PHASR license and required permissions for the method to operate correctly.
Parameters
Name | Description | Included in request | Type | Values |
|---|---|---|---|---|
| The ID of the company the recommendations you want to apply belong to. | Optional NoteMandatory when applying recommendations from another company. | String | Must be a valid company ID for which you have management rights to. Default value: The ID of the company associated with the API key used for the request. |
| The IDs of the recommendations you want to apply. | Mandatory | Array of strings | Must be valid recommendation IDs and must belong to the same company. |
| The available action for the recommendations. | Mandatory | String | Must represent one of the allowed values: "allow" or "deny" |
These are common parameters, available across all public API methods.
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| 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. |
| The name of the method you are using to send the request. | Mandatory | String | Must be a valid method name. |
| The version of JSON-RPC used by the request and the response. | Mandatory | Integer | Possible values:
|
| An object containing the configuration of the request. | Mandatory | Object | No additional requirements. |
Under the | ||||
| The results page number. | Optional | Integer | Default value: |
| The number of results displayed per page. | Optional | Integer | The upper limit is 100 items per page. Default value: |
Example
Request:
{
"params": {
"recommendationIds": [
"68480f4e11e8dc005bb0f9e7",
"6853e32b4783f7a2f15582c4"
],
"action": "allow",
"companyId": "67fe8595d4db0d536908ec92"
},
"jsonrpc": "2.0",
"method": "takeRequestAccessAction",
"id": "d4d50719-3215-455a-a329-086fe77f6d72"
}
Response:
{
"id": "d4d50719-3215-455a-a329-086fe77f6d72",
"jsonrpc": "2.0",
"result": {
"successfulActions": [
"68480f4e11e8dc005bb0f9e7"
],
"failedActions": [
{
"recommendationId": "6853e32b4783f7a2f15582c4",
"error": "Recommendation already applied.",
"errorCode": 3432
}
]
}
}