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

````

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