> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectdiscovery.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get asset policy suggestions

> Get suggested asset policies based on user data patterns. Analyzes asset data to suggest policies for bad data detection and important asset highlighting.

<Note>
  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%).
</Note>

## Example Request

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


## OpenAPI

````yaml get /v1/asset/policy/suggestion
openapi: 3.1.0
info:
  title: PDCP API
  version: '1.0'
  summary: ProjectDiscovery Cloud Platform
  description: >-
    For more details, checkout
    https://docs.projectdiscovery.io/api-reference/editor/scan
servers:
  - url: https://api.projectdiscovery.io
    description: Production
  - url: https://api.dev.projectdiscovery.io
    description: Development
  - url: http://localhost:8085
    description: Localhost
security:
  - X-API-Key: []
paths:
  /v1/asset/policy/suggestion:
    get:
      tags: []
      summary: Get asset policy suggestions
      description: >-
        Get suggested asset policies based on user data patterns. Analyzes asset
        data to suggest policies for bad data detection and important asset
        highlighting.
      operationId: get-v1-asset-policy-suggestion
      parameters:
        - schema:
            type: string
          in: query
          name: enumeration_id
          description: Optional enumeration ID to scope suggestions
        - schema:
            type: integer
          in: query
          name: limit
          description: Maximum suggestions per category
        - schema:
            type: number
          in: query
          name: threshold
          description: Minimum percentage threshold for anomaly detection
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetPolicySuggestionsResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    AssetPolicySuggestionsResponse:
      title: AssetPolicySuggestionsResponse
      type: object
      required:
        - suggestions
        - total
      properties:
        suggestions:
          type: array
          description: List of suggested policies based on user asset patterns
          items:
            $ref: '#/components/schemas/AssetPolicySuggestion'
        total:
          type: integer
          format: int64
          description: Total number of suggestions
        message:
          type: string
    AssetPolicySuggestion:
      title: AssetPolicySuggestion
      type: object
      required:
        - id
        - category
        - title
        - reason
        - severity
        - suggested_policy
        - affected_count
      properties:
        id:
          type: string
          description: >-
            Unique identifier for this suggestion (deterministic based on
            pattern)
        category:
          type: string
          description: Category of the suggestion (e.g., ip_concentration, repeated_title)
        title:
          type: string
          description: Human-readable title for the suggestion
        reason:
          type: string
          description: Detailed explanation of why this suggestion is made
        severity:
          type: string
          description: Severity level of the suggestion
        suggested_policy:
          type: object
          required:
            - name
            - policy_type
            - policies
          properties:
            name:
              type: string
              description: Suggested name for the policy
            policy_type:
              $ref: '#/components/schemas/AssetPolicyType'
            policies:
              $ref: '#/components/schemas/AssetFilters'
            labels:
              type: array
              description: Labels to apply (for set_label/remove_label types)
              items:
                type: string
        affected_count:
          type: integer
          format: int64
          description: Number of assets affected by this pattern
        affected_percentage:
          type: number
          format: float
          description: Percentage of total assets affected
        sample_assets:
          type: array
          description: Sample assets matching this pattern
          items:
            type: object
    AssetPolicyType:
      title: AssetPolicyType
      type: string
      enum:
        - alert
        - delete
        - set_label
        - remove_label
      description: Type of action to perform when policy matches assets
    AssetFilters:
      title: AssetFilters
      type: object
      additionalProperties: false
      properties:
        is_tech:
          type: boolean
          description: Return records that have technologies
        is_favicon:
          type: boolean
          description: Return the records that have favicon
        is_new:
          type: boolean
          description: Filter by new content
        labels:
          type: string
          description: Filter by comma separated labels, e.g-> labels=p1,p2
        host:
          type: string
          description: Filter by comma separated hosts, e.g-> host=p1,p2
        port:
          type: string
          description: Filter by comma separated ports, e.g-> port=p1,p2
        status_code:
          type: string
          description: Filter by comma separated status codes, e.g-> status_code=p1,p2
        content_length:
          type: string
          description: >-
            Filter by comma separated content lengths, e.g->
            content_length=p1,p2
        title:
          type: string
          description: Filter by comma separated titles, e.g-> title=p1,p2
        domain:
          type: array
          description: >-
            Filter by comma separated domain names, e.g->
            domain=domain1.com,domain2.com
          items:
            type: string
        cname:
          type: string
          description: Filter by comma separated cnames, e.g-> cname=p1,p2
        technologies:
          type: string
          description: Filter by comma separated technologies, e.g-> technologies=p1,p2
        ip:
          type: string
          description: Filter by comma separated ips, e.g-> ip=p1,p2
        is_screenshot:
          type: boolean
          description: Return the records with screenshots
        time:
          $ref: '#/components/schemas/TimeRangeQueryParameter'
          description: Filter by time range
        start_date:
          type: string
          format: date
          description: Filter by start date
        end_date:
          type: string
          format: date
          description: Filter by end date
        custom_filter:
          type: string
          description: Filter by custom filter. Double encode the query string.
        search:
          type: string
          description: Search on the content name
        enumeration_ids:
          type: array
          items:
            type: string
          description: Filter by enumeration ids
        only_dns:
          type: boolean
          description: Query only dns FQDN records
        only_ip:
          type: boolean
          description: Query only dns IP records
    TimeRangeQueryParameter:
      title: TimeRangeQueryParameter
      type: string
      enum:
        - last_day
        - last_week
        - last_month
        - last_3_months
        - last_6_months
        - last_12_months
        - all_time
  responses:
    ErrorResponse:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
              kind:
                type: string
              code:
                type: string
              error:
                type: string
              error_id:
                type: string
              param:
                type: string
              status:
                type: integer
  securitySchemes:
    X-API-Key:
      name: X-API-Key
      type: apiKey
      in: header

````