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

# List all the components

> This API is used to list all the components and the details about request and response format of each component. It includes the json schema of the request and response format of each component.

The response of this API contains the details of all the components and request and response format of each component in the form of [json schema](https://json-schema.org/overview/what-is-jsonschema). These json schemas can be used to validate the request and response format of each component.

The format of the response is as follows:

### Response

```json theme={null}
{
    "success": true,
    "data": {
        "autosuggest": {
            "question": {}, //json_schema for I-ATSG component question
            "answer": {} // json_schema for I-ATSG component answer
        },
        "multi_select": {
            "question": {}, // json_schema for I-MULT component question
            "answer": {} // json_schema for I-MULT component answer
        },
        "radio": {
            "question": {}, // json_schema for I-RADO component question
            "answer": {} // json_schema for I-RADO component answer
        },
        "radio_group": {
            "question": {}, // json_schema for I-RADG component question
            "answer": {} // json_schema for I-RADG component answer
        }
    }
}
```

***


## OpenAPI

````yaml get /assessment/api/v1/component_list/
openapi: 3.0.3
info:
  title: Assessment APIs
  version: 1.0.0
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /assessment/api/v1/component_list/:
    get:
      tags:
        - List all the components
      summary: List all the components
      description: >-
        This API is used to list all the components and the details about
        request and response format of each component. It includes the json
        schema of the request and response format of each component.
      parameters:
        - name: auth
          in: header
          required: true
          description: The auth token of the user. It is used to authenticate the user.
          schema:
            type: string
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
        - name: Content-Type
          in: header
          description: >-
            The content type of the request. It is used to determine the type of
            data being sent.
          schema:
            type: string
          example: application/json
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                description: >-
                  The response contains [json
                  schema](https://json-schema.org/overview/what-is-jsonschema)
                  for request and response format of each component.
              example:
                success: true
                data:
                  autosuggest:
                    question:
                      $schema: http://json-schema.org/draft-07/schema#
                      type: object
                      properties:
                        questions:
                          type: array
                          items:
                            type: object
                            properties:
                              qid:
                                type: number
                              component_code:
                                type: string
                              question_text:
                                type: string
                              tip:
                                type: string
                              component_data:
                                type: object
                                properties:
                                  url:
                                    type: object
                                    properties:
                                      base_url:
                                        type: string
                                      query_params:
                                        type: object
                                        properties:
                                          gender:
                                            type: string
                                          age:
                                            type: string
                                          src:
                                            type: string
                                        required:
                                          - gender
                                          - age
                                      search_query_param:
                                        type: string
                                    required:
                                      - base_url
                                      - query_params
                                      - search_query_param
                                  autosuggest_static_choices:
                                    type: object
                                    properties:
                                      sections:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            section_title:
                                              type: string
                                            choices:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  id:
                                                    type: string
                                                  common_name:
                                                    type: string
                                                  is_selected:
                                                    type: boolean
                                                required:
                                                  - id
                                                  - common_name
                                          required:
                                            - section_title
                                            - choices
                                    required:
                                      - sections
                                required:
                                  - url
                                  - autosuggest_static_choices
                              is_mandatory:
                                type: boolean
                            required:
                              - qid
                              - component_code
                              - question_text
                              - tip
                              - component_data
                              - is_mandatory
                        progress:
                          type: string
                        is_last_question:
                          type: boolean
                      required:
                        - questions
                        - progress
                        - is_last_question
                    answer:
                      $schema: http://json-schema.org/draft-07/schema#
                      type: object
                      properties:
                        user_response:
                          type: array
                          items:
                            type: object
                            properties:
                              selected_choices:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    choice_id:
                                      type: string
                                    choice_label:
                                      type: string
                                  required:
                                    - choice_id
                            required:
                              - selected_choices
                      required:
                        - user_response
                  multi_select:
                    question:
                      $schema: http://json-schema.org/draft-07/schema#
                      type: object
                      properties:
                        questions:
                          type: array
                          items:
                            type: object
                            properties:
                              qid:
                                type: number
                              component_code:
                                type: string
                              question_text:
                                type: string
                              tip:
                                type: string
                              component_data:
                                type: object
                                properties:
                                  choices:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        choice_id:
                                          type: string
                                        choice_label:
                                          type: string
                                      required:
                                        - choice_id
                                        - choice_label
                                required:
                                  - choices
                            required:
                              - qid
                              - component_code
                              - component_data
                              - question_text
                        progress:
                          type: string
                        is_last_question:
                          type: boolean
                      required:
                        - questions
                        - progress
                        - is_last_question
                    answer:
                      $schema: http://json-schema.org/draft-07/schema#
                      type: object
                      properties:
                        user_response:
                          type: array
                          items:
                            type: object
                            properties:
                              selected_choices:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    choice_id:
                                      type: string
                                    choice_label:
                                      type: string
                                  required:
                                    - choice_id
                            required:
                              - selected_choices
                      required:
                        - user_response
                  radio:
                    question:
                      $schema: http://json-schema.org/draft-07/schema#
                      type: object
                      properties:
                        questions:
                          type: array
                          items:
                            type: object
                            properties:
                              qid:
                                type: number
                              component_code:
                                type: string
                              question_text:
                                type: string
                              tip:
                                type: string
                              component_data:
                                type: object
                                properties:
                                  choices:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        choice_id:
                                          type: string
                                        choice_label:
                                          type: string
                                      required:
                                        - choice_id
                                        - choice_label
                                required:
                                  - choices
                            required:
                              - qid
                              - component_code
                              - component_data
                              - question_text
                        progress:
                          type: string
                        is_last_question:
                          type: boolean
                      required:
                        - questions
                        - progress
                        - is_last_question
                    answer:
                      $schema: http://json-schema.org/draft-07/schema#
                      type: object
                      properties:
                        user_response:
                          type: array
                          items:
                            type: object
                            properties:
                              selected_choices:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    choice_id:
                                      type: string
                                    choice_label:
                                      type: string
                                  required:
                                    - choice_id
                                maxItems: 1
                            required:
                              - selected_choices
                      required:
                        - user_response
                  radio_group:
                    question:
                      $schema: http://json-schema.org/draft-07/schema#
                      type: object
                      properties:
                        questions:
                          type: array
                          items:
                            type: object
                            properties:
                              qid:
                                type: number
                              component_code:
                                type: string
                              question_text:
                                type: string
                              tip:
                                type: string
                              component_data:
                                type: object
                                properties:
                                  choices:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        choice_id:
                                          type: string
                                        choice_label:
                                          type: string
                                        qualifier:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              id:
                                                type: string
                                              label:
                                                type: string
                                            required:
                                              - id
                                              - label
                                      required:
                                        - choice_id
                                        - choice_label
                                        - qualifier
                                required:
                                  - choices
                            required:
                              - qid
                              - component_code
                              - component_data
                              - question_text
                        progress:
                          type: string
                        is_last_question:
                          type: boolean
                      required:
                        - questions
                        - progress
                        - is_last_question
                    answer:
                      $schema: http://json-schema.org/draft-07/schema#
                      type: object
                      properties:
                        user_response:
                          type: array
                          items:
                            type: object
                            properties:
                              selected_choices:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    choice_id:
                                      type: string
                                    choice_label:
                                      type: string
                                    choice_qualifier:
                                      type: string
                                      enum:
                                        - p
                                        - a
                                        - u
                                  required:
                                    - choice_id
                                    - choice_qualifier
                            required:
                              - selected_choices
                      required:
                        - user_response
        4XX:
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
              example:
                error:
                  error_code: bad_request
                  display_message: Something went wrong. Please try again.
                  message: Bad Request

````