:doc:`WickrAdminAPI <../../wickr>` / Client / list_bots

*********
list_bots
*********



.. py:method:: WickrAdminAPI.Client.list_bots(**kwargs)

  

  Retrieves a paginated list of bots in a specified Wickr network. You can filter and sort the results based on various criteria.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/wickr-2024-02-01/ListBots>`_  


  **Request Syntax**
  ::

    response = client.list_bots(
        networkId='string',
        nextToken='string',
        maxResults=123,
        sortFields='string',
        sortDirection='ASC'|'DESC',
        displayName='string',
        username='string',
        status=123,
        groupId='string'
    )
    
  :type networkId: string
  :param networkId: **[REQUIRED]** 

    The ID of the Wickr network from which to list bots.

    

  
  :type nextToken: string
  :param nextToken: 

    The token for retrieving the next page of results. This is returned from a previous request when there are more results available.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of bots to return in a single page. Valid range is 1-100. Default is 10.

    

  
  :type sortFields: string
  :param sortFields: 

    The fields to sort bots by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'displayName', 'status', and 'groupId'.

    

  
  :type sortDirection: string
  :param sortDirection: 

    The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.

    

  
  :type displayName: string
  :param displayName: 

    Filter results to only include bots with display names matching this value.

    

  
  :type username: string
  :param username: 

    Filter results to only include bots with usernames matching this value.

    

  
  :type status: integer
  :param status: 

    Filter results to only include bots with this status (1 for pending, 2 for active).

    

  
  :type groupId: string
  :param groupId: 

    Filter results to only include bots belonging to this security group.

    

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

    
    ::

      {
          'bots': [
              {
                  'botId': 'string',
                  'displayName': 'string',
                  'username': 'string',
                  'uname': 'string',
                  'pubkey': 'string',
                  'status': 123,
                  'groupId': 'string',
                  'hasChallenge': True|False,
                  'suspended': True|False,
                  'lastLogin': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **bots** *(list) --* 

        A list of bot objects matching the specified filters and within the current page.

        
        

        - *(dict) --* 

          Represents a bot account in a Wickr network with all its informational fields.

          
          

          - **botId** *(string) --* 

            The unique identifier of the bot.

            
          

          - **displayName** *(string) --* 

            The display name of the bot that is visible to users.

            
          

          - **username** *(string) --* 

            The username of the bot.

            
          

          - **uname** *(string) --* 

            The unique username hash identifier for the bot.

            
          

          - **pubkey** *(string) --* 

            The public key of the bot used for encryption.

            
          

          - **status** *(integer) --* 

            The current status of the bot (1 for pending, 2 for active).

            
          

          - **groupId** *(string) --* 

            The ID of the security group to which the bot belongs.

            
          

          - **hasChallenge** *(boolean) --* 

            Indicates whether the bot has a password set.

            
          

          - **suspended** *(boolean) --* 

            Indicates whether the bot is currently suspended.

            
          

          - **lastLogin** *(string) --* 

            The timestamp of the bot's last login.

            
      
    
      

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

        The token to use for retrieving the next page of results. If this is not present, there are no more results.

        
  
  **Exceptions**
  
  *   :py:class:`WickrAdminAPI.Client.exceptions.ValidationError`

  
  *   :py:class:`WickrAdminAPI.Client.exceptions.BadRequestError`

  
  *   :py:class:`WickrAdminAPI.Client.exceptions.ResourceNotFoundError`

  
  *   :py:class:`WickrAdminAPI.Client.exceptions.ForbiddenError`

  
  *   :py:class:`WickrAdminAPI.Client.exceptions.UnauthorizedError`

  
  *   :py:class:`WickrAdminAPI.Client.exceptions.InternalServerError`

  
  *   :py:class:`WickrAdminAPI.Client.exceptions.RateLimitError`

  