---
title: Edit Masking Method
slug: kron-pam-api-collection-3-9-0/edit-masking-method
docTags: 
createdAt: 2026-10-21T06:10:28.166Z
---

{
  "id": "VBBBlYhdz7uHW76PUGLki",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/sc/sqlproxy/updateMaskingMethod",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<p>This request is used to edit previously saved masking methods in the system. The request body must include the <code>dbId</code> of the method, along with other properties such as <code>name</code>, <code>methodPattern</code>, <code>hideColumn</code>, <code>description</code>, and <code>columnType</code>, which can be edited. The body is formatted as a JSON object with key-value pairs.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "Content-Type",
          "description": "",
          "default": "application/json",
          "value": "application/json",
          "type": "string"
        },
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\r\n    \"dbId\": 632869,\r\n    \"name\": \"new method\",\r\n    \"methodPattern\": \"REGEXP_REPLACE(${column}, '[A-Za-z]', 'x')\",\r\n    \"hideColumn\": false,\r\n    \"description\": \"new method masking\",\r\n    \"columnType\": \"varchar\"\r\n}",
          "value": "{\r\n    \"dbId\": 632869,\r\n    \"name\": \"new method\",\r\n    \"methodPattern\": \"REGEXP_REPLACE(${column}, '[A-Za-z]', 'x')\",\r\n    \"hideColumn\": false,\r\n    \"description\": \"new method masking\",\r\n    \"columnType\": \"varchar\"\r\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "MkFh_J8iqEEoSva1UBVPh",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sqlproxy/updateMaskingMethod \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\r\\n    \\\"dbId\\\": 632869,\\r\\n    \\\"name\\\": \\\"new method\\\",\\r\\n    \\\"methodPattern\\\": \\\"REGEXP_REPLACE(${column}, '\\''[A-Za-z]'\\'', '\\''x'\\'')\\\",\\r\\n    \\\"hideColumn\\\": false,\\r\\n    \\\"description\\\": \\\"new method masking\\\",\\r\\n    \\\"columnType\\\": \\\"varchar\\\"\\r\\n}\"'"
        },
        {
          "id": "m0RCEkkg0fjCqpkuoiT54",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"{\\r\\n    \\\"dbId\\\": 632869,\\r\\n    \\\"name\\\": \\\"new method\\\",\\r\\n    \\\"methodPattern\\\": \\\"REGEXP_REPLACE(${column}, '[A-Za-z]', 'x')\\\",\\r\\n    \\\"hideColumn\\\": false,\\r\\n    \\\"description\\\": \\\"new method masking\\\",\\r\\n    \\\"columnType\\\": \\\"varchar\\\"\\r\\n}\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sqlproxy/updateMaskingMethod\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "FrXmzPihr1ipKNRGdbDRT",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sqlproxy/updateMaskingMethod\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"{\\r\\n    \\\"dbId\\\": 632869,\\r\\n    \\\"name\\\": \\\"new method\\\",\\r\\n    \\\"methodPattern\\\": \\\"REGEXP_REPLACE(${column}, '[A-Za-z]', 'x')\\\",\\r\\n    \\\"hideColumn\\\": false,\\r\\n    \\\"description\\\": \\\"new method masking\\\",\\r\\n    \\\"columnType\\\": \\\"varchar\\\"\\r\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "u9EOfeMxaq0SpGoqQNZCm",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sqlproxy/updateMaskingMethod\"\n\npayload = json.dumps(\"{\\r\\n    \\\"dbId\\\": 632869,\\r\\n    \\\"name\\\": \\\"new method\\\",\\r\\n    \\\"methodPattern\\\": \\\"REGEXP_REPLACE(${column}, '[A-Za-z]', 'x')\\\",\\r\\n    \\\"hideColumn\\\": false,\\r\\n    \\\"description\\\": \\\"new method masking\\\",\\r\\n    \\\"columnType\\\": \\\"varchar\\\"\\r\\n}\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "MkFh_J8iqEEoSva1UBVPh"
    },
    "results": {
      "languages": [
        {
          "id": "JtZ_tminIjS3MycDShQ95",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "JtZ_tminIjS3MycDShQ95"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}