ProjectDiscovery Vulnerability API

The Vulnerability API from ProjectDiscovery — 4 operation(s) for vulnerability.

OpenAPI Specification

projectdiscovery-vulnerability-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: PDCP Asset Vulnerability 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: []
tags:
- name: Vulnerability
paths:
  /v2/vulnerability/search:
    parameters: []
    get:
      summary: Full Text Search
      tags:
      - Vulnerability
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  facets:
                    type: object
                    additionalProperties:
                      $ref: '#/components/schemas/Facets'
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Vulnerability'
                  total:
                    type: integer
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
      operationId: get-v2-vulnerability-search
      description: Full text search on vulnerabilities
      parameters:
      - schema:
          type: integer
        in: query
        name: limit
        description: The numbers of items to return
      - schema:
          type: integer
        in: query
        name: offset
        description: The numbers of items to skip
      - schema:
          type: string
        in: query
        name: sort_asc
        description: Sort results in ascending order (CSV field names)
      - schema:
          type: string
        in: query
        name: sort_desc
        description: Sort results in descending order (CSV field names)
      - schema:
          items:
            type: string
          type: array
        in: query
        name: fields
        description: List of fields to return(comma separated)
      - schema:
          items:
            type: string
          type: array
        in: query
        name: term_facets
        description: List of fields to return(comma separated)
      - schema:
          items:
            type: string
          type: array
        in: query
        name: range_facets
        description: List of fields to return(comma separated)
      - schema:
          type: string
        in: query
        name: q
        description: query
      - schema:
          type: boolean
        in: query
        name: highlight
        description: Whether to highlight the search results
      - schema:
          type: integer
        in: query
        name: facet_size
        description: Number of facets to return
  /v2/vulnerability/{id}:
    parameters:
    - schema:
        type: string
      name: id
      in: path
      required: true
    get:
      summary: Get Vulnerability by ID
      tags:
      - Vulnerability
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Vulnerability'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
      operationId: get-vulnerability-by-id
      description: Get Vulnerability by ID
      parameters:
      - schema:
          type: string
        in: query
        name: fields
        description: 'template data fields '
  /v2/vulnerability/filters:
    parameters: []
    get:
      summary: Get All Filters for Vulnerabilities
      tags:
      - Vulnerability
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  properties:
                    can_sort:
                      description: Indicates if sorting is possible by this field.
                      type: boolean
                    data_type:
                      description: The data type of the filter field (e.g., string, number, datetime).
                      type: string
                    description:
                      description: A human-readable description of the filter field.
                      type: string
                    enum_values:
                      description: The possible values for this field.
                      items:
                        type: string
                      type: array
                    examples:
                      description: Example usage of the filter.
                      items:
                        type: string
                      type: array
                    facet_possible:
                      description: Indicates if faceting is possible for this field.
                      type: boolean
                    field:
                      description: The name of the filter field.
                      type: string
                    search_analyzer:
                      description: The search analyzer used for this field.
                      type: string
                  required:
                  - field
                  - data_type
                  - description
                  - facet_possible
                  - can_sort
                  - examples
                  - search_analyzer
                  - enum_values
                  type: object
                type: array
          description: OK
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
      operationId: get-v2-vulnerability-filters
      description: Get all filters for vulnerabilities
  /v2/vulnerability/{id}/timeline:
    parameters:
    - schema:
        type: string
      name: id
      in: path
      required: true
    get:
      summary: Get Vulnerability Timeline
      tags:
      - Vulnerability
      parameters:
      - schema:
          type: array
          items:
            type: string
            enum:
            - detected
            - status_change
            - resolved
            - reopened
            - severity_change
            - template_released
            - template_updated
        name: event_type
        in: query
        required: false
        description: Filter by event types (comma-separated). If not provided, returns all events.
        style: form
        explode: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VulnTimelineResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
      operationId: get-vulnerability-timeline
      description: Get timeline of events for a vulnerability including template release date, first detection, status changes, and severity changes
