Odin's Spear
  • Welcome
  • Getting Started
    • Getting the Essentials
    • Create API Object
  • API Coverage
  • Docs
    • API Object
    • Standard Methods
      • Session
        • GET - Session
        • POST - Session Logout
        • POST - Session
        • POST - Switch Session
        • PUT - Change Password
        • PUT - My Password
        • PUT - Password
        • PUT - Session
      • Administrators
        • POST - Service Provider Admin
        • PUT - Service Provider Admin Policies
        • POST - Group Admin Polices Bulk
        • POST - Group Admin
      • Alternate Numbers
        • GET - User Alternate Numbers
      • Authentication
        • GET - User Authentication Service
        • PUT - User Web Authentication Password
        • PUT - User Authentication Service
      • Auto Attendants
        • GET - Auto Attendants
        • POST - Auto Attendant
        • GET - Auto Attendant
        • GET - Auto Attendant User
        • POST - Auto Attendant Remove User
        • PUT - Auto Attendant
        • DELETE - Auto Attendant
        • GET - Auto Attendant Submenus
        • POST - Auto Attendant Submenu
        • GET - Auto Attendant Submenu Usage
        • PUT - Auto Attendant Submenu
        • PUT - Auto Attendant Status
        • DELETE - Auto Attendant Submenu
      • Call Centers
        • GET - Group Call Center
        • PUT - Group Call Center
        • GET - Group Call Centers
        • PUT - Group Call Center Agents
        • PUT - Group Call Center Agents Levels
        • GET - Group Call Center Bounced Calls
        • PUT - Group Call Center Bounced Call
        • PUT - Group Call Center DNIS Instance
        • GET - Group Call Center Forced Forwarding
        • PUT - Group Call Center Forced Forwarding
        • GET - Group Call Center Overflow
        • PUT - Group Call Center Overflow
        • GET - Group Call Center Stranded Calls
        • GET - Group Call Center Stranded Calls Unavailable
        • PUT - Group Call Center Status
        • PUT - Group Call Center Stranded Calls
        • PUT - Group Call Center Stranded Calls Unavailable
        • GET - User Call Center
        • PUT - User Call Center
        • PUT - User Call Center Agent Sign Out
        • PUT - User Call Center Agents Update
        • PUT - User Call Center Supervised Agents
      • Call Forwarding Always
        • GET - Bulk Call Forwarding Always
        • GET - User Call Forwarding Always
      • Call Forwarding Busy
        • GET - Bulk Call Forwarding Busy
        • GET - User Call Forwarding Busy
      • Call Forwarding No Answer
        • GET - Bulk User Call Forwarding No Answer
        • GET - User Call Forwarding No Answer
      • Call Forwarding Not Reachable
        • GET - Bulk User Call Forwarding Not Reachable
        • GET - User Call Forwarding Not Reachable
      • Call Forwarding Selective
        • GET - User Call Forwarding Selective
        • GET - User Call Forwarding Selective Criteria
        • GET - User Call Forwarding Selective Criterias
      • Call Pickup
        • GET - Call Pickup Avilable User
        • GET - Call Pickup Group User
        • GET - Call Pickup Groups
        • GET - Call Pickup Group
        • POST - Call Pickup Group
        • PUT - Call Pickup Group
        • DELETE - Call Pickup Group
      • Call Processing Policies
        • PUT - User Call Processing Policy
      • Call Records
        • GET - User Stats
      • Devices
        • POST - Group Device
        • PUT - Group Devices
        • PUT - Group Device File
        • PUT - Group Device Tag
        • PUT - Group Device Type File
        • PUT - Group Device Tags Profile
        • PUT - Group Device Type Tag
        • PUT - Service Provider Device
        • PUT - Service Provider Device File
        • PUT - Service Provider Device Tag
        • PUT - Service Provider Device Type Tag
        • PUT - System Devices
        • PUT - System Device File
        • PUT - System Device Tag
      • DNs
        • GET - Group DNs
        • POST - Group DNs
        • DELETE - Group DNs
        • PUT - Group DNs Activate
        • POST - Group DNs Assign Bulk
        • GET - Group DN Details
        • GET - Group DN Search
        • POST - Group DNs Unassign Bulk
        • GET - Service Provider DNs
        • POST - Service Provider DNs
        • GET - Service Provider DN Search
        • DELETE - Service Provider DNs
        • GET - System DNs
        • GET - System DN Search
        • GET - System DN Summary
        • GET - System DN Utilisation
      • Do Not Disturb
        • GET - User Do Not Disturb
        • PUT - User Do Not Disturb
      • Emergency Zones
        • POST - Group Emergency Zones
        • PUT - Group Emergency Zones
      • Extensions
        • GET - Extensions
        • PUT - Extensions
      • Groups
        • GET - Group Information
        • POST - Create Group
        • PUT - Update Group
        • DELETE - Delete Group
        • GET - Service Provider Groups
      • Hunt Groups
        • GET - Group Hunt Groups
        • GET - Group Hunt Group
        • POST - Group Hunt Group
        • PUT - Group Hunt Group
        • DELETE - Group Hunt Group
        • GET - Group Hunt Groups Available Users
        • PUT - Group Hunt Groups Status
        • GET - Group Hunt Group User
        • PUT - Group Hunt Group Weighted Call Distribution
        • POST - Group Hunt Groups Remove User
      • Password Generate
        • GET - Password Generate
        • GET - Passwords Generate
        • GET - Passcode Generate
        • GET - Passcodes Generate
        • GET - SIP Password Generate
        • GET - SIP Passwords Generate
      • Registration
        • GET - User Registration
        • GET - Bulk User Registration
      • Reports
        • GET - User Report
      • Schedules
        • GET - Group Schedules
        • GET - Group Events
      • Service Providers
        • GET - Service Provider
        • GET - Service Providers
      • Services
        • GET - Group Services
        • GET - Group Services Assigned
        • GET - User-Services
        • PUT - User Services
        • GET - User Services Assigned
        • GET - User Service Settings
        • PUT - User Service Settings
      • Shared Call Appearance
        • GET - User Shared Call Appearance
        • GET - User Shared Call Appearance Bulk
        • GET - User Shared Call Appearance Endpoint
        • PUT - User Shared Call Appearance
        • PUT - User Shared Call Appearance Endpoint
        • POST - User Shared Call Appearance Endpoint
        • DELETE - User Shared Call Appearance Endpoint
      • Trunk Groups
        • GET - Group Trunk Group
        • GET - Group Trunk Groups
        • GET - Group Trunk Groups Call Capacity
        • GET - Service Provider Call Capacity Report
        • GET - Group Trunk Available Hosted Users
        • GET - Group Trunk Group Users
        • GET - Group Trunk Available Hosted Users
        • GET - Service Providers Trunk Call Capacity Report Show
        • POST - Group Trunk Group
        • PUT - Group Trunk Groups Call Capacity
        • PUT - Group Trunk Group
        • PUT - Service Provider Trunk Group Call Capacity
        • DELETE - Group Trunk Group
      • User
        • GET - User By ID
        • GET - Users
        • GET - Group User Audit
        • GET - User Audit
        • GET - User Password
        • PUT - User ID
        • PUT - User SIP Contacts
        • POST - User
        • PUT - User
        • DELETE - User
        • PUT - User ID
        • PUT - Users Bulk
        • PUT - User Group ID Update
        • GET - User Login Info
        • GET - User Portal Passcode
        • PUT - User Portal Passcode
        • POST - User Reset
      • Voice Messaging
        • GET - Group Voice Messaging
        • GET - Group Voice Messaging Portal
        • GET - User Voice Messaging Advanced
        • GET - User Voice Messaging Bulk
        • GET - User Voice Messaging Greetings
        • GET - User Voice Messaging Message Details
        • GET - User Voice Messaging Message Download
        • GET - User Voice Messaging Messages
        • GET - User Voice Messaging User Distribution List
        • GET - User Voice Messaging User Distribution Lists
        • GET - User Voice Messaging Voice Portal
        • GET - User Voice Messaging
        • PUT - Group Voice Messaging
        • PUT - Group Voice Messaging Portal
        • PUT - User Voice Messaging Bulk
        • PUT - User Voice Messaging Greetings
        • PUT - User Voice Messaging Messages Read
        • PUT - User Voice Messaging Messages Unread
        • PUT - User Voice Messaging User Distribution List
        • PUT - User Voice Messaging Voice Portal
        • PUT - User Voice Messaging
        • DELETE - User Voice Messaging Messages
    • Advanced Features
      • Scripter
        • Find Alias
        • User Association
        • Group Audit
        • Move Numbers
        • Remove Numbers
        • Bulk Password Reset
        • Service Provider Trunking Capacity
        • Webex Builder
        • Locate Free Extension
        • User Registration
        • VM Auto Login
      • Reporter
        • Call Flow
          • Making Sense of The Call Flow
          • Graphviz
        • Group Users Call Statistics
        • User Registration Report
    • Utils
      • Config Manager
        • Template Configs
          • Auto Attendant
          • Call Center
          • Device
          • Group
          • Hunt Group
          • Service Provider
          • Trunk Group
          • User
      • Checkers
      • Constants
      • Formatters
      • Parsers
    • Logging
  • Powered By Odin's Spear
    • AA, CC, HG Audit
    • Bulk Build Group Admins
    • Bulk Build Service Provider Admins
    • Service Pack Audit
    • VM Bulk Passcode Set CSV
  • 14IP
    • Custom Logger
  • Development
  • Troubleshooting & FAQ
    • Frequently Asked Questions
    • Common Issues
      • Graphviz Troubleshooting
  • Bugs and Issues
  • Contact
