Hi,
I built a query in Python and want to extract few values like, user id, division id, and name from the User search Response, but when m trying to use loads/dumps/or trying to iterate, it is throwing me below errors. could someone please help me in retrieving required values like ids/names from below response.
AttributeError: 'UsersSearchResponse' object cannot iterate
AttributeError: 'UsersSearchResponse' object has no attribute json
Object of type UsersSearchResponse is not JSON serializable
My output for user search is as below:
{'current_page': '/api/v2/users/search?q64=H4sIAAAAAAAAAD3NMQ-CMBCG4f9yM4srG8ESXGrUOhhjyCknElpar9EEP67BRPX9558N8EwOvKQXiF4Yg-3BN6BeIxlWm-QQr6XKtvJEyTwbEnXK-_R0KI_qMOCOmtQt5FYR4yD5dgyuYU5GocNyWDuFOMmAaYhcF_8p5rQ1suUJ-THS_2eHs7ieKlUKWRVCJWXMH8BpJS0Y6wAAAA%3D',
'next_page': None,
'page_count': 1,
'page_number': 1,
'page_size': 25,
'previous_page': None,
'results': [{'acd_auto_answer': False,
'addresses': [{'address': 'xyz@e.cmail.com',
'country_code': None,
'display': None,
'extension': None,
'media_type': 'EMAIL',
'type': 'WORK'}],
'authorization': None,
'biography': None,
'certifications': None,
'chat': {'jabber_id': '5fa5a0bb550ee31962ee4a89@xyz.orgspan.com'},
'conversation_summary': None,
'department': ' IT Teams',
'division': {'id': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'name': '',
'self_uri': '/api/v2/authorization/divisions/{divisionID'},
'email': 'xyz@email.com',
'employer_info': None,
'geolocation': None,
'groups': None,
'id': 'XXXXXXXXXXXXXXXXXX',
'images': None,
'language_preference': None,
'languages': None,
'last_token_issued': None,
'locations': None,
'total': 1,
'types': ['users']}