:doc:`QConnect <../../qconnect>` / Client / search_sessions

***************
search_sessions
***************



.. py:method:: QConnect.Client.search_sessions(**kwargs)

  

  Searches for sessions.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/qconnect-2020-10-19/SearchSessions>`_  


  **Request Syntax**
  ::

    response = client.search_sessions(
        nextToken='string',
        maxResults=123,
        assistantId='string',
        searchExpression={
            'filters': [
                {
                    'field': 'NAME',
                    'operator': 'EQUALS',
                    'value': 'string'
                },
            ]
        }
    )
    
  :type nextToken: string
  :param nextToken: 

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return per page.

    

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

    The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

    

  
  :type searchExpression: dict
  :param searchExpression: **[REQUIRED]** 

    The search expression to filter results.

    

  
    - **filters** *(list) --* **[REQUIRED]** 

      The search expression filters.

      

    
      - *(dict) --* 

        A search filter.

        

      
        - **field** *(string) --* **[REQUIRED]** 

          The field on which to filter.

          

        
        - **operator** *(string) --* **[REQUIRED]** 

          The operator to use for comparing the field’s value with the provided value.

          

        
        - **value** *(string) --* **[REQUIRED]** 

          The desired field value on which to filter.

          

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

    
    ::

      {
          'sessionSummaries': [
              {
                  'sessionId': 'string',
                  'sessionArn': 'string',
                  'assistantId': 'string',
                  'assistantArn': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **sessionSummaries** *(list) --* 

        Summary information about the sessions.

        
        

        - *(dict) --* 

          Summary information about the session.

          
          

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

            The identifier of the session.

            
          

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

            The Amazon Resource Name (ARN) of the session.

            
          

          - **assistantId** *(string) --* 

            The identifier of the Amazon Q in Connect assistant.

            
          

          - **assistantArn** *(string) --* 

            The Amazon Resource Name (ARN) of the Amazon Q in Connect assistant.

            
      
    
      

      - **nextToken** *(string) --* 

        If there are additional results, this is the token for the next set of results.

        
  
  **Exceptions**
  
  *   :py:class:`QConnect.Client.exceptions.ValidationException`

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

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

  
  *   :py:class:`QConnect.Client.exceptions.ResourceNotFoundException`

  