Package: pydxp
pydxp: A Python wrapper for Nectar DXPpydxp is a python wrapper around the Nectar DXP dashboard REST API.Installationpip install pydxpGetting startedThe first thing to do to get started is import module and authenticate with your credentials.frompydxpimportNectarAuthlogin=NectarAuth(domain="https://demo.us.nectar.services",tenant="regex",authusr="demo1@nectarcorp.com",authpwd="PASSWORD")print(login.retrieve_credentials())ParameterDescriptiondomainThe Nectar DXP domain you would like to connect to (defaults tohttps://us.nectar.servicesif not specified).Optional.tenantTenant name (use it for user’s that have access to multiple tenants).Optional.authusrUsername of the account which has got access to Nectar DXP.authpwdCorresponding password for the username being used.List of Available EndpointsUser EndpointsSearch users by query stringimportjsonfrompydxpimportNectarAuthfrompydxpimportUserEndpointslogin=NectarAuth(domain="https://demo.us.nectar.services",tenant="regex",authusr="demo1@nectarcorp.com",authpwd="PASSWORD")data=UserEndpoints.search_users_by_query_string(login,username="jane.doe@regex.com")print(json.dumps(data))ParameterDescriptionusernameUsername to be queried on Nectar DXP.pagenumberPage number for paged response (starts from 1, default = 1).Optional. Example: pagenumber=1pagesizePage size for paged response (starts from 1, default = 10).Optional. Example: pagesize=10tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Output{"totalElements":1,"elements":[{"id":"837","userId":"837_1_10_*","photo":null,"userName":"jane.doe","firstName":"Jane","lastName":"Doe","email":"jane.doe@regex.com","phone":"123-456-7890","location":null,"address":null,"uri":null,"deleted":false,"city":null,"postalCode":null,"country":null,"postOfficeBox":null,"pbxName":null,"userPbxNumber":null,"displayName":"Jane Doe","sipAddress":null,"lineUri":null,"platform":"AD","platformUserName":null,"platforms":["TEAMS","ENDPOINT_CLIENT"],"ispName":null,"locationType":null,"hasAdId":true,"hasPlatformId":null,"lastSessionDate":null,"sessionCount":null,"sessionGood":null,"sessionPoor":null,"sessionUnknown":null}]}Get user quantity summaryUserEndpoints.get_user_quantity_summary(login,username="jane.doe@regex.com",timeperiod="LAST_DAY")ParameterDescriptionusernameUsername to be queried on Nectar DXP.timeperiodTime period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM)Optional.tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Get user quality summaryUserEndpoints.get_user_quality_summary(login,username="jane.doe@regex.com",timeperiod="LAST_DAY")ParameterDescriptionusernameUsername to be queried on Nectar DXP.timeperiodTime period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM)Optional.tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Get user server summaryUserEndpoints.get_user_server_summary(login,username="jane.doe@regex.com",timeperiod="LAST_DAY")ParameterDescriptionusernameUsername to be queried on Nectar DXP.timeperiodTime period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM)Optional.tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Get user client types summaryUserEndpoints.get_user_client_types_summary(login,username="jane.doe@regex.com",timeperiod="LAST_DAY")ParameterDescriptionusernameUsername to be queried on Nectar DXP.timeperiodTime period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM)Optional.tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Get user devices summaryUserEndpoints.get_user_devices_summary(login,username="jane.doe@regex.com",timeperiod="LAST_DAY")ParameterDescriptionusernameUsername to be queried on Nectar DXP.timeperiodTime period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM)Optional.tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Get user network types summaryUserEndpoints.get_user_network_types_summary(login,username="jane.doe@regex.com",timeperiod="LAST_DAY")ParameterDescriptionusernameUsername to be queried on Nectar DXP.timeperiodTime period for data fetching (LAST_HOUR, LAST_DAY, LAST_WEEK, LAST_MONTH, LAST_QUARTER, LAST_YEAR, CUSTOM)Optional.tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Get user infoUserEndpoints.get_user_info(login,username="jane.doe@regex.com",timeperiod="LAST_DAY")ParameterDescriptionusernameUsername to be queried on Nectar DXP.tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Get advanced user infoUserEndpoints.get_advanced_user_info(login,username="jane.doe@regex.com",timeperiod="LAST_DAY")ParameterDescriptionusernameUsername to be queried on Nectar DXP.tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Get user advanced info only statusUserEndpoints.get_user_advanced_info_only_status(login,username="jane.doe@regex.com",timeperiod="LAST_DAY")ParameterDescriptionusernameUsername to be queried on Nectar DXP.tenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.Get pinned usersUserEndpoints.get_pinned_users(login,tenant="regex")ParameterDescriptiontenantTenant name (use it for user’s that have access to multiple tenants. Defaults to tenant name used during authentication).Optional.