Powered by GitBook
On this page
  • Parameters
  • Returns
  • Supported Filters
  • Examples:
  • How To Use:
  • Example Data Returned (Formatted)

Was this helpful?

  1. Docs
  2. Standard Methods
  3. User

GET - Users

Returns list of users depending on filter criteria you set. See supported filters and filter examples on how to use.

Parameters

  • service_provider_id (str, optional): Service or Enterprise ID, top level object. Defaults to None.

  • group_id (str, optional): Group ID where user is hosted. Defaults to None.

  • filter (str, optional): Filter criteria, supported filters below. Defaults to None.

  • filter_type (str, optional): Options: equal to, starts with, or contains. Defaults to None.

  • filter_value (str, optional): Value filtering on e.g. firstName. Defaults to None.

  • limit (int, optional): Limits the amount of values API returns. Defaults to None.

Returns

  • Dict: Python dictionary of the users details

Supported Filters

  • macAddress: search by device

  • lastName: filter by lastName

  • firstName: filter by firstName

  • dn: filter by dn

  • emailAddress: filter by emailAddress

  • userId: filter by userId

  • extension: filter by extension

Examples:

Get all users in Enterprise ent1

my_api.users.get_users(
    servive_provider_id= "ent1"
)

Get all users in Group grp1

from odins_spear import api

