---
title: List All Masking Policies
slug: single-connect-api-3-2-0/list-all-masking-policies
description: Learn how to make a POST request using cURL command with this code example. Discover the required headers and data to include in the request body for a successful request to a designated URL. Master the art of sending POST requests effortlessly.
docTags: 
createdAt: 2022-11-10T14:24:52.000Z
---

{
  "id": "o_prdPs-ZP8-HSaS_y7xu",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/sc/sqlproxy/listMaskingPolicy",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [
        {
          "name": "Content-Type",
          "type": "string",
          "example": "application/json",
          "description": ""
        },
        {
          "name": "X-XSRF-TOKEN",
          "type": "string",
          "example": "{{csrftoken}}",
          "description": ""
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\r\n    \"name\": \"new policy\",\r\n    \"description\": \"new masking policy\",\r\n    \"datasourceDbId\": 582647,\r\n    \"active\": true,\r\n    \"rowLimit\": 50,\r\n    \"schema\": \"*\",\r\n    \"table\": \"EMPLOYEES\",\r\n    \"column\": \"FIRST_NAME\",\r\n    \"methodDbId\": 465445\r\n}\r\n",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "<p>This method lists masking policies. To get entire records, no property should be posted in the body. To filter any property, related property and the value can be entered in the body of the request.\r\nIf no data is found, the method returns empty response.</p>",
    "examples": {
      "languages": [
        {
          "id": "ZioBodcEfsDXiGBIBeDKq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/sc/sqlproxy/listMaskingPolicy \\\n     --header 'accept: application/json'"
        },
        {
          "id": "xGuWxEKTBtQTO_f5idNom",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/sc/sqlproxy/listMaskingPolicy\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "d-RJ2T4beUPiJey9PAKqS",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/sc/sqlproxy/listMaskingPolicy\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "UcNZCaQwmPHyV66_d-y7V",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/sc/sqlproxy/listMaskingPolicy\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "ZioBodcEfsDXiGBIBeDKq"
    },
    "results": {
      "languages": [
        {
          "id": "B9sQOVoX5SMKKm6gmJgg3",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "B9sQOVoX5SMKKm6gmJgg3"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}