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

# Get GRC Assessment

> Get a specific GRC assessment for a given connection.



## OpenAPI

````yaml get /grc/assessments/{assessment_id}
openapi: 3.1.0
info:
  title: Leen Security API
  version: 0.0.1
servers:
  - url: https://api.leen.dev/v1
    description: Production API
  - url: https://api.eu-c1.leen.dev/v1
    description: Production API (EU Region)
  - url: https://api.ap-se2.leen.dev/v1
    description: Production Api (APAC Region)
security: []
paths:
  /grc/assessments/{assessment_id}:
    get:
      tags:
        - grc
        - assessments
      summary: Get GRC Assessment
      description: Get a specific GRC assessment for a given connection.
      operationId: get_grc_assessment
      parameters:
        - name: assessment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Assessment Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GRCAssessmentResponse'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorException'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorException'
          description: Unprocessable Entity
      security:
        - Connection-ID: []
          API-Key: []
components:
  schemas:
    GRCAssessmentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Leen's UUID for the GRC assessment
        state:
          allOf:
            - $ref: '#/components/schemas/AssessmentStatus'
          description: Current state of the assessment
          default: NEW
        respondent:
          anyOf:
            - type: string
            - type: 'null'
          title: Respondent
          description: Name or identifier of the respondent for the assessment
        control_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Control Id
          description: Identifier of the associated GRC control
        template_id:
          type: string
          title: Template Id
          description: Identifier for the assessment template
        template_name:
          type: string
          title: Template Name
          description: Name of the assessment template
        vendor_attributes:
          allOf:
            - $ref: '#/components/schemas/ScopedGRCAssessmentVendorAttributes'
          description: Vendor-specific attributes and identifiers
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Timestamp when the assessment was created
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: Timestamp when the assessment was last updated
        questions:
          anyOf:
            - items:
                $ref: '#/components/schemas/ParentGRCAssessmentQuestion'
              type: array
            - type: 'null'
          title: Questions
          description: List of questions along with their responses
      type: object
      required:
        - id
        - template_id
        - template_name
        - vendor_attributes
      title: Assessment
      description: Response model for returning GRC assessment details via an API endpoint.
    ErrorException:
      properties:
        detail:
          type: string
          title: Detail
          description: Error message
      type: object
      required:
        - detail
      title: ErrorException
    AssessmentStatus:
      type: string
      enum:
        - NEW
        - IN_PROGRESS
        - COMPLETED
        - CANCELLED
      title: AssessmentStatus
      description: Enum for different statuses of an assessment.
    ScopedGRCAssessmentVendorAttributes:
      properties:
        id:
          type: string
          title: Id
        vendor:
          type: string
          title: Vendor
        data:
          anyOf:
            - type: object
            - type: 'null'
          title: Data
          description: Vendor-specific data
      type: object
      required:
        - id
        - vendor
      title: ScopedGRCAssessmentVendorAttributes
      description: Vendor-specific attributes for assessments.
    ParentGRCAssessmentQuestion:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Leen's UUID for the GRC assessment question
        question:
          type: string
          title: Question
          description: The text of the assessment question
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Detailed description or context for the question
        question_type:
          type: string
          title: Question Type
          description: Type of the question (e.g., Boolen etc...)
        question_type_metadata:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ChoiceMetadata'
                - $ref: '#/components/schemas/MinMaxMetadata'
                - $ref: '#/components/schemas/StringMetadata'
              discriminator:
                propertyName: type
                mapping:
                  DROPDOWN:
                    $ref: '#/components/schemas/ChoiceMetadata'
                  INTEGER:
                    $ref: '#/components/schemas/MinMaxMetadata'
                  MULTIPLE_SELECTION:
                    $ref: '#/components/schemas/ChoiceMetadata'
                  PERCENTAGE:
                    $ref: '#/components/schemas/MinMaxMetadata'
                  RADIO:
                    $ref: '#/components/schemas/ChoiceMetadata'
                  TEXT:
                    $ref: '#/components/schemas/StringMetadata'
            - type: 'null'
          title: Question Type Metadata
        mandatory:
          type: boolean
          title: Mandatory
          description: Indicates if the question is mandatory
          default: false
        parent_vendor_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Vendor Id
          description: Vendor-specific identifier for the parent question
        vendor_attributes:
          allOf:
            - $ref: '#/components/schemas/ScopedGRCAssessmentQuestionVendorAttributes'
          description: Vendor-specific attributes and identifiers
        response:
          anyOf:
            - type: string
            - type: 'null'
          title: Response
          description: The response provided for the assessment question
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Timestamp when the assessment was created
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: Timestamp when the assessment was last updated
        sub_questions:
          anyOf:
            - items:
                $ref: '#/components/schemas/GRCAssessmentQuestion'
              type: array
            - type: 'null'
          title: Sub Questions
          description: List of child questions if any
      type: object
      required:
        - id
        - question
        - question_type
        - vendor_attributes
      title: Assessment Question
      description: Response model for returning GRC assessment details via an API endpoint.
    ChoiceMetadata:
      properties:
        type:
          type: string
          enum:
            - RADIO
            - MULTIPLE_SELECTION
            - DROPDOWN
          title: Type
        options:
          items:
            $ref: '#/components/schemas/LabelValue'
          type: array
          title: Options
      type: object
      required:
        - type
        - options
      title: ChoiceMetadata
    MinMaxMetadata:
      properties:
        type:
          type: string
          enum:
            - INTEGER
            - PERCENTAGE
          title: Type
        min_value:
          anyOf:
            - type: integer
            - type: 'null'
          title: Min Value
        max_value:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Value
      type: object
      required:
        - type
      title: MinMaxMetadata
    StringMetadata:
      properties:
        type:
          type: string
          enum:
            - TEXT
          const: TEXT
          title: Type
          default: TEXT
        type_of_string:
          type: string
          enum:
            - single_line
            - multi_line
          title: Type Of String
      type: object
      required:
        - type_of_string
      title: StringMetadata
    ScopedGRCAssessmentQuestionVendorAttributes:
      properties:
        id:
          type: string
          title: Id
        vendor:
          type: string
          title: Vendor
        data:
          anyOf:
            - type: object
            - type: 'null'
          title: Data
          description: Vendor-specific data
      type: object
      required:
        - id
        - vendor
      title: ScopedGRCAssessmentQuestionVendorAttributes
      description: Vendor-specific attributes for assessment questions.
    GRCAssessmentQuestion:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Leen's UUID for the GRC assessment question
        question:
          type: string
          title: Question
          description: The text of the assessment question
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Detailed description or context for the question
        question_type:
          type: string
          title: Question Type
          description: Type of the question (e.g., Boolen etc...)
        question_type_metadata:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/ChoiceMetadata'
                - $ref: '#/components/schemas/MinMaxMetadata'
                - $ref: '#/components/schemas/StringMetadata'
              discriminator:
                propertyName: type
                mapping:
                  DROPDOWN:
                    $ref: '#/components/schemas/ChoiceMetadata'
                  INTEGER:
                    $ref: '#/components/schemas/MinMaxMetadata'
                  MULTIPLE_SELECTION:
                    $ref: '#/components/schemas/ChoiceMetadata'
                  PERCENTAGE:
                    $ref: '#/components/schemas/MinMaxMetadata'
                  RADIO:
                    $ref: '#/components/schemas/ChoiceMetadata'
                  TEXT:
                    $ref: '#/components/schemas/StringMetadata'
            - type: 'null'
          title: Question Type Metadata
        mandatory:
          type: boolean
          title: Mandatory
          description: Indicates if the question is mandatory
          default: false
        parent_vendor_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Vendor Id
          description: Vendor-specific identifier for the parent question
        vendor_attributes:
          allOf:
            - $ref: '#/components/schemas/ScopedGRCAssessmentQuestionVendorAttributes'
          description: Vendor-specific attributes and identifiers
        response:
          anyOf:
            - type: string
            - type: 'null'
          title: Response
          description: The response provided for the assessment question
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: Timestamp when the assessment was created
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: Timestamp when the assessment was last updated
        sub_questions:
          anyOf:
            - items:
                $ref: '#/components/schemas/GRCAssessmentQuestion'
              type: array
            - type: 'null'
          title: Sub Questions
          description: List of child questions if any
        condition:
          anyOf:
            - $ref: '#/components/schemas/GRCAssessmentQuestionCondition'
            - type: 'null'
          description: Conditional logic for displaying the question
      type: object
      required:
        - id
        - question
        - question_type
        - vendor_attributes
      title: Assessment Question
      description: |-
        Variant of GRCAssessmentQuestion that does not include `condition`.
        Useful for representing sub questions.
    LabelValue:
      properties:
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        value:
          anyOf:
            - type: string
            - type: 'null'
          title: Value
      type: object
      title: LabelValue
    GRCAssessmentQuestionCondition:
      properties:
        operator:
          type: string
          enum:
            - EQ
            - NEQ
            - GT
            - GTE
            - LT
            - LTE
            - IN
            - NOT_IN
          title: Operator
          default: EQ
        value:
          type: string
          title: Value
      type: object
      required:
        - value
      title: GRCAssessmentQuestionCondition
  securitySchemes:
    Connection-ID:
      type: apiKey
      in: header
      name: X-CONNECTION-ID
    API-Key:
      type: apiKey
      in: header
      name: X-API-KEY

````