my_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1")
my_api.authenticate()

my_api.get.users(
    servive_provider_id= "ent1",
    group_id= "grp1"
)

Get up to 10 users in the system wit a last name that contains Smith

from odins_spear import api

my_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1")
my_api.authenticate()

my_api.get.users(
    filter= "lastName",
    filter_type= "contains",
    filter_value= "Smith",
    limit= 10
)

Get the users in grp1 that have a phone number that starts with 513333

from odins_spear import api

my_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1")
my_api.authenticate()

my_api.get.users(
    servive_provider_id= "ent1",
    group_id= "grp1",    
    filter= "dn",
    filter_type= "contains",
    filter_value= "513333"
)

How To Use:

from odins_spear import api

my_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1")
my_api.authenticate()

my_api.get.user_by_id(
    "user_ID"
)

Example Data Returned (Formatted)

[
  {
    "serviceProviderId": "ent.odin",
    "groupId": "grp.odin",
    "userId": "5136549857_s@odinapi.net",
    "lastName": 1,
    "firstName": "user_",
    "callingLineIdLastName": 1,
    "callingLineIdFirstName": "Marc",
    "hiraganaLastName": 1,
    "hiraganaFirstName": "user_",
    "phoneNumber": "5136549857",
    "extension": "9857",
    "callingLineIdPhoneNumber": "5136549857",
    "language": "English",
    "timeZone": "America/New_York",
    "timeZoneDisplayName": "(GMT-05:00) (US) Eastern Time",
    "defaultAlias": "5136549857_s@odinapi.net",
    "accessDeviceEndpoint": {
      "accessDevice": {
        "deviceType": "Polycom VVX 400 DM",
        "protocol": "SIP 2.0",
        "numberOfPorts": {
          "quantity": "12"
        },
        "numberOfAssignedPorts": 1,
        "status": "Online",
        "configurationMode": "Default",
        "transportProtocol": "TCP",
        "useCustomUserNamePassword": false,
        "deviceName": "5136549857",
        "deviceLevel": "Group",
        "accessDeviceCredentials": {
          "userName": null
        },
        "serviceProviderId": "ent.odin",
        "groupId": "grp.odin",
        "tags": [],
        "relatedServices": []
      },
      "linePort": "5136549857_s@odinapi.net",
      "staticRegistrationCapable": "false",
      "useDomain": "true",
      "supportVisualDeviceManagement": "false",
      "contacts": []
    },
    "countryCode": "1",
    "allowVideo": true,
    "domain": "odinapi.net",
    "endpointType": "accessDeviceEndpoint",
    "aliases": [],
    "trunkAddressing": {
      "trunkGroupDeviceEndpoint": {
        "contacts": []
      }
    },
    "isEnterprise": true,
    "passwordExpiresDays": "-2147483648"
  },
  {
    "serviceProviderId": "ent.odin",
    "groupId": "grp.odin",
    "userId": "9871515000@odinapi.net",
    "lastName": "Reverman",
    "firstName": "Mark",
    "callingLineIdLastName": "Reverman",
    "callingLineIdFirstName": "Mark",
    "hiraganaLastName": "Reverman",
    "hiraganaFirstName": "Mark",
    "phoneNumber": "9871515000",
    "extension": "5000",
    "callingLineIdPhoneNumber": "9871515000",
    "department": {
      "serviceProviderId": "ent.odin",
      "groupId": "grp.odin",
      "name": "department1"
    },
    "departmentFullPath": "department1 (grp.odin)",
    "language": "English",
    "timeZone": "America/New_York",
    "timeZoneDisplayName": "(GMT-05:00) (US) Eastern Time",
    "defaultAlias": "9871515000@odinapi.net",
    "trunkAddressing": {
      "trunkGroupDeviceEndpoint": {
        "name": "9871515000",
        "linePort": "9871515000_trunk@odinapi.net",
        "staticRegistrationCapable": "true",
        "useDomain": "true",
        "isPilotUser": "false",
        "contacts": []
      }
    },
    "title": "Title Here",
    "pagerPhoneNumber": 9871515000,
    "mobilePhoneNumber": 9871515000,
    "emailAddress": "mreverman@parkbenchsolutions.com",
    "addressLocation": "1234 Main Street",
    "address": {
      "addressLine1": "Bldg 2",
      "addressLine2": "Suite 2",
      "city": "Cincinnati",
      "stateOrProvince": "Ohio",
      "zipOrPostalCode": "45204",
      "country": "US"
    },
    "countryCode": "1",
    "alternateUserId": [
      {
        "alternateUserId": "mreverman@gmail.com",
        "description": "mreverman@gmail.com"
      },
      {
        "alternateUserId": "mreverman@parkbenchsolutions.com",
        "description": "mreverman@parkbenchsolutions.com"
      }
    ],
    "allowVideo": true,
    "domain": "odinapi.net",
    "endpointType": "trunkAddressing",
    "aliases": [],
    "accessDeviceEndpoint": {
      "contacts": []
    },
    "isEnterprise": true,
    "passwordExpiresDays": 2147483647
  },
  {
    "serviceProviderId": "ent.odin",
    "groupId": "grp.odin",
    "userId": "9871515001@odinapi.net",
    "lastName": "Latsa",
    "firstName": "Scott",
    "callingLineIdLastName": "Latsa",
    "callingLineIdFirstName": "Scott",
    "hiraganaLastName": "Latsa",
    "hiraganaFirstName": "Scott",
    "phoneNumber": "9871515001",
    "extension": "5001",
    "callingLineIdPhoneNumber": "+19871514002",
    "language": "English",
    "timeZone": "America/New_York",
    "timeZoneDisplayName": "(GMT-05:00) (US) Eastern Time",
    "defaultAlias": "9871515001@odinapi.net",
    "accessDeviceEndpoint": {
      "accessDevice": {
        "deviceType": "Generic SIP Phone",
        "protocol": "SIP 2.0",
        "numberOfPorts": {
          "unlimited": "true"
        },
        "numberOfAssignedPorts": 1,
        "status": "Online",
        "transportProtocol": "Unspecified",
        "useCustomUserNamePassword": false,
        "version": "Kapanga Softphone Desktop Windows 1.00/2180b+1595505876_80E82C997FFA_A0510BEA6293_02004C4F4F50_005056C00001_005056C00008_0A002700000E_FABBC859EAB4_A0510BEA6290_A2510BEA628F",
        "deviceName": "generic_sip",
        "deviceLevel": "Group",
        "accessDeviceCredentials": {
          "userName": null
        },
        "serviceProviderId": "ent.odin",
        "groupId": "grp.odin",
        "tags": [],
        "relatedServices": []
      },
      "linePort": "9871515001@odinapi.net",
      "staticRegistrationCapable": "true",
      "useDomain": "true",
      "supportVisualDeviceManagement": "false",
      "contacts": []
    },
    "emailAddress": "slatsa@parkbenchsolutions.com",
    "countryCode": "1",
    "alternateUserId": {
      "alternateUserId": "scott.latsa@gmail.com",
      "description": "Test gamil.com for single sign on"
    },
    "allowVideo": true,
    "domain": "odinapi.net",
    "endpointType": "accessDeviceEndpoint",
    "aliases": [],
    "trunkAddressing": {
      "trunkGroupDeviceEndpoint": {
        "contacts": []
      }
    },
    "isEnterprise": true,
    "passwordExpiresDays": 2147483647
  }
]
PreviousGET - User By IDNextGET - Group User Audit

Last updated 2 months ago

Was this helpful?