Skip to main content
GET
/
v1
/
asset
/
policy
/
suggestion
Get asset policy suggestions
curl --request GET \
  --url https://api.projectdiscovery.io/v1/asset/policy/suggestion \
  --header 'X-API-Key: <api-key>'
{
  "suggestions": [
    {
      "id": "<string>",
      "category": "<string>",
      "title": "<string>",
      "reason": "<string>",
      "severity": "<string>",
      "suggested_policy": {
        "name": "<string>",
        "policy_type": "alert",
        "policies": {
          "is_tech": true,
          "is_favicon": true,
          "is_new": true,
          "labels": "<string>",
          "host": "<string>",
          "port": "<string>",
          "status_code": "<string>",
          "content_length": "<string>",
          "title": "<string>",
          "domain": [
            "<string>"
          ],
          "cname": "<string>",
          "technologies": "<string>",
          "ip": "<string>",
          "is_screenshot": true,
          "time": "last_day",
          "start_date": "2023-12-25",
          "end_date": "2023-12-25",
          "custom_filter": "<string>",
          "search": "<string>",
          "enumeration_ids": [
            "<string>"
          ],
          "only_dns": true,
          "only_ip": true
        },
        "labels": [
          "<string>"
        ]
      },
      "affected_count": 123,
      "affected_percentage": 123,
      "sample_assets": [
        {}
      ]
    }
  ],
  "total": 123,
  "message": "<string>"
}
Each suggestion includes a pre-built policy template that can be used directly with the Create Asset Policy endpoint.Categories analyzed: error status codes, zero content length, TLS issues, sensitive ports, IP concentration, repeated titles, sensitive technologies (Jenkins, Kubernetes, Redis, etc.), admin panels, login pages, and dev/staging environments.The threshold parameter controls the minimum percentage of assets a pattern must affect to be suggested (default: 5%).

Example Request

curl -X GET "https://api.projectdiscovery.io/v1/asset/policy/suggestion?limit=5&threshold=10" \
  -H "X-Api-Key: YOUR_API_KEY"

Authorizations

X-API-Key
string
header
required

Query Parameters

enumeration_id
string

Optional enumeration ID to scope suggestions

limit
integer

Maximum suggestions per category

threshold
number

Minimum percentage threshold for anomaly detection

Response

OK

suggestions
AssetPolicySuggestion · object[]
required

List of suggested policies based on user asset patterns

total
integer<int64>
required

Total number of suggestions

message
string