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

# Get a weakness

> Retrieve one normalized weakness record.



## OpenAPI

````yaml GET /weaknesses/{id}
openapi: 3.1.0
info:
  title: Zero API
  version: 0.0.0
  description: Normalized public vulnerability intelligence.
servers:
  - url: https://api.zdlake.com
    description: Production API
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /weaknesses/{id}:
    get:
      tags:
        - Entities
      summary: Get weakness record
      description: >-
        A recurring class of design or implementation error that may cause
        multiple vulnerabilities. CWE is the preferred public taxonomy.
      operationId: get_weakness
      parameters:
        - $ref: '#/components/parameters/ApiVersion'
        - name: id
          in: path
          required: true
          description: >-
            A recurring class of design or implementation error that may cause
            multiple vulnerabilities. CWE is the preferred public taxonomy.
          schema:
            type: string
            example: CWE-79
        - name: include
          in: query
          description: Repeat to request typed detail projections.
          schema:
            type: array
            items:
              type: string
              enum:
                - overview
                - affected_targets
                - risk
                - remediation
                - affected_releases
                - software_releases
                - prevention_examples
                - security_activity
                - execution_defenses
                - relationship_summary
                - relationships
                - provenance
          explode: true
        - name: relationship_entity
          in: query
          description: Page one related entity type. Requires include=relationships.
          schema:
            type: string
            enum:
              - vulnerability
              - advisory
              - weakness
              - software
              - attack-pattern
        - name: relationship_limit
          in: query
          description: >-
            Limit results for relationship_entity. Requires
            include=relationships and relationship_entity.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 12
        - name: relationship_cursor
          in: query
          description: >-
            Continue paging relationship_entity. Requires include=relationships
            and relationship_entity.
          schema:
            type: string
            minLength: 1
            maxLength: 4096
      responses:
        '200':
          description: The normalized weakness record.
          headers:
            X-API-Version:
              description: API contract version used to process the request.
              schema:
                type: string
                example: '2026-08-19'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WeaknessDetailResponse'
              example:
                data:
                  - entity: weakness
                    entity_id: 0198b4ba-d354-7eef-87e0-ff21496ea234
                    revision_id: 0198b4c1-74ef-78a7-82ef-44fe8ce13609
                    id: CWE-79
                    aliases: []
                    title: >-
                      Improper Neutralization of Input During Web Page
                      Generation
                    summary: >-
                      Untrusted input is not neutralized before it is written to
                      a web page.
                    state: stable
                    published_at: '2006-07-19T00:00:00Z'
                    source_updated_at: '2026-08-18T20:55:31Z'
                    updated_at: '2026-08-18T04:20:11Z'
                _meta:
                  current:
                    url: https://api.zdlake.com/weaknesses/CWE-79
                  includes: []
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    ApiVersion:
      name: X-API-Version
      in: header
      required: false
      description: >-
        API contract version. Omit to use the latest public version. Current
        supported value: 2026-08-19.
      schema:
        type: string
        enum:
          - '2026-08-19'
        default: '2026-08-19'
  schemas:
    WeaknessDetailResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WeaknessDetail'
        _meta:
          $ref: '#/components/schemas/DetailMeta'
      required:
        - data
        - _meta
    WeaknessDetail:
      allOf:
        - $ref: '#/components/schemas/EntityDetail'
      type: object
      properties:
        entity:
          const: weakness
        affected_targets:
          type: array
          items:
            $ref: '#/components/schemas/AffectedTarget'
        relationship_summary:
          $ref: '#/components/schemas/RelationshipSummary'
        relationships:
          type: array
          items:
            $ref: '#/components/schemas/RelationshipGroup'
        provenance:
          $ref: '#/components/schemas/Provenance'
        overview:
          $ref: '#/components/schemas/WeaknessOverview'
        prevention_examples:
          $ref: '#/components/schemas/WeaknessPreventionExamples'
      required:
        - entity
    DetailMeta:
      type: object
      properties:
        current:
          type: object
          properties:
            url:
              type: string
              format: uri
          required:
            - url
        includes:
          type: array
          items:
            type: string
            enum:
              - overview
              - affected_targets
              - risk
              - remediation
              - affected_releases
              - software_releases
              - prevention_examples
              - security_activity
              - execution_defenses
              - relationship_summary
              - relationships
              - provenance
      required:
        - current
        - includes
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          format: uri
          example: https://docs.zdlake.com/api/errors#bad-request
        title:
          type: string
          example: Bad Request
        status:
          type: integer
          minimum: 400
          maximum: 599
          example: 400
        detail:
          type: string
          example: Invalid request parameters
        code:
          type: string
          example: VALIDATION_ERROR
          enum:
            - UNAUTHORIZED
            - INVALID_API_KEY
            - EXPIRED_API_KEY
            - REVOKED_API_KEY
            - FORBIDDEN
            - RATE_LIMITED
            - VALIDATION_ERROR
            - BAD_REQUEST
            - NOT_FOUND
            - INTERNAL_ERROR
        request_id:
          type: string
          example: req_01J7Y8Z9ABCDEF0123456789AB
        errors:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          example:
            limit:
              - Number must be less than or equal to 100
      required:
        - type
        - title
        - status
        - detail
        - code
        - request_id
    EntityDetail:
      type: object
      properties:
        entity_id:
          type: string
        revision_id:
          type: string
        id:
          type: string
          description: >-
            A CVE is one possible public identifier for a vulnerability. It is
            not a severity or exploitation status.
        aliases:
          type: array
          items:
            type: string
        title:
          type: string
        summary:
          anyOf:
            - type: string
            - type: 'null'
        state:
          anyOf:
            - type: string
            - type: 'null'
        published_at:
          anyOf:
            - type: string
            - type: 'null'
        source_updated_at:
          anyOf:
            - type: string
            - type: 'null'
        updated_at:
          type: string
          format: date-time
      required:
        - entity_id
        - revision_id
        - id
        - aliases
        - title
        - summary
        - state
        - published_at
        - source_updated_at
        - updated_at
    AffectedTarget:
      type: object
      properties:
        key:
          type: string
        kind:
          type: string
          enum:
            - package
            - application
            - operating_system
            - appliance
            - hardware
            - firmware
            - cpe
            - product
            - repository
        entity:
          anyOf:
            - type: object
              properties:
                type:
                  const: software
                id:
                  type: string
              required:
                - type
                - id
            - type: 'null'
        name:
          type: string
        ecosystem:
          anyOf:
            - type: string
            - type: 'null'
        identifiers:
          type: object
          properties:
            purl:
              type: string
              example: pkg:npm/react
            cpe:
              type: string
              example: cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
            repository:
              type: string
              format: uri
        ranges:
          type: array
          items:
            $ref: '#/components/schemas/AffectedRange'
        fixed_versions:
          type: array
          items:
            type: string
        source_count:
          type: integer
          minimum: 0
        conflict_count:
          type: integer
          minimum: 0
      required:
        - key
        - kind
        - entity
        - name
        - ecosystem
        - identifiers
        - ranges
        - fixed_versions
        - source_count
        - conflict_count
    RelationshipSummary:
      type: object
      properties:
        vulnerability:
          type: integer
          minimum: 0
        advisory:
          type: integer
          minimum: 0
        weakness:
          type: integer
          minimum: 0
        software:
          type: integer
          minimum: 0
        attack-pattern:
          type: integer
          minimum: 0
      additionalProperties: false
    RelationshipGroup:
      type: object
      properties:
        entity:
          type: string
          enum:
            - vulnerability
            - advisory
            - weakness
            - software
            - attack-pattern
        data:
          type: array
          items:
            $ref: '#/components/schemas/RelationshipEntry'
        _meta:
          type: object
          properties:
            total:
              type: integer
              minimum: 0
            limit:
              type: integer
              minimum: 1
            current:
              type: object
              properties:
                cursor:
                  anyOf:
                    - type: string
                    - type: 'null'
                url:
                  type: string
                  format: uri
              required:
                - cursor
                - url
            next:
              anyOf:
                - type: object
                  properties:
                    cursor:
                      type: string
                    url:
                      type: string
                      format: uri
                  required:
                    - cursor
                    - url
                - type: 'null'
          required:
            - total
            - limit
            - current
            - next
      required:
        - entity
        - data
        - _meta
    Provenance:
      type: object
      properties:
        by_path:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ProvenanceEvidence'
        affected_targets:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        affected_ranges:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - by_path
        - affected_targets
        - affected_ranges
    WeaknessOverview:
      type: object
      properties:
        abstraction:
          anyOf:
            - type: string
            - type: 'null'
        likelihood:
          anyOf:
            - type: string
            - type: 'null'
        extended_description:
          anyOf:
            - type: string
            - type: 'null'
        consequences:
          type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        mitigations:
          type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        platforms:
          type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        detection_methods:
          type: array
          items:
            $ref: '#/components/schemas/JsonValue'
      required:
        - abstraction
        - likelihood
        - extended_description
        - consequences
        - mitigations
        - platforms
        - detection_methods
    WeaknessPreventionExamples:
      type: object
      properties:
        mitigations:
          type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        detection_methods:
          type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        examples:
          type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        observed_examples:
          type: array
          items:
            $ref: '#/components/schemas/JsonValue'
      required:
        - mitigations
        - detection_methods
        - examples
        - observed_examples
    JsonValue:
      oneOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    AffectedRange:
      type: object
      properties:
        key:
          type: string
        type:
          type: string
          enum:
            - ecosystem
            - semver
            - git
            - cpe
            - unknown
        introduced:
          anyOf:
            - type: string
            - type: 'null'
        last_affected:
          anyOf:
            - type: string
            - type: 'null'
        fixed:
          anyOf:
            - type: string
            - type: 'null'
        events:
          type: array
          items:
            type: object
            properties:
              at:
                type: string
              status:
                type: string
            required:
              - at
              - status
        source_count:
          type: integer
          minimum: 0
        conflict:
          type: boolean
      required:
        - key
        - type
        - introduced
        - last_affected
        - fixed
        - events
        - source_count
        - conflict
    RelationshipEntry:
      type: object
      properties:
        entity:
          type: string
          enum:
            - vulnerability
            - advisory
            - weakness
            - software
            - attack-pattern
        entity_id:
          type: string
        id:
          type: string
        title:
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
        relationship:
          type: string
        direction:
          type: string
          enum:
            - incoming
            - outgoing
        source_count:
          type: integer
          minimum: 0
        sources:
          type: array
          items:
            $ref: '#/components/schemas/CatalogSourceIdentity'
        source_updated_at:
          anyOf:
            - type: string
            - type: 'null'
        affected_range:
          anyOf:
            - type: string
            - type: 'null'
        fixed_versions:
          type: array
          items:
            type: string
      required:
        - entity
        - entity_id
        - id
        - title
        - relationship
        - direction
        - source_count
        - sources
        - source_updated_at
        - affected_range
        - fixed_versions
    ProvenanceEvidence:
      type: object
      properties:
        observation_id:
          type: string
        source:
          type: string
        source_name:
          type: string
        source_publisher:
          type: string
        source_record:
          type: string
        source_record_id:
          type: string
        role:
          type: string
        reason:
          type: string
        conflict:
          $ref: '#/components/schemas/JsonValue'
        source_modified_at:
          anyOf:
            - type: string
            - type: 'null'
        source_url:
          anyOf:
            - type: string
            - type: 'null'
        claim:
          type: object
          properties:
            attribute:
              type: string
            item:
              anyOf:
                - type: string
                - type: 'null'
            value:
              $ref: '#/components/schemas/JsonValue'
            operation:
              type: string
            asserted_at:
              anyOf:
                - type: string
                - type: 'null'
          required:
            - attribute
            - item
            - value
            - operation
            - asserted_at
        source_record_version:
          type: object
          properties:
            id:
              type: string
            url:
              type: string
              format: uri
            fetched_at:
              type: string
              format: date-time
            payload_hash:
              type: string
            upstream_schema_version:
              anyOf:
                - type: string
                - type: 'null'
            status:
              type: string
          required:
            - id
            - url
            - fetched_at
            - payload_hash
            - upstream_schema_version
            - status
        source_artifact:
          anyOf:
            - type: object
              properties:
                url:
                  type: string
                  format: uri
                archive_member:
                  anyOf:
                    - type: string
                    - type: 'null'
                content_hash:
                  type: string
                fetched_at:
                  type: string
                  format: date-time
                media_type:
                  anyOf:
                    - type: string
                    - type: 'null'
                release_version:
                  anyOf:
                    - type: string
                    - type: 'null'
              required:
                - url
                - archive_member
                - content_hash
                - fetched_at
                - media_type
                - release_version
            - type: 'null'
      required:
        - observation_id
        - source
        - source_name
        - source_publisher
        - source_record
        - source_record_id
        - role
        - reason
        - conflict
        - source_modified_at
        - source_url
        - claim
        - source_record_version
        - source_artifact
    CatalogSourceIdentity:
      type: object
      properties:
        label:
          type: string
        publisher:
          type: string
        feed:
          type: string
        aliases:
          type: array
          items:
            type: string
        url:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
        source_record_version_ids:
          type: array
          items:
            type: string
            format: uuid
      required:
        - label
        - publisher
        - feed
        - aliases
        - url
        - source_record_version_ids
  responses:
    BadRequest:
      description: The request parameters are invalid.
      headers:
        X-API-Version:
          description: API contract version used to process the request.
          schema:
            type: string
            example: '2026-08-19'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
          example:
            type: https://docs.zdlake.com/api/errors#bad-request
            title: Bad Request
            status: 400
            detail: Invalid request parameters
            code: VALIDATION_ERROR
            request_id: req_01J7Y8Z9ABCDEF0123456789AB
            errors:
              limit:
                - Number must be less than or equal to 100
    Unauthorized:
      description: The API key is missing, invalid, expired, or revoked.
      headers:
        X-API-Version:
          description: API contract version used to process the request.
          schema:
            type: string
            example: '2026-08-19'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
          example:
            type: https://docs.zdlake.com/api/authentication
            title: Unauthorized
            status: 401
            detail: Invalid or missing API key
            code: UNAUTHORIZED
            request_id: req_01J7Y8Z9ABCDEF0123456789AB
    Forbidden:
      description: The API key lacks permission for this operation.
      headers:
        X-API-Version:
          description: API contract version used to process the request.
          schema:
            type: string
            example: '2026-08-19'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
          example:
            type: https://docs.zdlake.com/api/authentication
            title: Forbidden
            status: 403
            detail: Access denied for this operation
            code: FORBIDDEN
            request_id: req_01J7Y8Z9ABCDEF0123456789AB
    NotFound:
      description: The requested resource was not found.
      headers:
        X-API-Version:
          description: API contract version used to process the request.
          schema:
            type: string
            example: '2026-08-19'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
          example:
            type: https://docs.zdlake.com/api/errors#not-found
            title: Not Found
            status: 404
            detail: Entity record not found
            code: NOT_FOUND
            request_id: req_01J7Y8Z9ABCDEF0123456789AB
    RateLimited:
      description: The API key has exceeded its request quota.
      headers:
        X-API-Version:
          description: API contract version used to process the request.
          schema:
            type: string
            example: '2026-08-19'
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            example: 30
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
          example:
            type: https://docs.zdlake.com/api/rate-limits
            title: Too Many Requests
            status: 429
            detail: Rate limit exceeded
            code: RATE_LIMITED
            request_id: req_01J7Y8Z9ABCDEF0123456789AB
            errors:
              retry_after: 30
    InternalServerError:
      description: The API could not complete the request.
      headers:
        X-API-Version:
          description: API contract version used to process the request.
          schema:
            type: string
            example: '2026-08-19'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
          example:
            type: https://docs.zdlake.com/api/errors#internal-server-error
            title: Internal Server Error
            status: 500
            detail: An internal error occurred
            code: INTERNAL_ERROR
            request_id: req_01J7Y8Z9ABCDEF0123456789AB
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Zero API key
      description: 'Send the API key as Authorization: Bearer <key>.'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Alternative API-key header for clients without bearer-token support.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.