components:
  schemas:
    ExposureStats:
      title: ExposureStats
      type: object
      properties:
        fofa:
          $ref: '#/components/schemas/SearchEngineStats'
        id:
          type: string
        max_hosts:
          type: integer
        min_hosts:
          type: integer
        shodan:
          $ref: '#/components/schemas/SearchEngineStats'
    VulnTimelineResponse:
      title: VulnTimelineResponse
      type: object
      properties:
        template_released_at:
          type: string
          format: date-time
          description: Date when the template was first released (created)
        template_updated_at:
          type: string
          format: date-time
          description: Date when the template was last updated
        template_raw:
          type: string
          description: Raw template content (YAML) for public templates
        first_detected_at:
          type: string
          format: date-time
        last_seen_at:
          type: string
          format: date-time
        current_status:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/TimelineEvent'
    VulnerabilityInfo:
      additionalProperties: false
      allOf:
      - $ref: '#/components/schemas/CVEInfo'
      - properties:
          citations:
            description: Citations for the vulnerability/template
            items:
              $ref: '#/components/schemas/Citation'
            type: array
          cwe:
            description: CWE IDs associated with the vulnerability
            items:
              type: string
            type: array
          description:
            description: Description of the vulnerability/template
            type: string
          impact:
            description: Impact of the vulnerability/template
            type: string
          name:
            description: Name of the vulnerability/template
            type: string
          product:
            description: Product associated with the vulnerability/template
            type: string
          remediation:
            description: Remediation for the vulnerability/template
            type: string
          severity:
            description: Severity of the vulnerability/template
            type: string
          vendor:
            description: Vendor associated with the vulnerability/template
            type: string
          requirement_type:
            description: Type of the requirement
            type: string
          requirements:
            description: Requirements for the vulnerability/template
            type: string
          template_coverage:
            description: Coverage of the template
            type: string
          vulnerability_impact:
            description: Impact of the vulnerability/template
            items:
              type: string
            type: array
          vulnerability_type:
            description: Type of the vulnerability/template
            type: string
          weaknesses:
            description: Weaknesses associated with the vulnerability
            items:
              $ref: '#/components/schemas/Weakness'
            type: array
        type: object
      type: object
      title: ''
    Facets:
      title: Facets
      type: object
      properties:
        buckets:
          type: object
          additionalProperties:
            type: integer
        missing:
          type: integer
        others:
          type: integer
        total:
          type: integer
    POC:
      title: POC
      type: object
      properties:
        added_at:
          type: string
          format: date-time
        source:
          type: string
        url:
          type: string
    VulnExposure:
      additionalProperties: false
      title: VulnExposure
      type: object
      properties:
        max_hosts:
          description: Maximum number of hosts for the vulnerability
          type: integer
        min_hosts:
          description: Minimum number of hosts for the vulnerability
          type: integer
        values:
          description: Values of the vulnerability
          type: array
          items:
            $ref: '#/components/schemas/ExposureStats'
    ProductInfo:
      title: ProductInfo
      type: object
      properties:
        cpe:
          description: CPE of the product
          type: array
          items:
            type: string
        product:
          description: Product of the product
          type: string
        project_repos:
          type: object
        projects:
          description: Projects of the product
          type: array
          items:
            type: string
        vendor:
          description: Vendor of the product
          type: string
        product_category:
          type: string
        product_type:
          type: string
        industry:
          description: Industry of the product
          type: string
        tech_domain:
          description: Tech domain of the product
          type: string
        category:
          description: Product category of the product
          type: string
        deployment_model:
          description: Deployment model of the product
          type: string
        summary:
          description: Summary of the product
          type: string
    Vulnerability:
      additionalProperties: false
      allOf:
      - $ref: '#/components/schemas/VulnerabilityInfo'
      - $ref: '#/components/schemas/NucleiTemplate'
      - properties:
          affected_products:
            description: Affected products for the vulnerability
            items:
              $ref: '#/components/schemas/ProductInfo'
            type: array
          created_at:
            description: Created at timestamp
            format: date-time
            type: string
          doc_id:
            description: Document ID of the vulnerability
            type: string
          doc_type:
            description: Type of the document
            type: string
          exposure:
            $ref: '#/components/schemas/VulnExposure'
            description: Exposure stats for the vulnerability
          h1:
            $ref: '#/components/schemas/H1Stats'
            description: Hackerone stats for the vulnerability
          ntps:
            description: Nuclei Template Priority Score
            type: integer
          updated_at:
            description: Updated at timestamp
            format: date-time
            type: string
          template_created_at:
            description: Timestamp when the template was created
            format: date-time
            type: string
        type: object
      type: object
    TemplateFileMeta:
      title: TemplateFileMeta
      type: object
      properties:
        directory:
          type: string
          description: Directory of template
        filename:
          type: string
          description: 'Filename of template

            '
        uri:
          type: string
          description: Uri of template
    NucleiTemplate:
      additionalProperties: false
      allOf:
      - $ref: '#/components/schemas/TemplateSourceMeta'
      - $ref: '#/components/schemas/TemplateStatus'
      - $ref: '#/components/schemas/TemplateFileMeta'
      - $ref: '#/components/schemas/TemplateContent'
      - $ref: '#/components/schemas/TemplateSharingMetadata'
      - properties:
          ai_meta:
            $ref: '#/components/schemas/AIMeta'
            description: AI Meta of the template
          classification:
            $ref: '#/components/schemas/Classification'
            description: Classification of the template
          id:
            description: ID of the template
            type: string
          user_id:
            description: User ID of the template
            type: integer
        type: object
      type: object
    Classification:
      description: Classification of template including additional metadata like cve-id, cwe-id etc
      type: object
      properties:
        cve-id:
          type: array
          items:
            type: string
          description: CVE IDs for the template
        cwe-id:
          type: array
          items:
            type: string
          description: CWE IDs for the template
        cvss-metrics:
          type: string
          description: CVSS Metrics for the template
        cvss-score:
          type: number
          format: float
          description: CVSS Score for the template
        epss-score:
          type: number
          format: float
          description: EPSS Score for the template
        epss-percentile:
          type: number
          format: float
          description: EPSS Percentile for the template
        cpe:
          type: string
          description: CPE for the template
    CVEInfo:
      additionalProperties: false
      properties:
        age_in_days:
          description: Age in days for the cve
          type: integer
        assignee:
          description: Assignee for the cve
          type: string
        cve_created_at:
          description: Created at date for the cve
          format: date-time
          type: string
        cve_id:
          description: CVE ID for the cve
          type: string
        cve_updated_at:
          description: Updated at date for the cve
          format: date-time
          type: string
        cvss_metrics:
          description: CVSS Metrics for the cve
          example: 3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
          type: string
        cvss_score:
          description: CVSS Score for the cve
          example: 9.8
          format: double
          type: number
        epss_percentile:
          description: EPSS Percentile for the template.
          example: 0.42509
          format: double
          type: number
        epss_score:
          description: EPSS Score for the template.
          example: 0.42509
          format: double
          type: number
        is_kev:
          description: True if the cve is a kev
          type: boolean
        is_vkev:
          description: True if the cve is a vkev
          type: boolean
        is_oss:
          description: True if the cve is an oss cve
          type: boolean
        is_patch_available:
          description: True if the cve has a patch available
          type: boolean
        is_poc:
          description: True if the cve has a poc
          type: boolean
        is_remote:
          description: True if the cve is a remote cve
          type: boolean
        is_template:
          description: True if the cve has a template
          type: boolean
        kev:
          description: KEV info for the cve
          items:
            $ref: '#/components/schemas/KevInfo'
          type: array
        poc_count:
          description: Count of pocs for the vulnerability
          type: integer
        pocs:
          description: Contains all known proof of concepts for the vulnerability
          items:
            $ref: '#/components/schemas/POC'
          type: array
        nuclei_template:
          description: Raw nuclei template content
          type: string
        is_auth:
          description: True if the CVE is an authenticated CVE
          type: boolean
        is_exploit_seen:
          description: True if the CVE has been exploited in the wild
          type: boolean
        poc_first_seen:
          description: First seen date for the poc
          format: date-time
          type: string
        vuln_status:
          description: Status of the cve
          type: string
      type: object
    Weakness:
      additionalProperties: false
      title: Weakness
      type: object
      properties:
        cwe_id:
          type: string
          description: CWE ID for the weakness
        cwe_name:
          type: string
          description: CWE Name for the weakness
    TemplateSharingMetadata:
      properties:
        organizations:
          description: Organizations of the template
          items:
            type: string
          type: array
        origin_template_id:
          description: Origin template ID of the template
          type: string
        share_type:
          description: Share type of the template
          type: string
        ttl:
          description: TTL of the template
          type: string
        ttl_from:
          description: TTL from of the template
          type: string
        users:
          description: Users of the template
          items:
            type: integer
          type: array
      type: object
    Citation:
      additionalProperties: false
      title: Citation
      type: object
      properties:
        source:
          type: string
          description: Source for the citation
        tags:
          type: array
          description: Tags for the citation
          items:
            type: string
        url:
          type: string
          description: URL for the citation
        added_at:
          description: Added at date for the citation
          format: date-time
          type: string
    SearchEngineStats:
      title: SearchEngineStats
      type: object
      properties:
        max_hosts:
          type: integer
          description: Maximum number of hosts for the product
        min_hosts:
          type: integer
          description: Minimum number of hosts for the product
        queries:
          type: array
          description: Queries for the product
          items:
            type: string
    KevInfo:
      title: KevInfo
      type: object
      properties:
        added_date:
          type: string
          format: date-time
        due_date:
          type: string
          format: date-time
        known_ransomware_campaign_use:
          type: boolean
        source:
          type: string
    TemplateStatus:
      properties:
        is_draft:
          description: Is the template a draft
          type: boolean
        is_early:
          description: Is the template in early access
          type: boolean
        is_github:
          description: Is the template from github
          type: boolean
        is_new:
          description: Is the template new
          type: boolean
        is_pdteam:
          description: Is the template from pdteam
          type: boolean
      type: object
    H1Stats:
      additionalProperties: false
      title: H1Stats
      type: object
      properties:
        delta_rank:
          description: Rank delta from previous day
          type: integer
        delta_reports:
          description: Reports delta from previous day
          type: integer
        rank:
          description: Rank of CVE in Hackerone
          type: integer
        reports:
          description: Number of reports for CVE
          type: integer
    AIMeta:
      type: object
      properties:
        model_used:
          description: The AI model used to generate the template
          type: string
        is_prompt_by_human:
          description: Whether the prompt was written by a human
          type: boolean
        is_template_by_human:
          description: Whether the template was written by a human
          type: boolean
        prompt:
          description: The prompt used to generate the template
          type: string
    TimelineEvent:
      title: TimelineEvent
      type: object
      required:
      - timestamp
      - event_type
      properties:
        timestamp:
          type: string
          format: date-time
        event_type:
          type: string
          description: Type of event (template_released, detected, status_change, severity_change, reopened)
        old_value:
          type: string
        new_value:
          type: string
        description:
          type: string
    TemplateContent:
      title: TemplateContent
      type: object
      properties:
        author:
          type: array
          description: Authors of the template
          items:
            type: string
        digest:
          type: string
          description: Digest of the template
        metadata:
          type: object
          description: MetaData of the template
        raw:
          type: string
          description: Raw string of the template
        tags:
          type: array
          description: Tags of the template
          items:
            type: string
        type:
          type: string
          description: Type of the template
    TemplateSourceMeta:
      properties:
        category:
          description: Category of the template
          type: string
        integration_id:
          description: Integration ID of the template
          type: string
        integration_type:
          description: Integration type of the template
          type: string
        pull_request:
          description: Pull request of the template
          type: string
        ref:
          description: Reference of the template
          type: string
        release_tag:
          description: Release tag of the template
          type: string
        score:
          description: Score of the template
          type: integer
        template_type:
          description: Type of the template
          type: string
      type: object
  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
x-internal: false