---
title: Search Policy Key
slug: single-connect-api-3-0-3/search-policy-key
description: Learn how to use cURL to send a POST request and search for a policy key with this comprehensive code example. This document includes the necessary URL, headers, and JSON data to perform the request efficiently. Master the art of making effective POST req
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "QsGOYDbi12euzabhDTEoq",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/policy/searchPolicyKey",
    "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    \"dbId\": 19932,\r\n    \"userCreate\": \"admin\",\r\n    \"key\": \"ls\",\r\n    \"description\": \"ls\",\r\n    \"type\": \"WHITE\"\r\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Search Policy Key",
        "jsonExample": "[]"
      }
    ],
    "contentType": "application/json",
    "description": "This method lists the features of related policy keys. ",
    "examples": {
      "languages": [
        {
          "id": "LOoHEhHb2wdkmgcPDAhHa",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/policy/searchPolicyKey \\\n     --header 'accept: application/json'"
        },
        {
          "id": "AFwm1fZ_e8Gb6TZLzAAcl",
          "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/policy/searchPolicyKey\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "P9XtbbR6o76G3D7lL0JWa",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/policy/searchPolicyKey\")\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": "MEHSOC6pKaG_2Zif_-Wmg",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/policy/searchPolicyKey\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "LOoHEhHb2wdkmgcPDAhHa"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "[]"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}