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

# Get CPEs (Common Platform Enumeration) associated with a single software component.

> Returns Common Platform Enumeration identifiers that match the specified component.
CPEs are used to identify IT platforms in vulnerability databases and enable
vulnerability scanning and assessment.

See: https://github.com/scanoss/papi/blob/main/protobuf/scanoss/api/vulnerabilities/v2/README.md?tab=readme-ov-file#getcomponentcpes



## OpenAPI

````yaml /api-reference/vulnerabilities-openapi.json get /v2/vulnerabilities/cpes/component
openapi: 3.0.0
info:
  title: SCANOSS Vulnerability Service
  description: >-
    Vulnerability service provides vulnerability intelligence for software
    components.
  version: '2.0'
  contact:
    name: scanoss-vulnerabilities
    url: https://github.com/scanoss/vulnerabilities
    email: support@scanoss.com
servers:
  - url: http://api.scanoss.com
  - url: https://api.scanoss.com
security: []
tags:
  - name: Vulnerabilities
paths:
  /v2/vulnerabilities/cpes/component:
    get:
      tags:
        - Vulnerabilities
      summary: >-
        Get CPEs (Common Platform Enumeration) associated with a single software
        component.
      description: >-
        Returns Common Platform Enumeration identifiers that match the specified
        component.

        CPEs are used to identify IT platforms in vulnerability databases and
        enable

        vulnerability scanning and assessment.


        See:
        https://github.com/scanoss/papi/blob/main/protobuf/scanoss/api/vulnerabilities/v2/README.md?tab=readme-ov-file#getcomponentcpes
      operationId: Vulnerabilities_GetComponentCpes
      parameters:
        - name: purl
          description: Package URL identifying the component to analyze.
          in: query
          required: true
          schema:
            type: string
        - name: requirement
          description: >-
            Version constraint for component resolution when PURL lacks explicit
            version.
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ComponentCpesResponse'
        '404':
          description: Returned when the resource does not exist.
          content:
            application/json:
              schema:
                type: string
                format: string
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  schemas:
    v2ComponentCpesResponse:
      type: object
      example:
        component:
          purl: pkg:github/scanoss/engine@1.0.0
          requirement: 1.0.0
          version: 1.0.0
          cpes:
            - cpe:2.3:a:scanoss:engine:1.0.0:*:*:*:*:*:*:*
        status:
          status: SUCCESS
          message: CPEs Successfully retrieved
      properties:
        component:
          $ref: '#/components/schemas/v2ComponentCpesInfo'
        status:
          $ref: '#/components/schemas/v2StatusResponse'
      description: >-
        Success example. For error cases, each component block reports the
        processing status via info_message and info_code. Example:
        {"component":{"purl":"pkg:github/unknown/component","requirement":"","version":"","cpes":[],"info_message":"Component
        not found in
        database","info_code":"COMPONENT_NOT_FOUND"},"status":{"status":"SUCCESS","message":"Request
        processed"}}
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    v2ComponentCpesInfo:
      type: object
      properties:
        purl:
          type: string
          description: >-
            Package URL (PURL) uniquely identifying the component. See Common
            API Types documentation for format and resolution logic.
        version:
          type: string
          title: Specific version of the component that was analyzed
        requirement:
          type: string
          title: >-
            Echoes the client's version constraint from the request. See Common
            API Types documentation for resolution logic
        cpes:
          type: array
          items:
            type: string
          title: >-
            List of Common Platform Enumeration identifiers associated with this
            component
        info_message:
          type: string
          description: Status message describing the outcome of processing this component.
        info_code:
          type: string
          description: |-
            Status code identifying the outcome of processing this component.

            Possible values:
              - "INVALID_PURL":        The provided Package URL (PURL) is invalid or malformed.
              - "COMPONENT_NOT_FOUND": The requested component could not be found in the database.
              - "NO_INFO":             No CPE information is available for the requested component.
              - "INVALID_SEMVER":      The provided semantic version (SemVer) is invalid or malformed.
              - "VERSION_NOT_FOUND":   The specific component version could not be found.
      description: |-
        Common Platform Enumeration information for a specific component.

        Contains CPE identifiers that can be used to match the component
        against vulnerability databases and security advisories.
    v2StatusResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/v2StatusCode'
        message:
          type: string
          title: Status message
        db:
          $ref: '#/components/schemas/StatusResponseDB'
        server:
          $ref: '#/components/schemas/StatusResponseServer'
      description: Detailed response details.
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    v2StatusCode:
      type: string
      enum:
        - UNSPECIFIED
        - SUCCESS
        - SUCCEEDED_WITH_WARNINGS
        - WARNING
        - FAILED
      default: UNSPECIFIED
      description: Status code Enum.
    StatusResponseDB:
      type: object
      properties:
        schema_version:
          type: string
          title: Semantic schema version (e.g., 'v1.0.0')
        created_at:
          type: string
          title: When this DB was built (ISO 8601 format)
      description: Database version information.
    StatusResponseServer:
      type: object
      properties:
        version:
          type: string
          title: Semantic version (e.g., 'v1.0.0')
      description: Server information.

````