# Update rules in a JRM payload Replaces URL rules, group rules, and block message in a JRM payload. Published profiles cannot be updated. ## Endpoint `PUT /bsp/api/v1/bmp/jrm/{jrm_profile_id}/jrm_payloads/{jrm_payload_id}` ## Request URL `https://{serverurl}/bsp/api/v1/bmp/jrm/{jrm_profile_id}/jrm_payloads/{jrm_payload_id}` [`{serverurl}`](https://www.manageengine.com/products/desktop-central/help/api/cloud/oauth-authentication-endpoint-domain.html) ## Scope `DesktopCentralCloud.BrowserManager.CREATE` ## Header `Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers | Parameter | Type | Required | Value | |---|---|---|---| | Content-Type | string | Mandatory | `application/json` | | Accept | string | Mandatory | `application/json` | ### Path Parameters | Parameter | Type | Required | Description | |---|---|---|---| | jrm_payload_id | string | Mandatory | JRM Payload ID from [Get JRM Profile](https://www.manageengine.com/products/desktop-central/help/api/cloud/java-manager-get-jrm-profile.html) response (`config_data_item_id` field) | | jrm_profile_id | string | Mandatory | JRM Profile ID from [List JRM Profiles](https://www.manageengine.com/products/desktop-central/help/api/cloud/java-manager-list-jrm-profiles.html) response (`jrm_profile_id` field) | ### Request Body Complete replacement of all payload rules. Include ONLY `urls` OR `groups` (not both). Any existing rules will be fully replaced. Do not send empty arrays for `urls` or `groups`; omit the key entirely if not used. The `block_message` field is only available when `action=0` (Block). **Content type:** `application/json` | Attribute | Type | Required | Description | |---|---|---|---| | jrm_payloads | JSON Object | Optional | Rule set | Java rules payload. Pick URL or Group from the dropdown. ## Examples ### URL Rules #### Sample Request ```curl curl --request PUT \ --url https://appdomains/bsp/api/v1/bmp/jrm/{jrm_profile_id}/jrm_payloads/{jrm_payload_id} \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{}' ``` #### Sample Request Body - URL Rules Replace with URL allow rule: ```json { "jrm_payloads": { "urls": [ { "java_version": "1.8.0_01", "action": 1, "webdomain_ids": [ "3" ] } ] } } ``` Replace with URL block rule: ```json { "jrm_payloads": { "urls": [ { "action": 0, "webdomain_ids": [ "3" ] } ], "block_message": "Blocked by policy" } } ``` ## Response Parameters ### HTTP Code 200 **Response Body:** `application/json` Response after modifying an existing payload. | Attribute | Type | Description | |---|---|---| | payloads | JSON Array | The updated payload reflecting your changes | ### HTTP Code 400 **Response Body:** `application/json` | Attribute | Type | Description | |---|---|---| | errorcode | string | Error identifier (e.g., `IAM0006` for invalid field value) | | errormsg | string | Describes which field or value is invalid | ### HTTP Code 401 **Response Body:** `application/json` | Attribute | Type | Description | |---|---|---| | errorCode | long | Unauthorized error code: credentials missing, expired, or invalid | | errorMsg | string | Authentication failure reason | ### HTTP Code 403 **Response Body:** `application/json` | Attribute | Type | Description | |---|---|---| | errorCode | long | Error code indicating insufficient permissions | | errorMsg | string | Message indicating insufficient privileges to access this resource | ### HTTP Code 429 **Response Body:** `application/json` | Attribute | Type | Description | |---|---|---| | errorCode | long | Rate limit error code returned when the API call reached threshold | | errorMsg | string | Rate limit exceeded message with retry guidance | ### HTTP Code 500 **Response Body:** `application/json` | Attribute | Type | Description | |---|---|---| | errormsg | string | Description of the server-side error | ## Possible Response Codes - `200` HTTP code - `400` HTTP code - `401` HTTP code - `403` HTTP code - `429` HTTP code - `500` HTTP code ## Sample Responses ### HTTP 200 Updated payload: ```json { "payloads": [ { "payload_type": "64101", "block_message": "Blocked by policy", "jrm_details": [ { "config_data_item_id": "971", "urls": [ { "java_version": "", "action": "0", "id": "3", "url": "localhost" } ], "groups": [] } ], "default_rias": false, "config_label": "JAVA_RULES_MANAGER" } ] } ``` ### HTTP 400 Invalid payload: ```json { "errorcode": "IAM0003", "errormsg": "Invalid request." } ``` Invalid Java version: ```json { "errorCode": "IAM0025", "url": "/bsp/api/v1/bmp/jrm/{jrm_profile_id}/jrm_payloads/{jrm_payload_id}", "errorMsg": "java_version is an invalid parameter format." } ``` Empty array: ```json { "errorCode": "IAM0022", "url": "/bsp/api/v1/bmp/jrm/{jrm_profile_id}/jrm_payloads/{jrm_payload_id}", "errorMsg": "Array size exceeds limit." } ``` ### HTTP 401 Unauthorized: ```json { "errorCode": "IAM0001", "errorMsg": "Authentication key is invalid. Please regenerate the key and try again." } ``` ### HTTP 403 Forbidden: ```json { "errorCode": "FORBIDDEN", "errorMsg": "You do not have permission to access this resource" } ``` ### HTTP 429 Rate limit exceeded: ```json { "errorCode": "RATE_LIMIT_EXCEEDED", "errorMsg": "You have exceeded the maximum number of API calls. Please try again later." } ``` ### HTTP 500 Server error: ```json { "errormsg": "Internal Server error, Please try again in a moment." } ``` ## Rate Limit ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 60 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.