:doc:`QApps <../../qapps>` / Client / get_q_app_session

*****************
get_q_app_session
*****************



.. py:method:: QApps.Client.get_q_app_session(**kwargs)

  

  Retrieves the current state and results for an active session of an Amazon Q App.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/qapps-2023-11-27/GetQAppSession>`_  


  **Request Syntax**
  ::

    response = client.get_q_app_session(
        instanceId='string',
        sessionId='string'
    )
    
  :type instanceId: string
  :param instanceId: **[REQUIRED]** 

    The unique identifier of the Amazon Q Business application environment instance.

    

  
  :type sessionId: string
  :param sessionId: **[REQUIRED]** 

    The unique identifier of the Q App session to retrieve.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'sessionId': 'string',
          'sessionArn': 'string',
          'sessionName': 'string',
          'appVersion': 123,
          'latestPublishedAppVersion': 123,
          'status': 'IN_PROGRESS'|'WAITING'|'COMPLETED'|'ERROR',
          'cardStatus': {
              'string': {
                  'currentState': 'IN_PROGRESS'|'WAITING'|'COMPLETED'|'ERROR',
                  'currentValue': 'string',
                  'submissions': [
                      {
                          'value': {...}|[...]|123|123.4|'string'|True|None,
                          'submissionId': 'string',
                          'timestamp': datetime(2015, 1, 1)
                      },
                  ]
              }
          },
          'userIsHost': True|False
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **sessionId** *(string) --* 

        The unique identifier of the Q App session.

        
      

      - **sessionArn** *(string) --* 

        The Amazon Resource Name (ARN) of the Q App session.

        
      

      - **sessionName** *(string) --* 

        The name of the Q App session.

        
      

      - **appVersion** *(integer) --* 

        The version of the Q App used for the session.

        
      

      - **latestPublishedAppVersion** *(integer) --* 

        The latest published version of the Q App used for the session.

        
      

      - **status** *(string) --* 

        The current status of the Q App session.

        
      

      - **cardStatus** *(dict) --* 

        The current status for each card in the Q App session.

        
        

        - *(string) --* 
          

          - *(dict) --* 

            The current status and value of a card in an active Amazon Q App session.

            
            

            - **currentState** *(string) --* 

              The current state of the card.

              
            

            - **currentValue** *(string) --* 

              The current value or result associated with the card.

              
            

            - **submissions** *(list) --* 

              A list of previous submissions, if the card is a form card.

              
              

              - *(dict) --* 

                A record created when a user submits a form card.

                
                

                - **value** (:ref:`document<document>`) -- 

                  The data submitted by the user.

                  
                

                - **submissionId** *(string) --* 

                  The unique identifier of the submission.

                  
                

                - **timestamp** *(datetime) --* 

                  The date and time when the card is submitted.

                  
            
          
        
    
  
      

      - **userIsHost** *(boolean) --* 

        Indicates whether the current user is the owner of the Q App data collection session.

        
  
  **Exceptions**
  
  *   :py:class:`QApps.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`QApps.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`QApps.Client.exceptions.ValidationException`

  
  *   :py:class:`QApps.Client.exceptions.InternalServerException`

  
  *   :py:class:`QApps.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`QApps.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`QApps.Client.exceptions.ThrottlingException`

  