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

*********************
list_devices_for_user
*********************



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

  

  Retrieves a paginated list of devices associated with a specific user in a Wickr network. This operation returns information about all devices where the user has logged into Wickr.

  

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


  **Request Syntax**
  ::

    response = client.list_devices_for_user(
        networkId='string',
        userId='string',
        nextToken='string',
        maxResults=123,
        sortFields='string',
        sortDirection='ASC'|'DESC'
    )
    
  :type networkId: string
  :param networkId: **[REQUIRED]** 

    The ID of the Wickr network containing the user.

    

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

    The unique identifier of the user whose devices will be listed.

    

  
  :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 devices to return in a single page. Valid range is 1-100. Default is 10.

    

  
  :type sortFields: string
  :param sortFields: 

    The fields to sort devices by. Multiple fields can be specified by separating them with '+'. Accepted values include 'lastlogin', 'type', 'suspend', and 'created'.

    

  
  :type sortDirection: string
  :param sortDirection: 

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

    

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

    
    ::

      {
          'nextToken': 'string',
          'devices': [
              {
                  'appId': 'string',
                  'created': 'string',
                  'lastLogin': 'string',
                  'statusText': 'string',
                  'suspend': True|False,
                  'type': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

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

        
      

      - **devices** *(list) --* 

        A list of device objects associated with the user within the current page.

        
        

        - *(dict) --* 

          Represents a device where a user has logged into Wickr, containing information about the device's type, status, and login history.

          
          

          - **appId** *(string) --* 

            The unique application ID for the Wickr app on this device.

            
          

          - **created** *(string) --* 

            The timestamp when the device first appeared in the Wickr database.

            
          

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

            The timestamp when the device last successfully logged into Wickr. This is also used to determine SSO idle time.

            
          

          - **statusText** *(string) --* 

            The current status of the device, either 'Active' or 'Reset' depending on whether the device is currently active or has been marked for reset.

            
          

          - **suspend** *(boolean) --* 

            Indicates whether the device is suspended.

            
          

          - **type** *(string) --* 

            The operating system of the device (e.g., 'MacOSX', 'Windows', 'iOS', 'Android').

            
      
    
  
  **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`

  