diff --git a/.gitbook.yaml b/.gitbook.yaml new file mode 100644 index 0000000..768cfda --- /dev/null +++ b/.gitbook.yaml @@ -0,0 +1 @@ +root: ./docs/ \ No newline at end of file diff --git a/docs/.gitbook/assets/Frame 2.png b/docs/.gitbook/assets/Frame 2.png new file mode 100644 index 0000000..b226a4f Binary files /dev/null and b/docs/.gitbook/assets/Frame 2.png differ diff --git a/docs/.gitbook/assets/Frame 5.png b/docs/.gitbook/assets/Frame 5.png new file mode 100644 index 0000000..500c9b2 Binary files /dev/null and b/docs/.gitbook/assets/Frame 5.png differ diff --git a/docs/.gitbook/assets/Screenshot 2024-01-03 085617.jpg b/docs/.gitbook/assets/Screenshot 2024-01-03 085617.jpg new file mode 100644 index 0000000..945deff Binary files /dev/null and b/docs/.gitbook/assets/Screenshot 2024-01-03 085617.jpg differ diff --git a/docs/.gitbook/assets/Screenshot 2024-04-25 at 19.20.48.png b/docs/.gitbook/assets/Screenshot 2024-04-25 at 19.20.48.png new file mode 100644 index 0000000..6543d21 Binary files /dev/null and b/docs/.gitbook/assets/Screenshot 2024-04-25 at 19.20.48.png differ diff --git a/docs/.gitbook/assets/group_users_call_statistics_example.jpg b/docs/.gitbook/assets/group_users_call_statistics_example.jpg new file mode 100644 index 0000000..f9fb9c3 Binary files /dev/null and b/docs/.gitbook/assets/group_users_call_statistics_example.jpg differ diff --git a/docs/.gitbook/assets/image (1).png b/docs/.gitbook/assets/image (1).png new file mode 100644 index 0000000..af2e0bb Binary files /dev/null and b/docs/.gitbook/assets/image (1).png differ diff --git a/docs/.gitbook/assets/image (10).png b/docs/.gitbook/assets/image (10).png new file mode 100644 index 0000000..121f62d Binary files /dev/null and b/docs/.gitbook/assets/image (10).png differ diff --git a/docs/.gitbook/assets/image (11).png b/docs/.gitbook/assets/image (11).png new file mode 100644 index 0000000..121f62d Binary files /dev/null and b/docs/.gitbook/assets/image (11).png differ diff --git a/docs/.gitbook/assets/image (12).png b/docs/.gitbook/assets/image (12).png new file mode 100644 index 0000000..121f62d Binary files /dev/null and b/docs/.gitbook/assets/image (12).png differ diff --git a/docs/.gitbook/assets/image (13).png b/docs/.gitbook/assets/image (13).png new file mode 100644 index 0000000..8450478 Binary files /dev/null and b/docs/.gitbook/assets/image (13).png differ diff --git a/docs/.gitbook/assets/image (14).png b/docs/.gitbook/assets/image (14).png new file mode 100644 index 0000000..3843778 Binary files /dev/null and b/docs/.gitbook/assets/image (14).png differ diff --git a/docs/.gitbook/assets/image (15).png b/docs/.gitbook/assets/image (15).png new file mode 100644 index 0000000..3843778 Binary files /dev/null and b/docs/.gitbook/assets/image (15).png differ diff --git a/docs/.gitbook/assets/image (16).png b/docs/.gitbook/assets/image (16).png new file mode 100644 index 0000000..1f88107 Binary files /dev/null and b/docs/.gitbook/assets/image (16).png differ diff --git a/docs/.gitbook/assets/image (17).png b/docs/.gitbook/assets/image (17).png new file mode 100644 index 0000000..1f88107 Binary files /dev/null and b/docs/.gitbook/assets/image (17).png differ diff --git a/docs/.gitbook/assets/image (18).png b/docs/.gitbook/assets/image (18).png new file mode 100644 index 0000000..1f88107 Binary files /dev/null and b/docs/.gitbook/assets/image (18).png differ diff --git a/docs/.gitbook/assets/image (19).png b/docs/.gitbook/assets/image (19).png new file mode 100644 index 0000000..6a77896 Binary files /dev/null and b/docs/.gitbook/assets/image (19).png differ diff --git a/docs/.gitbook/assets/image (2).png b/docs/.gitbook/assets/image (2).png new file mode 100644 index 0000000..67560e0 Binary files /dev/null and b/docs/.gitbook/assets/image (2).png differ diff --git a/docs/.gitbook/assets/image (20).png b/docs/.gitbook/assets/image (20).png new file mode 100644 index 0000000..37ac837 Binary files /dev/null and b/docs/.gitbook/assets/image (20).png differ diff --git a/docs/.gitbook/assets/image (21).png b/docs/.gitbook/assets/image (21).png new file mode 100644 index 0000000..37ac837 Binary files /dev/null and b/docs/.gitbook/assets/image (21).png differ diff --git a/docs/.gitbook/assets/image (22).png b/docs/.gitbook/assets/image (22).png new file mode 100644 index 0000000..57ed316 Binary files /dev/null and b/docs/.gitbook/assets/image (22).png differ diff --git a/docs/.gitbook/assets/image (23).png b/docs/.gitbook/assets/image (23).png new file mode 100644 index 0000000..6f87ace Binary files /dev/null and b/docs/.gitbook/assets/image (23).png differ diff --git a/docs/.gitbook/assets/image (24).png b/docs/.gitbook/assets/image (24).png new file mode 100644 index 0000000..6f87ace Binary files /dev/null and b/docs/.gitbook/assets/image (24).png differ diff --git a/docs/.gitbook/assets/image (25).png b/docs/.gitbook/assets/image (25).png new file mode 100644 index 0000000..78ea816 Binary files /dev/null and b/docs/.gitbook/assets/image (25).png differ diff --git a/docs/.gitbook/assets/image (26).png b/docs/.gitbook/assets/image (26).png new file mode 100644 index 0000000..78ea816 Binary files /dev/null and b/docs/.gitbook/assets/image (26).png differ diff --git a/docs/.gitbook/assets/image (27).png b/docs/.gitbook/assets/image (27).png new file mode 100644 index 0000000..69da49a Binary files /dev/null and b/docs/.gitbook/assets/image (27).png differ diff --git a/docs/.gitbook/assets/image (28).png b/docs/.gitbook/assets/image (28).png new file mode 100644 index 0000000..69da49a Binary files /dev/null and b/docs/.gitbook/assets/image (28).png differ diff --git a/docs/.gitbook/assets/image (29).png b/docs/.gitbook/assets/image (29).png new file mode 100644 index 0000000..69da49a Binary files /dev/null and b/docs/.gitbook/assets/image (29).png differ diff --git a/docs/.gitbook/assets/image (3).png b/docs/.gitbook/assets/image (3).png new file mode 100644 index 0000000..643f635 Binary files /dev/null and b/docs/.gitbook/assets/image (3).png differ diff --git a/docs/.gitbook/assets/image (4).png b/docs/.gitbook/assets/image (4).png new file mode 100644 index 0000000..37b0c62 Binary files /dev/null and b/docs/.gitbook/assets/image (4).png differ diff --git a/docs/.gitbook/assets/image (5).png b/docs/.gitbook/assets/image (5).png new file mode 100644 index 0000000..60977f8 Binary files /dev/null and b/docs/.gitbook/assets/image (5).png differ diff --git a/docs/.gitbook/assets/image (6).png b/docs/.gitbook/assets/image (6).png new file mode 100644 index 0000000..78aea04 Binary files /dev/null and b/docs/.gitbook/assets/image (6).png differ diff --git a/docs/.gitbook/assets/image (7).png b/docs/.gitbook/assets/image (7).png new file mode 100644 index 0000000..2d3c935 Binary files /dev/null and b/docs/.gitbook/assets/image (7).png differ diff --git a/docs/.gitbook/assets/image (8).png b/docs/.gitbook/assets/image (8).png new file mode 100644 index 0000000..037efce Binary files /dev/null and b/docs/.gitbook/assets/image (8).png differ diff --git a/docs/.gitbook/assets/image (9).png b/docs/.gitbook/assets/image (9).png new file mode 100644 index 0000000..16d7823 Binary files /dev/null and b/docs/.gitbook/assets/image (9).png differ diff --git a/docs/.gitbook/assets/image.png b/docs/.gitbook/assets/image.png new file mode 100644 index 0000000..1bd1ff5 Binary files /dev/null and b/docs/.gitbook/assets/image.png differ diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..e6755e9 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,21 @@ +# πŸ‘‹ Welcome!! + +Working on Broadwork's for 5 years was painful, with its stiff 90’s user interface and all its limitations so when I first saw Odin by [Rev.io](https://www.rev.io/blog/solutions/rev-io-odin-api). I nearly fell off my seat. Those beautiful people brought the solution into the 21st century with a modern user interface, automation, and most of all its API. This made my life so much easier, I was able to build 500 users in one go rather than one by one, I could give users access to manage their own systems, and I could duplicate groups with everything I needed when building new groups for customers. But I still couldn’t easily locate where the alias 0 was assigned and here is where the story of Odin’s Spear begins. + +Odin’s web user interface is great but it’s not perfect and it's limited, however, its API is a gift sent from the developer gods over at Rev.io (thank you!). Using the documentation and a few lines of code you can achieve everything you can achieve in the web interface but you are no longer limited to how fast you can operate your keyboard with the power of programming languages like Python. I can create a loop to create 10, 100, 1000, or 10, 000 users, hunt groups, and call centers in seconds or minutes. + +Managing them all becomes a breeze also, let's say a customer has a new user they want to add to all 50 of their hunt groups (if you’ve read this far I’m assuming you know what this is). If you’re using Broadworks then block the day out in your calendar, if you're using Odin’s web portal block the morning out, if you're using Python with the Odin API block 30 minutes out (that’s being generous). + +{% embed url="https://doc.odinapi.net/" %} +Odin's API Documentation +{% endembed %} + +Alas, using the API is not perfect, each time I would write a script to help me achieve these things I was hit with some recurring issues, I would have to find the API call I needed, format the data, design the request, handle any errors that could occur and the list goes on. Each time I was starting fresh and this was frustrating, if only there was a solution that handled my authentication, I could just select the method and pass it the data rather than designing the request, if an error occurs tell me what the issue is, resolve or even handle it for me… + +## Introducing... + +
+ +**Odin’s Spear** is a Python library that aims to do exactly that. It will encapsulate the entire functionality of Odin’s API making the use easy, efficient, and accessible. The project is stakeholder lead and all features have come from engineers that have been using Broadworks and now Odin for decades. It will also introduce other features requested such as a graph showing a call flow to a number, a group audit report for all things billable, and bulk management of call centers, hunt groups, and auto attendants. However, it was clear what the first feature had to be. For years now locating where an alias has been assigned on the Broadworks system has brought hosted telephony engineers to their knees. No more. With Odin’s Spears’ very first release (beta) I have addressed this issue making locating an alias a breeze. In 3 lines of code and 1 minute of your time, you can now achieve this once painstaking task, and more features are coming soon! + +
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md new file mode 100644 index 0000000..7d5a342 --- /dev/null +++ b/docs/SUMMARY.md @@ -0,0 +1,120 @@ +# Table of contents + +* [πŸ‘‹ Welcome!!](README.md) +* [πŸ“– Docs](docs/README.md) + * [🧐 Getting Started](docs/getting-started/README.md) + * [🐍 Getting the Essentials (Python + IDE)](docs/getting-started/getting-the-essentials-python-+-ide.md) + * [⚠️ Setting Environment Variable](docs/getting-started/setting-environment-variable.md) + * [⬇️ Downloading Library (BETA)](docs/getting-started/downloading-library-beta.md) + * [βš™οΈ Create API Object](docs/getting-started/create-api-object.md) + * [πŸ“¦ Standard Methods](docs/methods/README.md) + * [πŸ”’ DNs](docs/methods/dns/README.md) + * [1️⃣ GET - Group DNs](docs/methods/dns/group-dns.md) + * [2️⃣ GET - Group DN Search](docs/methods/dns/group-dn-search.md) + * [3️⃣ GET - Group DN Details](docs/methods/dns/group-dn-details.md) + * [4️⃣ GET - Service Provider DNs](docs/methods/dns/service-provider-dns.md) + * [5️⃣ GET - Service Provider DN Search](docs/methods/dns/service-provider-dn-search.md) + * [6️⃣ GET - System DNs](docs/methods/dns/system-dns.md) + * [7️⃣ GET - System DN Summary](docs/methods/dns/system-dn-summary.md) + * [8️⃣ GET - System DN Utilisation](docs/methods/dns/system-dn-utilization.md) + * [1️⃣ POST - Group DNs](docs/methods/dns/group-dns-1.md) + * [2️⃣ POST - Group DNs Assign Bulk](docs/methods/dns/group-dns-assign-bulk.md) + * [3️⃣ POST - Group DNs Unassign Bulk](docs/methods/dns/group-dns-unassign-bulk.md) + * [4️⃣ POST - Service Provider DNs](docs/methods/dns/service-provider-dns-1.md) + * [1️⃣ PUT - Group DNs Activate](docs/methods/dns/group-dns-activate.md) + * [1️⃣ DELETE - Group DNs](docs/methods/dns/group-dns-2.md) + * [2️⃣ DELETE - Service Provider DNs](docs/methods/dns/service-provider-dns-2.md) + * [πŸ”‘ Password Generate](docs/methods/password-generate/README.md) + * [πŸ”“ GET - Password Generate](docs/methods/password-generate/password-generate.md) + * [πŸ”“ GET - Passwords Generate](docs/methods/password-generate/passwords-generate.md) + * [πŸ—οΈ GET - Passcode Generate](docs/methods/password-generate/passcode-generate.md) + * [πŸ—οΈ GET - Passcodes Generate](docs/methods/password-generate/passcodes-generate.md) + * [πŸ—οΈ GET - SIP Password Generate](docs/methods/password-generate/sip-password-generate.md) + * [πŸ—οΈ GET - SIP Passwords Generate](docs/methods/password-generate/sip-passwords-generate.md) + * [🟒 Registration](docs/methods/registration/README.md) + * [πŸ’š GET - User Registration](docs/methods/registration/user-registration.md) + * [πŸ’š GET - Bulk User Registration](docs/methods/registration/bulk-user-registration.md) + * [πŸ”’ Alternate Numbers](docs/methods/alternate-numbers/README.md) + * [1️⃣ GET - User Alternate Numbers](docs/methods/alternate-numbers/get-user-alternate-numbers.md) + * [πŸ“† Schedules](docs/methods/schedules.md) + * [🌊 Trunk Groups](docs/methods/trunk-groups/README.md) + * [πŸ“ž GET - Group Trunk Groups Call Capacity](docs/methods/trunk-groups/get-group-trunk-groups-call-capacity.md) + * [☎️ GET - Group Trunk Group](docs/methods/trunk-groups/get-group-trunk-group.md) + * [🚰 GET - Group Trunk Groups](docs/methods/trunk-groups/get-group-trunk-groups.md) + * [🚿 GET - Service Provider Trunk Group Call Capacity](docs/methods/trunk-groups/get-service-provider-trunk-group-call-capacity.md) + * [πŸ“‚ GET - Service Provider Call Capacity Report](docs/methods/trunk-groups/get-service-provider-call-capacity-report.md) + * [🀡 User](docs/methods/user/README.md) + * [πŸ†” GET - User By ID](docs/methods/user/get-user-by-id.md) + * [πŸ‘― GET - Users](docs/methods/user/get-users.md) + * [πŸ”‘ Authentication](docs/methods/authentication/README.md) + * [πŸ” PUT - User Web Authentication Password](docs/methods/authentication/user-web-authentication-password.md) + * [πŸ’¬ Auto Attendants](docs/methods/auto-attendants/README.md) + * [🟒 PUT - Auto Attendant Status](docs/methods/auto-attendants/auto-attendant-status.md) + * [πŸ… PUT - Auto Attendant](docs/methods/auto-attendants/auto-attendant.md) + * [πŸ“– PUT - Auto Attendant Submenu](docs/methods/auto-attendants/auto-attendant-submenu.md) + * [πŸ“ž Call Centers](docs/methods/call-centers/README.md) + * [🟒 PUT - Group Call Center Status](docs/methods/call-centers/group-call-center-status.md) + * [🎧 PUT - Group Call Center](docs/methods/call-centers/group-call-center.md) + * [🎧 PUT - Group Call Center Agents](docs/methods/call-centers/group-call-center-agents.md) + * [🎚️ PUT - Group Call Center Agents Levels](docs/methods/call-centers/group-call-center-agents-levels.md) + * [⚽ PUT - Group Call Center Bounced Call](docs/methods/call-centers/group-call-center-bounced-call.md) + * [πŸ“ž PUT - Group Call Center DNIS Instance](docs/methods/call-centers/group-call-center-dnis-instance.md) + * [⏩ PUT - Group Call Center Forced Forwarding](docs/methods/call-centers/group-call-center-forced-forwarding.md) + * [🌊 PUT - Group Call Center Overflow](docs/methods/call-centers/group-call-center-overflow.md) + * [🏝️ PUT - Group Call Center Stranded Calls](docs/methods/call-centers/group-call-center-stranded-calls.md) + * [πŸ”΄ PUT - Group Call Center Stranded Calls Unavailable](docs/methods/call-centers/group-call-center-stranded-calls-unavailable.md) + * [πŸ‘“ PUT - User Call Center Supervised Agents](docs/methods/call-centers/user-call-center-supervised-agents.md) + * [🟒 PUT - User Call Center](docs/methods/call-centers/user-call-center.md) + * [πŸ™‹β€β™‚οΈ PUT - User Call Center Agents Update](docs/methods/call-centers/user-call-center-agents-update.md) + * [πŸ›‘ PUT - User Call Center Agent Sign Out](docs/methods/call-centers/user-call-center-agent-sign-out.md) + * [☎️ Devices](docs/methods/devices/README.md) + * [πŸ“± PUT - Group Devices](docs/methods/devices/group-devices.md) + * [πŸ“ž PUT - Service Provider Device](docs/methods/devices/service-provider-device.md) + * [πŸ’» PUT - System Devices](docs/methods/devices/system-devices.md) + * [πŸ“ PUT - System Device File](docs/methods/devices/system-device-file.md) + * [πŸ“‚ PUT - Service Provider Device File](docs/methods/devices/service-provider-device-file.md) + * [πŸ—ƒοΈ PUT - Group Device File](docs/methods/devices/group-device-file.md) + * [🏷️ PUT - Group Device Tags Profile](docs/methods/devices/group-device-tags-profile.md) + * [🎐 PUT - Group Device Tag](docs/methods/devices/group-device-tag.md) + * [πŸ›°οΈ PUT - Service Provider Device Tag](docs/methods/devices/service-provider-device-tag.md) + * [πŸ’Ύ PUT - System Device Tag](docs/methods/devices/system-device-tag.md) + * [πŸ“‚ PUT - Group Device Type File](docs/methods/devices/group-device-type-file.md) + * [🎐 PUT - Group Device Type Tag](docs/methods/devices/group-device-type-tag.md) + * [🎐 PUT - Service Provider Device Type Tag](docs/methods/devices/service-provider-device-type-tag.md) + * [πŸ‡ Hunt Groups](docs/methods/hunt-groups/README.md) + * [🟒 PUT - Group Hunt Groups Status](docs/methods/hunt-groups/group-hunt-groups-status.md) + * [🍏 PUT - Group Hunt Group](docs/methods/hunt-groups/group-hunt-group.md) + * [πŸ’― PUT - Group Hunt Group Weighted Call Distribution](docs/methods/hunt-groups/group-hunt-group-weighted-call-distribution.md) + * [πŸ’ Services](docs/methods/services/README.md) + * [🧍 PUT - User Services](docs/methods/services/user-services.md) + * [πŸ›‘ Do Not Disturb](docs/methods/do-not-disturb/README.md) + * [πŸ›‘ GET - User Do Not Disturb](docs/methods/do-not-disturb/get-user-do-not-disturb.md) + * [πŸ›‘ PUT - User Do Not Disturb](docs/methods/do-not-disturb/put-user-do-not-disturb.md) + * [πŸ™Œ Advanced Features](docs/features/README.md) + * [πŸ€– Scripter](docs/features/scripter/README.md) + * [πŸ”Ž Find Alias](docs/features/scripter/find-alias-script.md) + * [πŸ”— User Association](docs/features/scripter/user-association.md) + * [β˜‘οΈ Group Audit](docs/features/scripter/group-audit.md) + * [βœ… Service Pack Audit](docs/features/scripter/service-pack-audit.md) + * [βœ”οΈ AA, CC, HG Audit](docs/features/scripter/aa-cc-hg-audit.md) + * [πŸ”’ Move Numbers](docs/features/scripter/move-numbers.md) + * [πŸ”’ Remove Numbers](docs/features/scripter/remove-numbers.md) + * [πŸ”‘ Bulk Password Reset](docs/features/scripter/bulk-password-reset.md) + * [πŸ“œ Service Provider Trunking Capacity](docs/features/scripter/service-provider-trunking-capacity.md) + * [πŸ“ˆ Reporter](docs/features/reporter/README.md) + * [πŸ€™ Call Flow](docs/features/reporter/call-flow/README.md) + * [πŸ”‘ Node Key](docs/features/reporter/call-flow/node-key.md) + * [πŸ”‘ Abbreviation Key](docs/features/reporter/call-flow/abbreviation-key.md) + * [πŸ“ˆ Graphviz](docs/features/reporter/call-flow/graphviz.md) + * [πŸ”’ Group Users Call Statistics](docs/features/reporter/group-users-call-statistics.md) + * [πŸ“œ Logger](docs/features/logger/README.md) + * [πŸ“‚ Sending Logs To A File](docs/features/logger/sending-logs-to-a-file.md) + * [☁️ Sending Logs To A Syslog Server](docs/features/logger/sending-logs-to-a-syslog-server.md) + * [πŸ›‘ Rate Limiting API Calls](docs/features/rate-limiting-api-calls.md) +* [πŸ‘¨β€πŸ’» Development](development.md) +* [πŸ†˜ Troubleshooting & FAQ](troubleshooting-and-faq/README.md) + * [πŸ› Common Issues](troubleshooting-and-faq/common-issues.md) + * [⁉️ Frequently Asked Questions](troubleshooting-and-faq/frequently-asked-questions/README.md) + * [1️⃣ Do You Need To Set Up Multiple Loggers For Multiple API Objects? No.](troubleshooting-and-faq/frequently-asked-questions/do-you-need-to-set-up-multiple-loggers-for-multiple-api-objects-no..md) +* [πŸ› Bugs and Issues](bugs-and-issues.md) +* [πŸ€™ Contact](contact.md) diff --git a/docs/bugs-and-issues.md b/docs/bugs-and-issues.md new file mode 100644 index 0000000..1e20277 --- /dev/null +++ b/docs/bugs-and-issues.md @@ -0,0 +1,41 @@ +# πŸ› Bugs and Issues + +We strive to make our application as reliable and user-friendly as possible. If you encounter any bugs or issues, we appreciate your feedback. Here’s how you can report them and stay updated on their status. + +### How to Report an Issue + +To report a bug or issue, please follow these steps: + +1. **Visit our GitHub Repository**: [Odin's Spear Issues](https://github.com/Jordan-Prescott/odins\_spear/issues) +2. **Check for Existing Issues**: Before creating a new issue, please check if it has already been reported by searching through the existing issues. +3. **Create a New Issue**: + * Click on the "New issue" button. + * Provide a descriptive title and detailed description of the issue. + * Include steps to reproduce the issue, your operating system, browser version, and any other relevant information. + * Add any relevant labels (e.g., bug, enhancement). + +### Issue Tracker + +You can view and track the status of reported issues on our GitHub Issues page. This page includes information on: + +* Open issues +* Closed issues +* Labels for categorizing issues (e.g., bug, enhancement, question) +* Milestones and project boards + +### Stay Updated + +To stay updated on the progress of issues: + +* **Watch the Repository**: Click the "Watch" button on our GitHub repository to receive notifications. +* **Join Discussions**: Participate in discussions on issues and pull requests to provide feedback and suggestions. + +### Contact Us + +If you need further assistance with reporting an issue or have any questions, please reach out to us our contact details are on the below page: + +{% content-ref url="contact.md" %} +[contact.md](contact.md) +{% endcontent-ref %} + +Thank you for helping us improve our application! diff --git a/docs/contact.md b/docs/contact.md new file mode 100644 index 0000000..390ebfe --- /dev/null +++ b/docs/contact.md @@ -0,0 +1,9 @@ +# πŸ€™ Contact + +We value your feedback and are here to help with any questions or issues you may have. Please use the information below to get in touch with us. + +* **Email:** Jordan.Prescott@fourteenip.com​​ + +*** + +Thank you for reaching out to us. We will get back to you as soon as possible.​​ diff --git a/docs/development.md b/docs/development.md new file mode 100644 index 0000000..db9c0c6 --- /dev/null +++ b/docs/development.md @@ -0,0 +1,26 @@ +# πŸ‘¨β€πŸ’» Development + +Welcome to the Development page! Here you can learn about our development process, track progress, and stay informed about upcoming features and updates. + +### Overview + +Our dedicated development team is continuously working to improve the application, adding new features, fixing bugs, and enhancing performance. We follow a structured development process to ensure high-quality and reliable updates. + +### Development Process + +1. **Planning**: We gather feedback from users and stakeholders to plan new features and improvements. This includes prioritising requests and defining the scope of each development cycle. +2. **Development**: Our team implements new features and fixes bugs. We follow industry best practices and rigorous testing to ensure stability and performance. +3. **Testing**: Before any release, we conduct extensive testing, including unit tests, integration tests, and user acceptance testing, to ensure the highest quality. +4. **Release**: Updates are deployed in a controlled manner, with detailed release notes to inform users of the changes. + +### Release Notes + +Stay up-to-date with our latest releases by checking the release notes. These notes provide detailed information on new features, improvements, and bug fixes: [Release Notes](https://github.com/Jordan-Prescott/odins\_spear/releases) + +### Feature Requests + +We value your feedback and suggestions for new features. While we cannot guarantee every request will be implemented, we consider all user feedback during our planning phase. To suggest a feature, please create a new issue on our issue board with as much detail as possible and label this issue `enhancement` here: [New Feature Request](https://github.com/Jordan-Prescott/odins\_spear/issues) + +### Roadmap + +We maintain a roadmap that outlines our planned features and improvements. This helps you understand what’s coming next and how we are evolving the application. Visit our roadmap here: [Development Roadmap](https://github.com/users/Jordan-Prescott/projects/2/views/10) diff --git a/docs/docs/README.md b/docs/docs/README.md new file mode 100644 index 0000000..336a769 --- /dev/null +++ b/docs/docs/README.md @@ -0,0 +1,3 @@ +# πŸ“– Docs + +How to, what's this, and does it do that all answered in the next sections. diff --git a/docs/docs/features/README.md b/docs/docs/features/README.md new file mode 100644 index 0000000..b7d23c4 --- /dev/null +++ b/docs/docs/features/README.md @@ -0,0 +1,5 @@ +# πŸ™Œ Advanced Features + +The library does not only encapsulate the Odin API methods it also has other features built in. The scripter object gives you access to pre-written scripts of common tasks and features not built in Odin's web portal such as locating an alias. + +Other features such as a data store, reports, and broadwork entities are being worked on in development. diff --git a/docs/docs/features/logger/README.md b/docs/docs/features/logger/README.md new file mode 100644 index 0000000..66d09f8 --- /dev/null +++ b/docs/docs/features/logger/README.md @@ -0,0 +1,19 @@ +# πŸ“œ Logger + +The Logger object logs API calls made using Odin's Spear. + +Details logged are: Date/ Time, Name (Odin's Spear), User (You the developer), response code, endpoint. + +Logs are sent to os.log by default but can be changed in set\_up\_file\_handler() method. Logs can also be sent to an external syslog server using the set\_up\_sys\_log\_handler method. + +{% code overflow="wrap" %} +```python +from odin_api 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.logger.set_up_file_handler() +my_api.logger.set_up_syslog_handler() +``` +{% endcode %} diff --git a/docs/docs/features/logger/sending-logs-to-a-file.md b/docs/docs/features/logger/sending-logs-to-a-file.md new file mode 100644 index 0000000..6927c77 --- /dev/null +++ b/docs/docs/features/logger/sending-logs-to-a-file.md @@ -0,0 +1,42 @@ +--- +description: api.logger.set_up_file_handler() +--- + +# πŸ“‚ Sending Logs To A File + +By default the library will send your logs to the a file name `os.log` in your current working directory . However, if you would like to change the location where your logs are saved you can use this method. The method takes in the `path` argument which is the path to the location the file you would like to store your log file. + +### Parameters + +* path (str, optional): Path to file to send logs. Defaults to 'os.log'. Defaults to 'os.log' + +### Return + +* None: This method does not return anything. + +### How To Use: + +When creating your API object it will set up the logger automatically and start to send logs of API calls made to `os.logg`. When authenticating your API object this sends a call to the API and will Logger will send this to `os.logg`. Therefore, if you plan to send the logs to a different location specify this before authenticating. + +```python +from odins_spear import api + +may_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") + +my_api.logger.set_up_file_hander('yourPath') + +my_api.authenticate() +``` + +### Example logs. + +```log +2024-04-25 15:39:33,919 | Odin's Spear | Username | 400 | /service-providers/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID +2024-04-25 15:48:05,673 | Odin's Spear | Username | 200 | /auth/token +2024-04-25 15:48:06,447 | Odin's Spear | Username | 400 | /service-providers/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID +2024-04-25 15:48:07,215 | Odin's Spear | Username | 200 | /service-providers/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID +2024-04-25 15:48:08,513 | Odin's Spear | Username | 200 | /groups?serviceProviderId=ServicePrividerID +2024-04-25 15:48:09,484 | Odin's Spear | Username | 400 | /groups/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID&groupId=groupId +2024-04-25 15:48:10,305 | Odin's Spear | Username | 400 | /groups/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID&groupId=groupId +``` + diff --git a/docs/docs/features/logger/sending-logs-to-a-syslog-server.md b/docs/docs/features/logger/sending-logs-to-a-syslog-server.md new file mode 100644 index 0000000..976e98a --- /dev/null +++ b/docs/docs/features/logger/sending-logs-to-a-syslog-server.md @@ -0,0 +1,43 @@ +--- +description: api.logger.set_up_sys_log_handler() +--- + +# ☁️ Sending Logs To A Syslog Server + +Logger lets you send your logs externally to a server which can be handy for system administrators that need accountability. When making calls to Odin's API **not all** calls are logged in the event history in the web portal. Using this feature can ensure you get the full benefits of the library and have complete accountability of the team. + +### Parameters + +* url (str): IP/ URL to syslog server e.g. 1.1.1.1 or mysyslogserver.com/ +* port\_number (int): Port number the logs will sent on to URL + +### Return + +* None: This method does not return anything. + +### How To Use: + +When creating your API object it will set up the logger automatically and start to send logs of API calls made to `os.logg`. When authenticating your API object this sends a call to the API and will Logger will send this to `os.logg`. Therefore, to capture all logs including the authentication call this method before authenticating. + +```python +from odins_spear import api + +may_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") + +my_api.logger.set_up_sys_log_handler('yourURL', 1234) + +my_api.authenticate() +``` + +### Example logs. + +```log +2024-04-25 15:39:33,919 | Odin's Spear | Username | 400 | /service-providers/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID +2024-04-25 15:48:05,673 | Odin's Spear | Username | 200 | /auth/token +2024-04-25 15:48:06,447 | Odin's Spear | Username | 400 | /service-providers/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID +2024-04-25 15:48:07,215 | Odin's Spear | Username | 200 | /service-providers/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID +2024-04-25 15:48:08,513 | Odin's Spear | Username | 200 | /groups?serviceProviderId=ServicePrividerID +2024-04-25 15:48:09,484 | Odin's Spear | Username | 400 | /groups/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID&groupId=groupId +2024-04-25 15:48:10,305 | Odin's Spear | Username | 400 | /groups/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID&groupId=groupId +``` + diff --git a/docs/docs/features/rate-limiting-api-calls.md b/docs/docs/features/rate-limiting-api-calls.md new file mode 100644 index 0000000..7564656 --- /dev/null +++ b/docs/docs/features/rate-limiting-api-calls.md @@ -0,0 +1,22 @@ +# πŸ›‘ Rate Limiting API Calls + +The API object has a default parameter of 'rate\_limit' set to True which limits the amounts of API calls the library will make to 5 calls per 1 second. If the limit is reach the system will wait for the limit to pass before executing the next 5 calls. + +This limiting will ease the pressure on the API and hopefully stopping any negative impact on systems such as significant resource drainage leading to outages or poor performance. + +{% hint style="info" %} +Odin does not imply any limitations on the usage of their API and this feature is a precaution. +{% endhint %} + +## Disabling Rate Limiting + +The limitation is applied by default however this can be removed by passing in the `rate_limit` argument set to `False` when instantiating an API object. + +{% hint style="danger" %} +This will remove the limitation of 5 calls per 1 second allowing the library to send as many API requests as it can. +{% endhint %} + +```python +my_api = Api(base_url="https://yourSystemsURL/api/v2", username="John.Smith", + password="ENV_VARIABLE", rate_limit=False) +``` diff --git a/docs/docs/features/reporter/README.md b/docs/docs/features/reporter/README.md new file mode 100644 index 0000000..1af433c --- /dev/null +++ b/docs/docs/features/reporter/README.md @@ -0,0 +1,7 @@ +# πŸ“ˆ Reporter + +Reporter generates human friendly reports and graphs of your Broadworks instance. This can show Broadworks entity call volume over a period of time or a call flow chart showing how calls flow through your system when calling a specific number. + +{% hint style="info" %} +To make use of the features that generate graphs and charts such as Call Flow you will need to install Graphviz [here](https://graphviz.org/download/). +{% endhint %} diff --git a/docs/docs/features/reporter/call-flow/README.md b/docs/docs/features/reporter/call-flow/README.md new file mode 100644 index 0000000..6e39a0c --- /dev/null +++ b/docs/docs/features/reporter/call-flow/README.md @@ -0,0 +1,102 @@ +# πŸ€™ Call Flow + +Generates a visual call flow for a dedicated number for example calls to 0. + +There is now no need to spend hours interrogating how calls to 0 flows through your Braodworks/ Odin system building a call flow for management or to send to customers. This can now be done in seconds with Odins Spear Reporter. Give this feature the number (0), the number type (DN, Extension, Alias), and what its attached to (User, Hunt Group etc) and the feature will generate a flow like the below for you! + +{% hint style="warning" %} +You will need to download Graphviz in order to use this feature. Follow the instruction here [graphviz.md](graphviz.md "mention") +{% endhint %} + +

Simple call flow example of calls to the main number attached to an Auto Attendant

+ +### Making Sense of The Graph + +What is does a red circle with 3001 in it mean and what does 'CFB' stand for? To make sense of the graph you will need to see the Node Key and the Abbreviation Key found below: + +{% content-ref url="node-key.md" %} +[node-key.md](node-key.md) +{% endcontent-ref %} + +{% content-ref url="abbreviation-key.md" %} +[abbreviation-key.md](abbreviation-key.md) +{% endcontent-ref %} + +### Parameters + +* service\_provider\_id (str): Service Provider/ Enterprise where group is hosted. +* group\_id (str): Group ID where target number for call flow is located. +* number (str): Target number for call flow. NOTE: do not include the area code e.g. "123456789" +* number\_type (str): Type of number, options: "dn": Direct Number, "extension": Extension, "alias": Alias +* broadworks\_entity\_type (str): Broadworks entity type target number is associated with.\ + Options: "auto\_attendant": Auto Attendant, "call\_center": Call Center, "hunt\_group": Hunt Group, "user": User + +### Return + +* None: This will generate a SVG file with the call flow in the folder 'os\_reports'. Check this folder once script has complete. + +The script makes use of the following methods: + +```python +api.get.service_provider() +api.get.group() +api.get.auto_attendants() +api.get.auto_attendant() +api.get.users() +api.get.bulk_call_forwarding_always() +api.get.bulk_call_forwarding_busy() +api.get.bulk_call_forwarding_no_answer() +api.get.bulk_call_forwarding_not_reachable() +api.get.user_call_forwarding_always() +api.get.user_call_forwarding_busy() +api.get.user_call_forwarding_no_answer() +api.get.user_call_forwarding_no_answer() +api.get.group_call_center() +api.get.group_call_centers() +api.get.group_call_center() +api.get.group_call_center_overflow() +api.get.group_call_center_stranded_calls() +api.get.group_call_center_stranded_calls_unavailable() +api.get.group_call_center_forced_forwarding() +api.get.group_hunt_groups() +api.get.group_hunt_group() +``` + +### How To Use: + +{% code overflow="wrap" %} +```python +from odin_api import api + +my_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +my_api.authenticate() + +# Generates a call flow chart for the number 123456789. +my_api.reporter.call_flow( + "serviceProviderId", + "groupId", + "123456789", + "dn", + "user" +) +``` +{% endcode %} + +### Terminal Output + +{% code overflow="wrap" fullWidth="false" %} +``` +Start. + +Fetching Service Provider & Group details. +Fetching all Auto Attendants.: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:00<00:00, 1.27it/s] +Fetching all Users.: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 11/11 [00:06<00:00, 1.82it/s] +Fetching all Call Centers.: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1/1 [00:04<00:00, 4.30s/it] +Fetching all Hunt Groups.: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5/5 [00:05<00:00, 1.13s/it] +Gathering nodes in flow. +Generating report. +Saving report. + +End. +``` +{% endcode %} diff --git a/docs/docs/features/reporter/call-flow/abbreviation-key.md b/docs/docs/features/reporter/call-flow/abbreviation-key.md new file mode 100644 index 0000000..7374fa4 --- /dev/null +++ b/docs/docs/features/reporter/call-flow/abbreviation-key.md @@ -0,0 +1,21 @@ +--- +description: >- + If you see things like 'NACF' and have no idea what this is, your in the right + place +--- + +# πŸ”‘ Abbreviation Key + +

Example of Call Flow showing abbreviations.

+ +| Abbreviation | Meaning | +| ------------ | --------------------------------- | +| CFB | Call Forward Busy | +| CFNR | Call Forward Not Reachable | +| CFA | Call Forward Always | +| OF | Overflow | +| NACF | No Answer Call Forward | +| BCT | Bounced Call Transfer | +| SCF | Stranded Calls Transfer | +| USCF | Unavailable Stranded Call Tranfer | + diff --git a/docs/docs/features/reporter/call-flow/graphviz.md b/docs/docs/features/reporter/call-flow/graphviz.md new file mode 100644 index 0000000..92be91e --- /dev/null +++ b/docs/docs/features/reporter/call-flow/graphviz.md @@ -0,0 +1,7 @@ +# πŸ“ˆ Graphviz + +Graphviz is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. For some of the graphs in [Reporter](../) this software is needed and it will throw an error if trying to use a feature that requires this and you do not have this installed on your machine. + +To get this software click the link below, find the version you need for your machines operating system and follow the installation process. + +{% embed url="https://graphviz.org/download/" %} diff --git a/docs/docs/features/reporter/call-flow/node-key.md b/docs/docs/features/reporter/call-flow/node-key.md new file mode 100644 index 0000000..fb20aa2 --- /dev/null +++ b/docs/docs/features/reporter/call-flow/node-key.md @@ -0,0 +1,15 @@ +# πŸ”‘ Node Key + +## Call Flow Nodes + +

Simple call flow example of calls to the main number attached to an Auto Attendant

+ +
NodeShape/ ColourDetails
Start/ Entry NodeBlack Box Pointed EdgesThis highlights the start of the flow. This is simply to guide the user to the first Broadworks Entity in the call flow.
Auto Attendant (AA)Red Round CircleThis node shows the extension number in the middle of the node and also shows the key number it forwards calls to on each edge. In the above example key 2 forwards to 104.
Call Center (CC)Pink Box Rounded EdgesThis node represents a Call Center that will contain agents. Each edge will show the type of routing to the connecting node. For example in the above the Call Center 'OF' - OverFlows to 2001.
Hunt Group (HG)Purple Box Rounded EdgesThis is a Hunt Group which will contain users. Like the CC node it will also highlight the type of call forwarding to whatever the next connecting node is. In the above the Hunt Group 2001 'CFNR' Call Forward Not Reachable to 102.
User (U)Orange Box Rounded EdgesThis node is a User and like the CC and HG it will show the type of call forwarding to the connecting node. In the above user 104 'CFB' Call Forwards Busy to HG 2001.
Exit NodeWhite Circle with Black BorderThese nodes indicate calls leave the Broadworks system. In the above AA 3001 forwards calls to '0123456789' on key 3 exiting the system.
+ +{% hint style="info" %} +What the CFB does 'CFB' stand for! You can find all the abbreviations documented in the Abbreviation Key page. Link below. +{% endhint %} + +{% content-ref url="abbreviation-key.md" %} +[abbreviation-key.md](abbreviation-key.md) +{% endcontent-ref %} diff --git a/docs/docs/features/reporter/group-users-call-statistics.md b/docs/docs/features/reporter/group-users-call-statistics.md new file mode 100644 index 0000000..5e3e40d --- /dev/null +++ b/docs/docs/features/reporter/group-users-call-statistics.md @@ -0,0 +1,85 @@ +# πŸ”’ Group Users Call Statistics + +Generates CSV file detailing all users in a single groups outgoing and incoming call statistics for a specified time range. + +{% hint style="danger" %} +Data is only guaranteed for 3 months, if your requesting over 3 months all data may not be saved and output should be reviewed. This is an Odin limitation. +{% endhint %} + +{% hint style="info" %} +This feature can take a good amount of time to complete depending on the size of your group. For example a group containing 3000 users will take around an hour to complete. + +This is being worked on and we hope to speed it up for you soon! Thank you. +{% endhint %} + +We have found that customers like to review how busy their users are and identify any that are not in use so they are lower their bill. This report identifies exactly that showing all users call statistics over a maximum guaranteed period of 3 months. If a user has not made a call in that time this can be easily spotted as the row will consist of only 0's (See example out below). + +### Example Output + +

Example output from feature

+ +### Parameters + +* service\_provider\_id (str): Service Provider/ Enterprise where group is hosted. +* group\_id (str): Target Group you would like to know user statistics for. +* start\_date (str): Start date of desired time period. Date must follow format 'YYYY-MM-DD' +* end\_date (str, optional): End date of desired time period. Date must follow format 'YYYY-MM-DD'.\ + If this date is the same as Start date you do not need this parameter. Defaults to None. +* start\_time (_type_, optional): Start time of desired time period. Time must follow formate 'HH:MM:SS'. If you do not need to filter by time and want the whole day leave this parameter. Defaults to "00:00:00". MAX Request is 3 months. +* end\_time (_type_, optional): End time of desired time period. Time must follow formate 'HH:MM:SS'. If you do not need to filter by time and want the whole day leave this parameter. Defaults to "23:59:59". MAX Request is 3 months. +* time\_zone (str, optional): A specified time you would like to see call records in. + +### Return + +* None: This will generate a CSV file with the report in the folder 'os\_reports'. Check this folder once script has completed. + +The script makes use of the following methods: + +```python +api.get.users() +api.get.users_stats() +``` + +### How To Use: + +{% code overflow="wrap" %} +```python +from odins_spear.api import Api + +my_api= Api("https://magic.14ip.net/api/v2", "Jordan.Prescott", "MAGIC-US", rate_limit=False) +my_api.logger.set_up_sys_log_handler("123.456.789.112", 48816) +my_api.authenticate() + +# Whole day in date range +my_api.reporter.group_users_call_statistics( + "serviceProviderID", + "groupID", + "11-04-2024", + "14-06-2024", +) + +# Specific time during day and in EST timezone +my_api.reporter.group_users_call_statistics( + "serviceProviderID", + "groupID", + "11-04-2024", + "14-06-2024", + start_time = "09:00:00", + end_time: str = "17:00:00", + time_zone: str = "EST" +) +``` +{% endcode %} + +### Terminal Output + +{% code overflow="wrap" fullWidth="false" %} +``` +Start. +Fetching list of users in GroupID. +Fetching individual stats for each user. This may take several minutes.: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 90/90 [01:34<00:00, 1.04s/it] +Formatting individual stats for each user.: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 90/90 [00:00<00:00, 42144.40it/s] + +End. +``` +{% endcode %} diff --git a/docs/docs/features/scripter/README.md b/docs/docs/features/scripter/README.md new file mode 100644 index 0000000..20cf052 --- /dev/null +++ b/docs/docs/features/scripter/README.md @@ -0,0 +1,20 @@ +# πŸ€– Scripter + +The Scripter object gives you access to pre-written scripts for common tasks and features not built in Odin's web portal such as locating an alias. + +Each API object creates its own Scripter object on instantiation, the Scripter object can then be accessed through the API object. + +{% code overflow="wrap" %} +```python +from odin_api 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.scripter.{script} +``` +{% endcode %} + +{% hint style="info" %} +For each script detail please see script documentation. +{% endhint %} diff --git a/docs/docs/features/scripter/aa-cc-hg-audit.md b/docs/docs/features/scripter/aa-cc-hg-audit.md new file mode 100644 index 0000000..193c5d3 --- /dev/null +++ b/docs/docs/features/scripter/aa-cc-hg-audit.md @@ -0,0 +1,99 @@ +--- +description: my_api.scripter.aa_cc_hg_audit() +--- + +# βœ”οΈ AA, CC, HG Audit + +This script returns the services assigned to Auto Attendants, Call Centres, and Hunt Groups. Only services are applied to these entities and there are scenarios one would need to focus services assigned to these entities. + +The script makes use of the following methods: + +```python +api.get.auto_attendants() +api.get.group_call_centers() +api.get.group_hunt_groups() +api.get.user_services_assigned() +``` + +### Parameters + +* service\_provider\_id: Service Provider ID or Enterprise ID containing the Group ID. +* group\_id: Group ID to generate the report for. + +### Return + +* JSON: A JSON formatted report of service packs assigned in the group. + +### How To Use: + +```python +from odins_spear import api + +may_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +my_api.authenticate() + +print( + my_api.scripter.aa_cc_hg_audit( + "serviceProviderId", + "groupId" + ) +) +``` + +### Example returned data (formatted): + +```json +{ + "auto_attendants": [ + { + "serviceUserId": "my_aa", + "services": [ + { + "serviceName": "Alternate Numbers" + } + ] + } + ], + "call_centers": [ + { + "serviceUserId": "my_cc", + "type": "Premium", + "services": [] + }, + { + "serviceUserId": "my_cc_2", + "type": "Premium", + "services": [ + { + "serviceName": "Call Forwarding Busy", + "isActive": false + } + ] + } + ], + "hunt_groups": [ + { + "serviceUserId": "my_hg_1", + "services": [ + { + "serviceName": "Call Forwarding Selective", + "isActive": true + } + ] + }, + { + "serviceUserId": "my_hg_2", + "services": [ + { + "serviceName": "Call Forwarding Always", + "isActive": false + } + ] + }, + { + "serviceUserId": "my_hg_3", + "services": [] + } + ] +} +``` diff --git a/docs/docs/features/scripter/bulk-password-reset.md b/docs/docs/features/scripter/bulk-password-reset.md new file mode 100644 index 0000000..5d01225 --- /dev/null +++ b/docs/docs/features/scripter/bulk-password-reset.md @@ -0,0 +1,98 @@ +--- +description: my_api.scripter.bulk_password_reset() +--- + +# πŸ”‘ Bulk Password Reset + +Resets a list of users SIP passwords, Voicemail passcodes, or Web Authentication Password. Specifify in password\_type with the options of SIP = 'SIP', Voicemail = 'VM', or Web = "WEB" and the script will perform the necessary actions. + +{% hint style="warning" %} +``` +This script ONLY updates SIP passwords, Voicemail passcodes, or Web Authentication password.. +``` +{% endhint %} + +The script makes use of the following methods: + +```python +api.get.passwords_generate() +api.put.user_authentication_service() +api.get.passcodes_generate() +api.put.user_portal_passcode() +api.get.passwords_generate() +api.put.user_web_authentication_password() +``` + +### Parameters + +* service\_provider\_id (str): Service Provider ID where group is hosted. +* group\_id (str): Group ID where target users are located. +* users (list): List of User IDs of the target users to reset the password. +* password\_type (str): Type of password to reset either 'SIP', 'VM', or 'WEB'. Only accepts these two options. + +### Raises: + +* OSInvalidPasswordType: Only valid password options are SIP, VM, WEB. If another is requested this will be raised. + +### Return + +* JSON: Returns JSON containing user ID and new password set. + +### How To Use: + +```python +from odins_spear import api + +may_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +my_api.authenticate() + + +users = [ + "testuser1@domain.com", + "testuser2@domain.com", + "testuser3@domain.com" +] + +# changes SIP password for users +my_api.scripter.bulk_password_reset( + "ServiceProviderID", + "GroupID", + users=users, + password_type="SIP" + ) + +# changes Voicemail passcode for users +my_api.scripter.bulk_password_reset( + "ServiceProviderID", + "GroupID", + users=users, + password_type="VM" + ) + +# changes Web Authentication password for users +my_api.scripter.bulk_password_reset( + "ServiceProviderID", + "GroupID", + users=users, + password_type="WEB" + ) +``` + +### Example Returned Data of SIP Passwords (Formatted) + +```json +[ + { + "userId": "testuser1@domain.com", + "newPassword": "8H]}3y" + }, + { + "userId": "testuser2@domain.com", + "newPassword": "@734mC" + }, + { + "userId": "testuser3@domain.com", + "newPassword": "b6V_@%" + } +] +``` diff --git a/docs/docs/features/scripter/find-alias-script.md b/docs/docs/features/scripter/find-alias-script.md new file mode 100644 index 0000000..462edfb --- /dev/null +++ b/docs/docs/features/scripter/find-alias-script.md @@ -0,0 +1,66 @@ +# πŸ”Ž Find Alias + +Locates alias if assigned to Broadworks entity. + +The script searches through various entity types including Auto Attendants (AA), Hunt Groups (HG), and Call Centers (CC), as well as individual Users. It employs a retry mechanism for instances where initial attempts to fetch entity details fail. + +The search is conducted in two phases: + +1. Collecting details of AAs, HGs, and CCs and checking for the aliases. +2. If not found, search through the users for the alias. + +If the alias is found, the method returns a string specifying the type of entity and its name or userID. If the alias is not found after checking all entities, an AOAliasNotFound exception is raised. + +The script makes use of the following methods: + +```python +api.get.auto_attendants() +api.get.auto_attendant() +api.get.group_hunt_groups() +api.get.group_hunt_group() +api.get.call_centers() +api.get.call_center() +api.get.users() +``` + +### Parameters + +* service\_provider\_id: Service Prodiver where group is hosted. +* group\_id: Group where alias is located. +* alias: Alias number to identify e.g. 0 + +### Return + +* Returns type and name/ userId of entity where alias located. + +### Raise + +* AOALiasNotFound: If the alias is not found AOAliasNotFound error raised + +### How To Use: + +{% code overflow="wrap" %} +```python +from odin_api import api + +magic = api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +magic.authenticate() + +# find alias method +print(magic.scripter.find_alias('Service Provider ID', 'Group ID', alias=11)) +``` +{% endcode %} + +### Terminal Output + +{% code overflow="wrap" fullWidth="false" %} +``` +Fetching AA, HG, and CC details: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ +Searching AA, HG, and CC for alias 11: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ +2024-01-03 13:05:33,003 - INFO - Fetched users. +Searching Users for alias: 11: 38%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–Ž + + Alias (11) found: User - userid@domain.com + +``` +{% endcode %} diff --git a/docs/docs/features/scripter/group-audit.md b/docs/docs/features/scripter/group-audit.md new file mode 100644 index 0000000..6a2ff21 --- /dev/null +++ b/docs/docs/features/scripter/group-audit.md @@ -0,0 +1,161 @@ +--- +description: api.scripter.group_audit() +--- + +# β˜‘οΈ Group Audit + +This script will generate a JSON output containing detail, and summaries, of elements of the group which are typically chargeable to a customer. + +Currently, the script produces information around: + +* User Count and Limits +* Group DNs +* Group Services +* User Services +* User Service Packs +* Trunking Call Capacity + +The script makes use of the following methods: + +```python +api.get.group_services() +api.get.group_services_assigned() +api.get.group_dns() +api.get.group() +api.get.group_trunk_groups_call_capacity() +``` + +### Parameters + +* service\_provider\_id: Service Provider where the group is hosted. +* group\_id: Group where the User is located. + +### Return + +* JSON: json structure containing all the information + +### How To Use: + +```python +from odins_spear import api + +magic = api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +magic.authenticate() + + +print(magic.scripter.group_audit("ServiceProviderID", "GroupID")) +``` + +### Example returned data (formatted): + +```json +{ + "group_detail": { + "defaultDomain": "bworks.provider.com", + "userLimit": 50, + "userCount": 4, + "groupName": "Example Group 1", + "callingLineIdName": "Example Group 1", + "callingLineIdPhoneNumber": "+441632123456", + "callingLineIdDisplayPhoneNumber": "01632123456", + "timeZone": "Europe/London", + "timeZoneDisplayName": "(GMT) Greenwich Mean Time", + "serviceProviderId": "Ent1", + "groupId": "GrpA" + }, + "licence_breakdown": { + "user_services": [ + { + "serviceName": "Authentication", + "usage": 1, + "users": [ + "User1" + ] + }, + { + "serviceName": "Call Forwarding Always", + "usage": 2, + "users": [ + "User1", + "User2" + ] + }, + { + "serviceName": "Call Forwarding Busy", + "usage": 2, + "users": [ + "User1", + "User3" + ] + } + ], + "group_services": [ + { + "serviceName": "Auto Attendant", + "usage": 1 + }, + { + "serviceName": "Hunt Group", + "usage": 5 + }, + { + "serviceName": "Music On Hold", + "usage": 1 + }, + { + "serviceName": "Trunk Group", + "usage": 2 + } + ], + "service_pack_services": [ + { + "servicePackName": "Standard", + "usage": 3, + "description": "Standard Pack", + "users": [ + "User1", + "User2", + "User3" + ] + }, + { + "servicePackName": "Premium", + "usage": 1, + "description": "Premium Pack", + "users": [ + "User4" + ] + } + ] + }, + "group_DNs": { + "assigned": { + "activated": [ + "+44-1632123456" + ], + "deactivated": [ + "+44-1632654321" + ], + "total_assigned_DNs": 2 + }, + "unassigned": { + "activated": [ + "+44-1632456123" + ], + "deactivated": [ + "+44-1632321654" + ], + "total_unassigned_DNs": 2 + }, + "total_DNs": 4 + }, + "group_trunking": { + "maxActiveCalls": 10, + "maxAvailableActiveCalls": 10, + "burstingMaxActiveCalls": 1, + "burstingMaxAvailableActiveCalls": 1, + "maxAvailableNumberOfBurstingBTLUs": 0, + "numberOfBurstingBTLUs": 0 + } +} +``` diff --git a/docs/docs/features/scripter/move-numbers.md b/docs/docs/features/scripter/move-numbers.md new file mode 100644 index 0000000..c1df246 --- /dev/null +++ b/docs/docs/features/scripter/move-numbers.md @@ -0,0 +1,66 @@ +--- +description: my_api.scripter.move_numbers() +--- + +# πŸ”’ Move Numbers + +Moves a list of numbers from existing group to another group on the same broadworks instance. This can move numbers between Service Provider/ Enterprise and groups in the same Service Provider/ Enterprise. + +{% hint style="warning" %} +```python +Numbers need to be strings and follow this format: +{country code}-{number}. +``` +{% endhint %} + + + +The script makes use of the following methods: + +```python +api.delete.group_dns() +api.delete.service_provider_dns() +api.post.group_dns_assign_bulk() +api.post.group_dns() +``` + +### Parameters + +* current\_service\_provider\_id (str): Current Service Provider/ Enterprise where numbers are located. +* current\_group\_id (str): Current Group ID where numbers are located. +* target\_service\_provider\_id (str): Target Service Provider/ Enterprise to move the numbers to. +* target\_group\_id (str): Target Group to move numbers to. +* start\_of\_number\_range (str): Starting number in range of numbers you would like to move. +* end\_of\_number\_range (str): Ending nummber in range of numbers you would like to move. If you need to move only one number do not enter a value for this paramter. Defaults to None. + +### Return + +* Bool: Returns a True value once complete. + +### How To Use: + +```python +from odins_spear import api + +may_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +my_api.authenticate() + +# Moving the range 234567891-3 from GroupID-A to GroupID-B +api.scripter.move_numbers( + current_service_provider_id="ServiceProviderID-A", + current_group_id="GroupID-A", + target_service_provider_id="ServiceProverID-B", + target_group_id="GroupID-B", + start_of_range_number="+1-234567891", + end_of_range_number="+1-234567892" +) + + +# Moving the number 234567891 from GroupID-A to GroupID-B +api.scripter.move_numbers( + current_service_provider_id="ServiceProviderID-A", + current_group_id="GroupID-A", + target_service_provider_id="ServiceProverID-B", + target_group_id="GroupID-B", + start_of_range_number="+1-234567891" +) +``` diff --git a/docs/docs/features/scripter/remove-numbers.md b/docs/docs/features/scripter/remove-numbers.md new file mode 100644 index 0000000..40cc108 --- /dev/null +++ b/docs/docs/features/scripter/remove-numbers.md @@ -0,0 +1,54 @@ +--- +description: my_api.scripter.remove_numbers() +--- + +# πŸ”’ Remove Numbers + +Removes a singular or range of numbers from the entire Broadworks instance. + +{% hint style="warning" %} +```python +Numbers need to be strings and follow this format: +{country code}-{number}. +``` +{% endhint %} + +The script makes use of the following methods: + +```python +api.delete.group_dns() +api.delete.service_provider_dns() +``` + +### Parameters + +* service\_provider\_id (str): Service Provider/ Enterprise ID where Group is located which hosts target numbers. +* group\_id (str): Group ID where target numbers are located. +* start\_of\_number\_range (str): Starting number in range of numbers you would like to remove. +* end\_of\_number\_range (str): Ending nummber in range of numbers you would like to remove. If you need to remove only one number do not enter a value for this paramter. Defaults to None. + +### Return + +* Bool: Returns a True value once complete. + +### How To Use: + +
from odins_spear import api
+
+may_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1")
+my_api.authenticate()
+
+# Removes the range 234567891-3 from Broadworks instance.
+api.scripter.move_numbers(
+    service_provider_id="ServiceProviderID-A",
+    group_id="GroupID-A",
+    start_of_range_number="+1-234567891",
+    end_of_range_number="+1-234567892"
+)
+
+# Removes the range 234567891 from Broadworks instance.
+api.scripter.move_numbers(
+    service_provider_id="ServiceProviderID-A",
+    group_id="GroupID-A",
+    start_of_range_number="+1-234567891"
+)
+
diff --git a/docs/docs/features/scripter/service-pack-audit.md b/docs/docs/features/scripter/service-pack-audit.md new file mode 100644 index 0000000..93042fd --- /dev/null +++ b/docs/docs/features/scripter/service-pack-audit.md @@ -0,0 +1,62 @@ +--- +description: api.scripter.service_pack_audit() +--- + +# βœ… Service Pack Audit + +A stripped down version of group audit focussing only on the service packs assigned within the group. This only shows the service packs assigned and total count of unlike group audit which details the users this is assigned to. + +The script makes use of the following methods: + +
api.get.group_services()
+
+ +### Parameters + +* service\_provider\_id: Service Provider ID or Enterprise ID containing the Group ID. +* group\_id: Group ID to generate the report for. + +### Return + +* JSON: A JSON formatted report of service packs assigned in the group. + +### How To Use: + +```python +from odins_spear import api + +may_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +my_api.authenticate() + +print( + my_api.scripter.service_pack_audit( + "ServiceProviderId", + "GroupId" + ) +) +``` + +### Example returned data (formatted): + +```json + +{ + "service_pack_services": [ + { + "servicePackName": "Standard pack 1", + "usage": 20, + "description": "Standard pack 1" + }, + { + "servicePackName": "Premium pack 1", + "usage": 1, + "description": "Premium pack 1" + }, + { + "servicePackName": "Service pack 2", + "usage": 13, + "description": "Service pack 2" + } + ] +} +``` diff --git a/docs/docs/features/scripter/service-provider-trunking-capacity.md b/docs/docs/features/scripter/service-provider-trunking-capacity.md new file mode 100644 index 0000000..ff5242b --- /dev/null +++ b/docs/docs/features/scripter/service-provider-trunking-capacity.md @@ -0,0 +1,112 @@ +--- +description: my_api.scripter.service_provider_trunking_capacity() +--- + +# πŸ“œ Service Provider Trunking Capacity + +Returns a JSON breakdown of the Trunking Call Capacity of a Service Provider/ Enterprise (SP/ENT). This will show the totals at each level from SP/ ENT to Group to Trunk Groups located in Groups. At each level Max Active Calls and Bursting Max Active calls are detailed and then differences at calculated. + +{% hint style="info" %} +``` +This does not return data on Enterprise Trunks. +``` +{% endhint %} + +The script makes use of the following methods: + +```python +api.get.service_provider_trunk_group_call_capacity() +api.get.groups() +api.get.group_trunk_groups_call_capacity() +api.get.group_trunk_groups() +api.get.group_trunk_group() +``` + +### Parameters + +* service\_provider\_id (str): Target Service Provider ID/ Enterprise ID that you would like the Trunk Call Capacity breakdown. + +### Return + +* JSON: JSON data of Trunking Call Capacity details of SP/ ENT, Groups, and Trunk Groups. + +### How To Use: + +```python +from odins_spear import api + +may_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +my_api.authenticate() + +my_api.scripter.service_provider_trunking_capacity("ServiceProviderID") +``` + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "serviceProviderId": "ServiceProviderID", + "maxActiveCalls": 226, + "burstingMaxActiveCalls": 18, + "groupsCallCapacityTotal": 114, + "groupsBurstingCallCapacityTotal": 36, + "groups": [ + { + "groupId": "GroupIDA", + "groupName": "Group A", + "maxActiveCalls": 13, + "burstingMaxAvailableActiveCalls": 5, + "burstingMaxActiveCalls": 2, + "trunkGroups": [ + { + "name": "Trunk 1", + "maxActiveCalls": 1, + "burstingMaxActiveCalls": 0 + }, + { + "name": "Trunk 2", + "maxActiveCalls": 1, + "burstingMaxActiveCalls": 0 + }, + { + "name": "Trunk 3", + "maxActiveCalls": 2, + "burstingMaxActiveCalls": 0 + } + ], + "trunkGroupsCallCapacityTotal": 4, + "trunkGroupsBurstingCallCapacityTotal": 0, + "callCapacityDifference": 9, + "burstingCallCapacityDifference": 0 + }, + { + "groupId": "GroupIDB", + "groupName": "Group B", + "maxActiveCalls": 36, + "burstingMaxAvailableActiveCalls": 5, + "burstingMaxActiveCalls": 2, + "trunkGroups": [ + { + "name": "Trunk 1", + "maxActiveCalls": 1, + "burstingMaxActiveCalls": 0 + }, + { + "name": "Trunk 2", + "maxActiveCalls": 1, + "burstingMaxActiveCalls": 0 + }, + { + "name": "Trunk 3", + "maxActiveCalls": 9, + "burstingMaxActiveCalls": 0 + } + ], + "trunkGroupsCallCapacityTotal": 11, + "trunkGroupsBurstingCallCapacityTotal": 0, + "callCapacityDifference": 25, + "burstingCallCapacityDifference": 0 + } + "callCapacityDifference": 112, + "burstingCallCapacityDifference": -18 +``` diff --git a/docs/docs/features/scripter/user-association.md b/docs/docs/features/scripter/user-association.md new file mode 100644 index 0000000..eb6547f --- /dev/null +++ b/docs/docs/features/scripter/user-association.md @@ -0,0 +1,61 @@ +--- +description: api.scripter.user_association() +--- + +# πŸ”— User Association + +This script is to identify a user's associations with Call Centers (CC), Hunt Groups (HG), and Pick Up Groups. Additionally, this returns other key information of the user such as extension, phone number, and services and feature packs assigned as this data can be useful when reviewing which CC and HG they are associated to for example if an agent in a CC has a higher feature pack than needed for work in x CC. + +This script uses the below methods to achieve this: + +```python +api.get.call_pickup_group_user() +api.get.group_hunt_group_user() +api.get.user_call_center() +api.get.user_report() +``` + +### Parameters + +* service\_provider\_id: Service Provider where the group is hosted. +* group\_id: Group where the User is located. +* user\_id: Target user ID. + +### Return + +* str: Formatted output of the user showing all CC, HG, and Pick Up user is assigned to. + +### How To Use: + +{% code overflow="wrap" %} +```python +from odins_spear import api + +magic = api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +magic.authenticate() + +magic.scripter.user_association( + "ServiceProviderID", + "GroupID", + "UserID" +) +``` +{% endcode %} + +### Terminal Output + +{% code overflow="wrap" fullWidth="false" %} +``` +User Data: + User Id: userId@domain.com + First Name: John + Last Name: Smith + Extension: 101 + Phone Number: 0123456789 + Services: Custom Ringback User + Feature Packs: Feature Pack X, Feature Pack Y + Hunt Groups: Accounts, Sales, Reception + Call Centers: Technical Support, Service Support + Pick Up Group: Tech and Service +``` +{% endcode %} diff --git a/docs/docs/getting-started/README.md b/docs/docs/getting-started/README.md new file mode 100644 index 0000000..1bff5dc --- /dev/null +++ b/docs/docs/getting-started/README.md @@ -0,0 +1,3 @@ +# 🧐 Getting Started + +The next couple of sections will walk you through getting set up to use odin\_api. It will cover downloading Python and an IDE for you to write code in, setting up an environment variable something that the library needs, all the way through to getting your first lines of code written using the library. diff --git a/docs/docs/getting-started/create-api-object.md b/docs/docs/getting-started/create-api-object.md new file mode 100644 index 0000000..0856a06 --- /dev/null +++ b/docs/docs/getting-started/create-api-object.md @@ -0,0 +1,29 @@ +# βš™οΈ Create API Object + +The API object is the core object of the library, all functionality is accessed through this object. The first step is to create the object and pass it the base URL of the API, your username, and the environment variable. + +{% code overflow="wrap" lineNumbers="true" %} +```python +from odins_spear import api + +my_api = api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +``` +{% endcode %} + +Once you have built the object the next step is to authenticate it, this authorizes the object to interact with the Odin API it is the equivalent of you logging in through the web portal. To authenticate this call the .authenticate() method on the object. + +
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()
+
+ +This method can raise an OAApiAuthenticationFail error, which means that the API has failed to authenticate and it will give you some details on potential issues. If this does not raise an error the API object is authenticated and now authorized to use all other methods. + +{% hint style="info" %} +More than one object can be built for multiple odin instances. +{% endhint %} + +#### Check out API object details: + +[Broken link](broken-reference "mention") diff --git a/docs/docs/getting-started/downloading-library-beta.md b/docs/docs/getting-started/downloading-library-beta.md new file mode 100644 index 0000000..8521f3b --- /dev/null +++ b/docs/docs/getting-started/downloading-library-beta.md @@ -0,0 +1,27 @@ +# ⬇️ Downloading Library (BETA) + +First browse to the GitHub repo. + +{% embed url="https://github.com/Jordan-Prescott/odin_api" %} + +Next, click the green '_<> Code'_ button and then '_Download ZIP'._ + +
+ +Once the code is downloaded, extract the files from the zipped file and locate the folder _'odin\_api'_ the file _'requirements.txt'._ These are the only files and folders you need to use the library, the others can be removed. + +
+ +Staying in the same folder opens a new machine terminal, one method to do this is from your folder view click the blue file in the top right-hand corner and select 'O_pen Windows PowerShell'._ Next you need to install the requirements for the library, run the below command to do this. + +```python +pip install -r requirements.txt +``` + +Finally, place that folder where you would like to write code that uses the library and import the library in your Python files. + +
+ +{% hint style="info" %} +While the library is in development this is the current way to use it. Please note this will change once version 0.1.0 is released. +{% endhint %} diff --git a/docs/docs/getting-started/getting-the-essentials-python-+-ide.md b/docs/docs/getting-started/getting-the-essentials-python-+-ide.md new file mode 100644 index 0000000..1fa478b --- /dev/null +++ b/docs/docs/getting-started/getting-the-essentials-python-+-ide.md @@ -0,0 +1,13 @@ +# 🐍 Getting the Essentials (Python + IDE) + +To _run_ Python code you first need to install Python on your machine, below is the link to the Python website where you can download this. I recommend if you are on Windows, install this through the Windows store and get the latest version. + +{% embed url="https://www.python.org/downloads/" %} + +To _write_ Python code you need an Integrated Development Environment (IDE) a fancy title for software (app) where you can write code. Just like the Notepad app is used to write text. The one I recommend is Visual Studio Code (VSC) by Microsoft, you can download that below. + +{% hint style="info" %} +Make sure you choose the correct version for the operating system you are running. If you are running Windows you want the Windows version. +{% endhint %} + +{% embed url="https://code.visualstudio.com/download" %} diff --git a/docs/docs/getting-started/setting-environment-variable.md b/docs/docs/getting-started/setting-environment-variable.md new file mode 100644 index 0000000..2a97bd1 --- /dev/null +++ b/docs/docs/getting-started/setting-environment-variable.md @@ -0,0 +1,22 @@ +# ⚠️ Setting Environment Variable + +In the library to send requests an API object is built which needs your Odin username and password. The username is passed in as a variable however the password parameter is the key to your local environment variable where the value is your password. The API object will pull this password from your local machine and use it to authenticate. + +The reason for this is if you decide to save a Python file using the odin\_api library, it is best practice to not save passwords in these files in case they are exposed. + +Before using the library set up an environment variable in your local machine and when instantiating an API object use the key in the password parameter. Below is an example where I set a variable and use it in the library. + +Setting environment variable (Windows): + +
+ +Passing environment variable to API object: + +
from odins_spear import api
+
+magic = api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1")
+
+ +## Guide on setting environmental variables: + +{% embed url="https://chlee.co/how-to-setup-environment-variables-for-windows-mac-and-linux/" %} diff --git a/docs/docs/methods/README.md b/docs/docs/methods/README.md new file mode 100644 index 0000000..e7db139 --- /dev/null +++ b/docs/docs/methods/README.md @@ -0,0 +1,2 @@ +# πŸ“¦ Standard Methods + diff --git a/docs/docs/methods/alternate-numbers/README.md b/docs/docs/methods/alternate-numbers/README.md new file mode 100644 index 0000000..9d9d3bf --- /dev/null +++ b/docs/docs/methods/alternate-numbers/README.md @@ -0,0 +1,6 @@ +--- +description: All things alternate numbers +--- + +# πŸ”’ Alternate Numbers + diff --git a/docs/docs/methods/alternate-numbers/get-user-alternate-numbers.md b/docs/docs/methods/alternate-numbers/get-user-alternate-numbers.md new file mode 100644 index 0000000..2a2d987 --- /dev/null +++ b/docs/docs/methods/alternate-numbers/get-user-alternate-numbers.md @@ -0,0 +1,101 @@ +--- +description: my_api.get.user_alternate_numbers() +--- + +# 1️⃣ GET - User Alternate Numbers + +Fetches a list of a user/ service such as Auto Attendant, Hunt Group, or Call Centres alternate numebrs. + +### Parameters + +* user\_id (str): Target user/ service\_user\_id + +### Returns + +* Dict: List of all alternate numbers assigned to the user/ service. + +### How To Use: + +{% code overflow="wrap" %} +```python +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_alternate_numbers( + "9546547216@microv-works.com" +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "userId": "9546547216@microv-works.com", + "distinctiveRing": false, + "alternateEntries": [ + { + "phoneNumber": "5131111112", + "extension": "1112", + "ringPattern": "Short-Short-Long", + "alternateEntryId": 1 + }, + { + "phoneNumber": null, + "extension": null, + "ringPattern": null, + "alternateEntryId": 2 + }, + { + "phoneNumber": null, + "extension": null, + "ringPattern": null, + "alternateEntryId": 3 + }, + { + "phoneNumber": null, + "extension": null, + "ringPattern": null, + "alternateEntryId": 4 + }, + { + "phoneNumber": null, + "extension": null, + "ringPattern": null, + "alternateEntryId": 5 + }, + { + "phoneNumber": null, + "extension": null, + "ringPattern": null, + "alternateEntryId": 6 + }, + { + "phoneNumber": null, + "extension": null, + "ringPattern": null, + "alternateEntryId": 7 + }, + { + "phoneNumber": null, + "extension": null, + "ringPattern": null, + "alternateEntryId": 8 + }, + { + "phoneNumber": null, + "extension": null, + "ringPattern": null, + "alternateEntryId": 9 + }, + { + "phoneNumber": null, + "extension": null, + "ringPattern": null, + "alternateEntryId": 10 + } + ] +} +``` diff --git a/docs/docs/methods/authentication/README.md b/docs/docs/methods/authentication/README.md new file mode 100644 index 0000000..fe316ca --- /dev/null +++ b/docs/docs/methods/authentication/README.md @@ -0,0 +1,3 @@ +# πŸ”‘ Authentication + +All things authentication and passwords. diff --git a/docs/docs/methods/authentication/user-web-authentication-password.md b/docs/docs/methods/authentication/user-web-authentication-password.md new file mode 100644 index 0000000..bcb0055 --- /dev/null +++ b/docs/docs/methods/authentication/user-web-authentication-password.md @@ -0,0 +1,35 @@ +--- +description: my_api.put.user_web_authentication_password() +--- + +# πŸ” PUT - User Web Authentication Password + +Set new Web Authentication password for a single user. + +### Parameters + +* user\_id (str): Target user ID to reset the web authentication password. +* new\_password (str): New web authentication password to apply to new user. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +The below code will set the AA to deactivated. + +{% code overflow="wrap" %} +```python +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.put.user_web_authentication_password( + "userID@domain.com", + "newPassword" +) +``` +{% endcode %} + diff --git a/docs/docs/methods/auto-attendants/README.md b/docs/docs/methods/auto-attendants/README.md new file mode 100644 index 0000000..30233ad --- /dev/null +++ b/docs/docs/methods/auto-attendants/README.md @@ -0,0 +1,3 @@ +# πŸ’¬ Auto Attendants + +All things updating auto attendants. diff --git a/docs/docs/methods/auto-attendants/auto-attendant-status.md b/docs/docs/methods/auto-attendants/auto-attendant-status.md new file mode 100644 index 0000000..1244da8 --- /dev/null +++ b/docs/docs/methods/auto-attendants/auto-attendant-status.md @@ -0,0 +1,43 @@ +--- +description: my_api.put.auto_attendant_status() +--- + +# 🟒 PUT - Auto Attendant Status + +In this method, you can control the status of your auto attendants (AA) by activating and deactivating them. The method takes in two parameters, they are a list of the AA service user IDs and a status which is a boolean value of True (Active) or False (Deactivate). + +### Parameters + +* auto\_attendant\_user\_ids (list): List of service user IDs (AA IDs), the status given will be applied to these. +* status (bool): Boolean value of True (Activate) or False (Deactivate) which will be applied to list of AAs. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +The below code will set the AA to deactivated. + +{% code overflow="wrap" %} +```python +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() + +auto_attendants = [ + "basic_aa@domain.com" +] + +my_api.put.auto_attendants_status( + auto_attendant_user_ids= auto_attendants, + status= False +) +``` +{% endcode %} + +#### Result: + +

Basic AA updated to deactivated.

+ diff --git a/docs/docs/methods/auto-attendants/auto-attendant-submenu.md b/docs/docs/methods/auto-attendants/auto-attendant-submenu.md new file mode 100644 index 0000000..669a059 --- /dev/null +++ b/docs/docs/methods/auto-attendants/auto-attendant-submenu.md @@ -0,0 +1,44 @@ +--- +description: my_api.put.auto_attendant_submenu() +--- + +# πŸ“– PUT - Auto Attendant Submenu + +This method allows you to update the configuration of the submenus for your AAs. This method only allows you to update one submenu at a time but can be placed in a look to update all submenus you may have. + +### Parameters + +* auto\_attendant\_user\_id (str): Service user ID of your auto attendant. +* submenu\_id (str): Service user ID of your submenu. +* updates (dict): Updates your applying to your submenu. + +### Return + +* None: This method does not return any specific value. + +### How To Use: + +

+my_api= api.Api(base_url="https://base_url/api/vx", username="john.smith", password="ODIN_INSTANCE_1")
+my_api.authenticate()
+
+my_changes = {
+                "announcementSelection":"Personal",
+                "enableLevelExtensionDialing":False,
+                "keys":[
+                	{"key":"0","action":"Transfer To Operator","description":"Operator","phoneNumber":2025}
+                ]
+            }
+
+my_api.put.auto_attendant_submenu(
+    auto_attendant_user_ids= "test@domain.com",
+    submenu_id= "Test1"
+    updates= my_changes
+)
+
+ +#### Result: + +
+ + diff --git a/docs/docs/methods/auto-attendants/auto-attendant.md b/docs/docs/methods/auto-attendants/auto-attendant.md new file mode 100644 index 0000000..17bd243 --- /dev/null +++ b/docs/docs/methods/auto-attendants/auto-attendant.md @@ -0,0 +1,43 @@ +--- +description: my_api.put.auto_attendant() +--- + +# πŸ… PUT - Auto Attendant + +In this method, you can update your AAs + +### Parameters + +* auto\_attendant\_user\_ids (list): List of service user IDs (AA IDs), the status given will be applied to these. +* status (bool): Boolean value of True (Activate) or False (Deactivate) which will be applied to list of AAs. + +### Return + +* JSON Data: This method returns json representation of AA updated. + +### How To Use: + +The below code will set the AA to deactivated. + +{% code overflow="wrap" %} +```python +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() + +auto_attendants = [ + "basic_aa@domain.com" +] + +my_api.put.auto_attendants_status( + auto_attendant_user_ids= auto_attendants, + status= False +) +``` +{% endcode %} + +#### Result: + +

Basic AA updated to deactivated.

+ diff --git a/docs/docs/methods/call-centers/README.md b/docs/docs/methods/call-centers/README.md new file mode 100644 index 0000000..3bce56b --- /dev/null +++ b/docs/docs/methods/call-centers/README.md @@ -0,0 +1,3 @@ +# πŸ“ž Call Centers + +All things updating Call Centers. diff --git a/docs/docs/methods/call-centers/group-call-center-agents-levels.md b/docs/docs/methods/call-centers/group-call-center-agents-levels.md new file mode 100644 index 0000000..50a650e --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center-agents-levels.md @@ -0,0 +1,37 @@ +--- +description: my_api.group_call_center_agents_levels() +--- + +# 🎚️ PUT - Group Call Center Agents Levels + +Update a list of agents' skill levels in a single Call Center (CC). + +### Parameters + +* call\_center\_user\_id (str): Service user ID of the call center users belong to. +* agent\_user\_ids (list): List of the target users. skill\_level (int): +* Skill level that will be applied to the list of users in the target call center. + +### Returns + +* Dict: CC ID and list of the agent and their updated skill level. + +### How To Use: + +{% code overflow="wrap" %} +```python +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_call_center = "call_center_user_id@domain.com" +my_agents = ["userid_1@domain.com", "userid_2@domain.com", "userid_3@domain.com"] + +my_api.put.group_call_center_agents_levels( + call_center_user_id = my_call_center, + agent_user_ids = my_agents, + skill_level = 10 +) +``` +{% endcode %} diff --git a/docs/docs/methods/call-centers/group-call-center-agents.md b/docs/docs/methods/call-centers/group-call-center-agents.md new file mode 100644 index 0000000..50a7051 --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center-agents.md @@ -0,0 +1,35 @@ +--- +description: my_api.group_call_center_agents() +--- + +# 🎧 PUT - Group Call Center Agents + +This method allows you to add or remove agents in a Call Center (CC). + +Note: Leave the agent\_user\_ids blank to remove all users and to remove some only include the users you would like to include in this call center. + +### Parameters + +* call\_center\_user\_id (str): Service user ID of the target call center. +* agent\_user\_ids (list): List of user IDs to be added to call center. + +### Returns + +* Dict: Dictionary of the new state of the CC. + +### How To Use: + +```python +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_call_center = "call_center_user_id@domain.com" +my_agents = ["userid_1@domain.com", "userid_2@domain.com", "userid_3@domain.com"] + +my_api.put.group_call_center_agents( + call_center_user_id = my_call_center, + agent_user_ids = my_agents +) +``` diff --git a/docs/docs/methods/call-centers/group-call-center-bounced-call.md b/docs/docs/methods/call-centers/group-call-center-bounced-call.md new file mode 100644 index 0000000..2935f85 --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center-bounced-call.md @@ -0,0 +1,42 @@ +--- +description: my_api.group_call_center_bounced_calls() +--- + +# ⚽ PUT - Group Call Center Bounced Call + +Update the bounced call settings of a single Call Center (CC). + +### Parameters + +* call\_center\_user\_id (str): Service user ID of the target CC. +* updates (dict): Updates to apply to target CC. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_call_center = "call_center_user_id@domain.com" +my_updates= { + "isActive":true, + "numberOfRingsBeforeBouncingCall":5, + "enableTransfer":false, + "bounceCallWhenAgentUnavailable":true, + "alertCallCenterCallOnHold":true, + "alertCallCenterCallOnHoldSeconds":30, + "bounceCallCenterCallOnHold":false, + "bounceCallCenterCallOnHoldSeconds":60, +} + +my_api.put.group_call_center_bounced_calls( + call_center_user_id = my_call_center, + updates = my_updates +) +``` diff --git a/docs/docs/methods/call-centers/group-call-center-dnis-instance.md b/docs/docs/methods/call-centers/group-call-center-dnis-instance.md new file mode 100644 index 0000000..692237e --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center-dnis-instance.md @@ -0,0 +1,43 @@ +--- +description: my_api.group_call_center_dnis_instance() +--- + +# πŸ“ž PUT - Group Call Center DNIS Instance + +Update a DNIS instance of a single Call Center (CC). + +### Parameters + +* call\_center\_user\_id (str): Service user ID of the target CC. +* updates (dict): Updates to apply to target CC. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_call_center = "call_center_user_id@domain.com" +my_updates= { + "dnisPhoneNumber":9589582005, + "extension":2005, + "useCustomCLIDSettings":false, + "callingLineIdPhoneNumber":9589582005, + "useCustomDnisAnnouncementSettings":false, + "priority":"1 - High", + "allowOutgoingACDCall":false, + "name":"mock.dnis.2", + "newDNISName":"mock.dnis.2" +} + +my_api.put.group_call_center_dnis_instance( + call_center_user_id = my_call_center, + updates = my_updates +) +``` diff --git a/docs/docs/methods/call-centers/group-call-center-forced-forwarding.md b/docs/docs/methods/call-centers/group-call-center-forced-forwarding.md new file mode 100644 index 0000000..9805193 --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center-forced-forwarding.md @@ -0,0 +1,46 @@ +--- +description: my_api.group_call_center_forced_forwarding() +--- + +# ⏩ PUT - Group Call Center Forced Forwarding + +Update the forced forwarding settings of a single Call Center (CC). + +### Parameters + +* call\_center\_user\_id (str): Service user ID of the target CC. +* updates (dict): Updates to apply to target CC. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_call_center = "call_center_user_id@domain.com" +my_updates= { + "enabled":false, + "forwardToPhoneNumber":null, + "allowEnableViaFAC":true, + "playAnnouncementBeforeForwarding":false, + "audioMessageSource":"File", + "videoMessageSource":"Default", + "audioUrlList":[], + "videoUrlList":[], + "audioFileList":[ + {"name":"letsgo.wav","mediaType":"WAV","fileSize":88,"level":"User"} + ], + "videoFileList":[] +} + +my_api.put.group_call_center_forced_forwarding( + call_center_user_id = my_call_center, + updates = my_updates +) +``` diff --git a/docs/docs/methods/call-centers/group-call-center-overflow.md b/docs/docs/methods/call-centers/group-call-center-overflow.md new file mode 100644 index 0000000..cc559b4 --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center-overflow.md @@ -0,0 +1,45 @@ +--- +description: my_api.group_call_center_overflow() +--- + +# 🌊 PUT - Group Call Center Overflow + +Update the overflow settings of a single Call Center (CC). + +### Parameters + +* call\_center\_user\_id (str): Service user ID of the target CC. +* updates (dict): Updates to apply to target CC. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_call_center = "call_center_user_id@domain.com" +my_updates= { + "action":"Busy", + "transferPhoneNumber":null, + "overflowAfterTimeout":true, + "timeoutSeconds":30, + "playAnnouncementBeforeOverflowProcessing":true, + "audioMessageSource":"Default", + "videoMessageSource":"Default", + "audioUrlList":[], + "videoUrlList":[], + "audioFileList":[], + "videoFileList":[] +} + +my_api.put.group_call_center_forced_forwarding( + call_center_user_id = my_call_center, + updates = my_updates +) +``` diff --git a/docs/docs/methods/call-centers/group-call-center-status.md b/docs/docs/methods/call-centers/group-call-center-status.md new file mode 100644 index 0000000..c930066 --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center-status.md @@ -0,0 +1,43 @@ +--- +description: my_api.put.group_call_centers_status() +--- + +# 🟒 PUT - Group Call Center Status + +In this method, you can control the status of your Call Centers (CC) by activating and deactivating them. The method takes in two parameters, they are a list of the CC service user IDs and a status which is a boolean value of True (Active) or False (Deactivate). + +### Parameters + +* call\_center\_user\_ids(list): List of service user IDs (CC IDs), the status given will be applied to these. +* status (bool): The boolean value of True (Activate) or False (Deactivate) which will be applied to list of AAs. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +The below code will set the AA to deactivated. + +{% code overflow="wrap" %} +```python +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() + +call_centers = [ + "basic_cc@domain.com" +] + +my_api.put.group_call_centers_status( + call_center_user_ids = call_centers, + status= False +) +``` +{% endcode %} + +#### Result: + +
+ diff --git a/docs/docs/methods/call-centers/group-call-center-stranded-calls-unavailable.md b/docs/docs/methods/call-centers/group-call-center-stranded-calls-unavailable.md new file mode 100644 index 0000000..0b08563 --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center-stranded-calls-unavailable.md @@ -0,0 +1,45 @@ +--- +description: my_api.group_call_center_stranded_calls_unavailable() +--- + +# πŸ”΄ PUT - Group Call Center Stranded Calls Unavailable + +Update the stranded calls unavailable settings of a single Call Center (CC). + +### Parameters + +* call\_center\_user\_id (str): Service user ID of the target CC. +* updates (dict): Updates to apply to target CC. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_call_center = "call_center_user_id@domain.com" +my_updates= { + "conditionPolicyOnNumberOfAgentsWithSpecifiedUnavailableCode":false, + "numberOfAgentsWithSpecifiedUnavailableCode":null, + "agentsUnavailableCode":null, + "action":"None", + "transferPhoneNumber":null, + "audioMessageSource":"Default", + "videoMessageSource":"Default", + "audioUrlList":[], + "videoUrlList":[], + "audioFileList":[], + "videoFileList":[] +} + +my_api.put.group_call_center_forced_forwarding( + call_center_user_id = my_call_center, + updates = my_updates +) +``` diff --git a/docs/docs/methods/call-centers/group-call-center-stranded-calls.md b/docs/docs/methods/call-centers/group-call-center-stranded-calls.md new file mode 100644 index 0000000..01f37b0 --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center-stranded-calls.md @@ -0,0 +1,44 @@ +--- +description: my_api.group_call_center_stranded_calls() +--- + +# 🏝️ PUT - Group Call Center Stranded Calls + +Update the overflow settings of a single Call Center (CC). + +### Parameters + +* call\_center\_user\_id (str): Service user ID of the target CC. +* updates (dict): Updates to apply to target CC. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_call_center = "call_center_user_id@domain.com" +my_updates= { + "action":"None", + "transferPhoneNumber":null, + "audioMessageSource":"File", + "videoMessageSource":"Default", + "audioUrlList":[], + "videoUrlList":[], + "audioFileList":[ + {"name":"letsgo.wav","mediaType":"WAV","fileSize":88,"level":"User"} + ], + "videoFileList":[] +} + +my_api.put.group_call_center_forced_forwarding( + call_center_user_id = my_call_center, + updates = my_updates +) +``` diff --git a/docs/docs/methods/call-centers/group-call-center.md b/docs/docs/methods/call-centers/group-call-center.md new file mode 100644 index 0000000..3b9c043 --- /dev/null +++ b/docs/docs/methods/call-centers/group-call-center.md @@ -0,0 +1,43 @@ +--- +description: my_api.put.group_call_centers() +--- + +# 🎧 PUT - Group Call Center + +In this method, you can control the status of your Call Centers (CC) by activating and deactivating them. The method takes in two parameters, they are a list of the CC service user IDs and a status which is a boolean value of True (Active) or False (Deactivate). + +### Parameters + +* call\_center\_user\_ids(list): List of service user IDs (CC IDs), the status given will be applied to these. +* status (bool): Boolean value of True (Activate) or False (Deactivate) which will be applied to list of AAs. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +The below code will set the AA to deactivated. + +{% code overflow="wrap" %} +```python +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() + +call_centers = [ + "basic_cc@domain.com" +] + +my_api.put.group_call_centers_status( + call_center_user_id = call_centers, + status= False +) +``` +{% endcode %} + +#### Result: + +
+ diff --git a/docs/docs/methods/call-centers/user-call-center-agent-sign-out.md b/docs/docs/methods/call-centers/user-call-center-agent-sign-out.md new file mode 100644 index 0000000..d80bdca --- /dev/null +++ b/docs/docs/methods/call-centers/user-call-center-agent-sign-out.md @@ -0,0 +1,30 @@ +--- +description: my_api.user_call_center_agent_sign_out() +--- + +# πŸ›‘ PUT - User Call Center Agent Sign Out + +Sign the user out of their assigned Call Centers (CC). + +### Parameters + +* user\_id (str): User ID of the target user. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_agent_user_id = "user_id@domain.com" + +my_api.put.user_call_center_agent_sign_out( + user_id = my_agent_user_id +) +``` diff --git a/docs/docs/methods/call-centers/user-call-center-agents-update.md b/docs/docs/methods/call-centers/user-call-center-agents-update.md new file mode 100644 index 0000000..4260468 --- /dev/null +++ b/docs/docs/methods/call-centers/user-call-center-agents-update.md @@ -0,0 +1,33 @@ +--- +description: my_api.user_call_center_agents_update() +--- + +# πŸ™‹β€β™‚οΈ PUT - User Call Center Agents Update + +Update the Call Centers (CC) a user is assigned to. + +### Parameters + +* user\_id (str): User ID of the target user. +* call\_center\_service\_ids (list): List of CC service user IDs to update the user with. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_agent_user_id = "user_id@domain.com" +my_call_centers = ["userid_1@domain.com", "userid_2@domain.com", "userid_3@domain.com"] + +my_api.put.user_call_center_agents_update( + user_id = my_agent_user_id, + call_center_service_ids= my_call_centers +) +``` diff --git a/docs/docs/methods/call-centers/user-call-center-supervised-agents.md b/docs/docs/methods/call-centers/user-call-center-supervised-agents.md new file mode 100644 index 0000000..1be2215 --- /dev/null +++ b/docs/docs/methods/call-centers/user-call-center-supervised-agents.md @@ -0,0 +1,36 @@ +--- +description: my_api.user_call_center_supervised_agents() +--- + +# πŸ‘“ PUT - User Call Center Supervised Agents + +Update the list of agents a supervisor has in a single Call Center (CC). + +### Parameters + +* call\_center\_user\_id (str): Service user ID of the target CC. +* supervisor\_user\_id (str): User ID of the supervisor. +* supervisor\_ids (list): List of user IDs of agents to apply to supervisor. + +### Returns + +* Dict: Superivor ID and list of agents they supervise. + +### How To Use: + +```python +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_call_center = "call_center_user_id@domain.com" +my_supervsor_id = "supervisor_id@domain.com" +my_agents = ["userid_1@domain.com", "userid_2@domain.com", "userid_3@domain.com"] + +my_api.put.user_call_center_supervised_agents( + call_center_user_id = my_call_center, + supervsor_user_id = my_supervsor_id, + agent_ids = my_agents +) +``` diff --git a/docs/docs/methods/call-centers/user-call-center.md b/docs/docs/methods/call-centers/user-call-center.md new file mode 100644 index 0000000..d7210b0 --- /dev/null +++ b/docs/docs/methods/call-centers/user-call-center.md @@ -0,0 +1,56 @@ +--- +description: my_api.user_call_center() +--- + +# 🟒 PUT - User Call Center + +### Parameters + +* user\_id (str): User ID of the target user. +* updates (dict): Updates to be applied to the user. + +### Returns + +* Dict: Agents' ACD status and status in each CC they are assigned to. + +### How To Use: + +```python +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_user_id = "user_id@domain.com" +my_updates = { + "agentACDState":"Available", + "agentThresholdProfileName":"Default Agent Threshold Profile", + "useDefaultGuardTimer":true, + "enableGuardTimer":false, + "guardTimerSeconds":5, + "useSystemDefaultUnavailableSettings":true, + "forceAgentUnavailableOnDNDActivation":false, + "forceAgentUnavailableOnPersonalCalls":false, + "forceAgentUnavailableOnBouncedCallLimit":false, + "numberConsecutiveBouncedCallsToForceAgentUnavailable":3, + "forceAgentUnavailableOnNotReachable":false, + "makeOutgoingCallsAsCallCenter":false, + "callCenters":[ + { + "serviceUserId":"mock.cc.1", + "available":true, + "skillLevel":null + }, + { + "serviceUserId":"mock.cc.2", + "available":true, + "skillLevel":10 + } + ] +} + +my_api.put.user_call_center( + user_id = my_user_id, + updates= my_updates +) +``` diff --git a/docs/docs/methods/devices/README.md b/docs/docs/methods/devices/README.md new file mode 100644 index 0000000..280646b --- /dev/null +++ b/docs/docs/methods/devices/README.md @@ -0,0 +1,3 @@ +# ☎️ Devices + +All things updating Devices. diff --git a/docs/docs/methods/devices/group-device-file.md b/docs/docs/methods/devices/group-device-file.md new file mode 100644 index 0000000..a571aaf --- /dev/null +++ b/docs/docs/methods/devices/group-device-file.md @@ -0,0 +1,33 @@ +# πŸ—ƒοΈ PUT - Group Device File + +Update a config file for a single device at the Group level. + +### Parameters + +* device\_name (str): Device name of the target device. +* updates (dict): Updates to apply to the target device. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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() + +updates = { + "fileSource": "Custom", + "fileFormat": "%BWMACADDRESS%.cfg", + "fileContent": "PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJ5ZXMiPz4KPCEtLSBEZWZhdWx0IE1hc3RlciBTSVAgQ29uZmlndXJhdGlvbiBGaWxlLS0+CjwhLS0gRm9yIGluZm9ybWF0aW9uIG9uIGNvbmZpZ3VyaW5nIFBvbHljb20gVm9JUCBwaG9uZXMgcGxlYXNlIHJlZmVyIHRvIHRoZSAtLT4KPCEtLSBDb25maWd1cmF0aW9uIEZpbGUgTWFuYWdlbWVudCB3aGl0ZSBwYXBlciBhdmFpbGFibGUgZnJvbTogLS0+CjwhLS0gaHR0cDovL3d3dy5wb2x5Y29tLmNvbS9jb21tb24vZG9jdW1lbnRzL3doaXRlcGFwZXJzL2NvbmZpZ3VyYXRpb25fZmlsZV9tYW5hZ2VtZW50X29uX3NvdW5kcG9pbnRfaXBfcGhvbmVzLnBkZiAtLT4KPCEtLSAkUkNTZmlsZTogMDAwMDAwMDAwMDAwLmNmZyx2ICQgICRSZXZpc2lvbjogMS4yMy44LjMgJCAtLT4KPEFQUExJQ0FUSU9OIEFQUF9GSUxFX1BBVEg9ImZ0cDovLzE2Mi4yNTAuMjQwLjEzMS9maXJtd2FyZS8lZmlybXdhcmUlL3NpcC5sZCIgQ09ORklHX0ZJTEVTPSJ1c2VyJUJXTUFDQUREUkVTUyUuY2ZnLGZlYXR1cmVzJUJXTUFDQUREUkVTUyUuY2ZnLHN5c3RlbSVCV01BQ0FERFJFU1MlLmNmZywlQldNQUNBRERSRVNTJV9kZWN0LmNmZyIgTUlTQ19GSUxFUz0iIiBMT0dfRklMRV9ESVJFQ1RPUlk9IiIgT1ZFUlJJREVTX0RJUkVDVE9SWT0iIiBDT05UQUNUU19ESVJFQ1RPUlk9IiIgTElDRU5TRV9ESVJFQ1RPUlk9IiI+CjwvQVBQTElDQVRJT04+Cg==" +} + + +my_api.put.service_provider_device_file( + "device_name", + updates=updates +) +``` diff --git a/docs/docs/methods/devices/group-device-tag.md b/docs/docs/methods/devices/group-device-tag.md new file mode 100644 index 0000000..412b7c3 --- /dev/null +++ b/docs/docs/methods/devices/group-device-tag.md @@ -0,0 +1,32 @@ +# 🎐 PUT - Group Device Tag + +Update a single tag assigned to a device at the group level. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where Group is located. +* group\_id (str): Group ID where target device is located. +* device\_name (str): Device name of the target device. +* tag\_name (str): Name of the tag to add or update. +* tag\_value (str): Value of tag to add or update. + +### Returns + +* Dict: Python dictionary of the new state after updates have been applied. + +### How To Use: + +```python +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.put.group_device_tag( + "servivce_provider_id", + "group_id" + "device_name", + tag_name= "tagName", + tag_value= "tagValue" +) +``` diff --git a/docs/docs/methods/devices/group-device-tags-profile.md b/docs/docs/methods/devices/group-device-tags-profile.md new file mode 100644 index 0000000..4b85d52 --- /dev/null +++ b/docs/docs/methods/devices/group-device-tags-profile.md @@ -0,0 +1,51 @@ +# 🏷️ PUT - Group Device Tags Profile + +Update a config file for a single device at the Group level. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where Group is located. +* group\_id (str): Group ID where target device is located. +* device\_name (str): Device name of the target device. +* tags (dict): List of dictionaries tag name and value entries. + +### Returns + +* Dict: Python dictionary of the new state after updates have been applied. + +### How To Use: + +```python +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() + +tags = [ + { + "tagName": "%LK-SDial-Lbl4%", + "tagValue": "label4", + }, + { + "tagName": "%LK-SDial-Str4%", + "tagValue": "string4", + }, + { + "tagName": "%test%", + "tagValue": "testing", + "actualTagValue": "testing" + }, + { + "tagName": "%testing%", + "tagValue": "testing2", + } +] + + +my_api.put.group_device_tags_profile( + "servivce_provider_id", + "group_id" + "device_name", + tags=tags +) +``` diff --git a/docs/docs/methods/devices/group-device-type-file.md b/docs/docs/methods/devices/group-device-type-file.md new file mode 100644 index 0000000..0ad4af7 --- /dev/null +++ b/docs/docs/methods/devices/group-device-type-file.md @@ -0,0 +1,38 @@ +# πŸ“‚ PUT - Group Device Type File + +Set config file for all devices of a spceific type at the group level. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where Group is located. +* group\_id (str): Group ID where target device is located. +* device\_type (str): The device type you would like to apply the changes to. +* updates (dict): Cupdates (dict): Updates to apply to the target device. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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() + +updates = { + "fileSource": "Custom", + "fileFormat": "user%BWMACADDRESS%.cfg", + "deviceType": "Polycom IP5000", + "fileContent": "PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJ5ZXMiPz4NCjwhLS0gRGVmYXVsdCBNYXN0ZXIgU0lQIENvbmZpZ3VyYXRpb24gRmlsZS0tPg0KPCEtLSBGb3IgaW5mb3JtYXRpb24gb24gY29uZmlndXJpbmcgUG9seWNvbSBWb0lQIHBob25lcyBwbGVhc2UgcmVmZXIgdG8gdGhlIC0tPg0KPCEtLSBDb25maWd1cmF0aW9uIEZpbGUgTWFuYWdlbWVudCB3aGl0ZSBwYXBlciBhdmFpbGFibGUgZnJvbTogLS0+DQo8IS0tIGh0dHA6Ly93d3cucG9seWNvbS5jb20vY29tbW9uL2RvY3VtZW50cy93aGl0ZXBhcGVycy9jb25maWd1cmF0aW9uX2ZpbGVfbWFuYWdlbWVudF9vbl9zb3VuZHBvaW50X2lwX3Bob25lcy5wZGYgLS0+DQo8IS0tICRSQ1NmaWxlOiAwMDAwMDAwMDAwMDAuY2ZnLHYgJCAgJFJldmlzaW9uOiAxLjIzLjguMyAkIC0tPg0KPEFQUExJQ0FUSU9OIEFQUF9GSUxFX1BBVEg9IiVBUFBfVkVSU0lPTiUuc2lwLmxkIiBDT05GSUdfRklMRVM9InBob25lJUJXREVWSUNFSUQlLmNmZyxzeXMuY2ZnIiBNSVNDX0ZJTEVTPSIiIExPR19GSUxFX0RJUkVDVE9SWT0iIiBPVkVSUklERVNfRElSRUNUT1JZPSIiIENPTlRBQ1RTX0RJUkVDVE9SWT0iIiBMSUNFTlNFX0RJUkVDVE9SWT0iIj4NCg0KICAgPEFQUExJQ0FUSU9OX1ZWWDMwMCBBUFBfRklMRV9QQVRIX1ZWWDMwMD0iJUFQUF9WRVJTSU9OX1ZWWC0zMDAtNDAwJS5zaXAubGQiIENPTkZJR19GSUxFU19WVlgzMDA9InBob25lJUJXREVWSUNFSUQlLmNmZyxzeXMuY2ZnIi8+DQogICA8QVBQTElDQVRJT05fVlZYNDAwIEFQUF9GSUxFX1BBVEhfVlZYNDAwPSIlQVBQX1ZFUlNJT05fVlZYLTMwMC00MDAlLnNpcC5sZCIgQ09ORklHX0ZJTEVTX1ZWWDQwMD0icGhvbmUlQldERVZJQ0VJRCUuY2ZnLHN5cy5jZmciLz4NCiAgIDxBUFBMSUNBVElPTl9WVlg1MDAgQVBQX0ZJTEVfUEFUSF9WVlg1MDA9IiVBUFBfVkVSU0lPTl9WVlgtNTAwLTYwMCUuc2lwLmxkIiBDT05GSUdfRklMRVNfVlZYNTAwPSJwaG9uZSVCV0RFVklDRUlEJS5jZmcsc3lzLmNmZyIvPg0KICAgPEFQUExJQ0FUSU9OX1ZWWDYwMCBBUFBfRklMRV9QQVRIX1ZWWDYwMD0iJUFQUF9WRVJTSU9OX1ZWWC01MDAtNjAwJS5zaXAubGQiIENPTkZJR19GSUxFU19WVlg2MDA9InBob25lJUJXREVWSUNFSUQlLmNmZyxzeXMuY2ZnIi8+DQo8L0FQUExJQ0FUSU9OPg==" +} + + +my_api.put.group_device_type_file( + "service Provider ID", + "group Id", + "Device Type", + updates= updates +) +``` diff --git a/docs/docs/methods/devices/group-device-type-tag.md b/docs/docs/methods/devices/group-device-type-tag.md new file mode 100644 index 0000000..1593ec5 --- /dev/null +++ b/docs/docs/methods/devices/group-device-type-tag.md @@ -0,0 +1,32 @@ +# 🎐 PUT - Group Device Type Tag + +Update tags applied to device types at the Group level. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where Group is located. +* group\_id (str): Group ID where target device is located. +* device\_type (str): The target device type to apply the updates. +* tag\_name (str): Name of the tag to add or update. +* tag\_value (str): Value of tag to add or update. + +### Returns + +* Dict: Python dictionary of the new state after updates have been applied. + +### How To Use: + +```python +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.put.group_device_type_tag( + "servivce_provider_id", + "group_id" + "device_type", + tag_name= "tagName", + tag_value= "tagValue" +) +``` diff --git a/docs/docs/methods/devices/group-devices.md b/docs/docs/methods/devices/group-devices.md new file mode 100644 index 0000000..9e68543 --- /dev/null +++ b/docs/docs/methods/devices/group-devices.md @@ -0,0 +1,64 @@ +--- +description: my_api.group_devices() +--- + +# πŸ“± PUT - Group Devices + +Update a single device in a group. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where Group is located. +* group\_id (str): Group ID where target device is located. +* device\_name (str): Device name of target device. +* updates (dict): Updates to apply to target device. + +### Returns + +* Dict: Python dictionary of the new state after updates have been applied. + +### How To Use: + +```python +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() + +updates = { + "deviceType": "Polycom Soundpoint IP 4000", + "protocol": "SIP 2.0", + "netAddress": "111.111.111.111", + "port": 2222, + "outboundProxyServerNetAddress": "222.222.222.222", + "stunServerNetAddress": "333.333.333.333", + "macAddress": "CBFB0EBBF325", + "serialNumber": 123456789, + "description": "description", + "numberOfPorts": { + "quantity": "1" + }, + "numberOfAssignedPorts": 0, + "status": "Online", + "configurationMode": "Default", + "physicalLocation": "usa", + "transportProtocol": "UDP", + "useCustomUserNamePassword": True, + "deviceName": "my-new-device-name", + "deviceLevel": "Group", + "accessDeviceCredentials": { + "userName": 9871515000 + }, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "tags": [], + "relatedServices": [] +} + +my_api.put.group_devices( + "service_provider_id", + "group_id", + "device_name", + updates=updates +) +``` diff --git a/docs/docs/methods/devices/service-provider-device-file.md b/docs/docs/methods/devices/service-provider-device-file.md new file mode 100644 index 0000000..8a1d099 --- /dev/null +++ b/docs/docs/methods/devices/service-provider-device-file.md @@ -0,0 +1,33 @@ +# πŸ“‚ PUT - Service Provider Device File + +Update a config file for a single device at the Service Provider or Enterprise level. + +### Parameters + +* device\_name (str): Device name of the target device. +* updates (dict): Updates to apply to the target device. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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() + +updates = { + "fileSource": "Custom", + "fileFormat": "%BWMACADDRESS%.cfg", + "fileContent": "PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJ5ZXMiPz4KPCEtLSBEZWZhdWx0IE1hc3RlciBTSVAgQ29uZmlndXJhdGlvbiBGaWxlLS0+CjwhLS0gRm9yIGluZm9ybWF0aW9uIG9uIGNvbmZpZ3VyaW5nIFBvbHljb20gVm9JUCBwaG9uZXMgcGxlYXNlIHJlZmVyIHRvIHRoZSAtLT4KPCEtLSBDb25maWd1cmF0aW9uIEZpbGUgTWFuYWdlbWVudCB3aGl0ZSBwYXBlciBhdmFpbGFibGUgZnJvbTogLS0+CjwhLS0gaHR0cDovL3d3dy5wb2x5Y29tLmNvbS9jb21tb24vZG9jdW1lbnRzL3doaXRlcGFwZXJzL2NvbmZpZ3VyYXRpb25fZmlsZV9tYW5hZ2VtZW50X29uX3NvdW5kcG9pbnRfaXBfcGhvbmVzLnBkZiAtLT4KPCEtLSAkUkNTZmlsZTogMDAwMDAwMDAwMDAwLmNmZyx2ICQgICRSZXZpc2lvbjogMS4yMy44LjMgJCAtLT4KPEFQUExJQ0FUSU9OIEFQUF9GSUxFX1BBVEg9ImZ0cDovLzE2Mi4yNTAuMjQwLjEzMS9maXJtd2FyZS8lZmlybXdhcmUlL3NpcC5sZCIgQ09ORklHX0ZJTEVTPSJ1c2VyJUJXTUFDQUREUkVTUyUuY2ZnLGZlYXR1cmVzJUJXTUFDQUREUkVTUyUuY2ZnLHN5c3RlbSVCV01BQ0FERFJFU1MlLmNmZywlQldNQUNBRERSRVNTJV9kZWN0LmNmZyIgTUlTQ19GSUxFUz0iIiBMT0dfRklMRV9ESVJFQ1RPUlk9IiIgT1ZFUlJJREVTX0RJUkVDVE9SWT0iIiBDT05UQUNUU19ESVJFQ1RPUlk9IiIgTElDRU5TRV9ESVJFQ1RPUlk9IiI+CjwvQVBQTElDQVRJT04+Cg==" +} + + +my_api.put.service_provider_device_file( + "device_name", + updates=updates +) +``` diff --git a/docs/docs/methods/devices/service-provider-device-tag.md b/docs/docs/methods/devices/service-provider-device-tag.md new file mode 100644 index 0000000..89ba87f --- /dev/null +++ b/docs/docs/methods/devices/service-provider-device-tag.md @@ -0,0 +1,31 @@ +# πŸ›°οΈ PUT - Service Provider Device Tag + +Update a single tag assigned to a device at the Service Provider or Enterprise level. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where Group is located. +* device\_name (str): Device name of the target device. +* tag\_name (str): Name of the tag to add or update. +* tag\_value (str): Value of tag to add or update. + +### Returns + +* Dict: Python dictionary of the new state after updates have been applied. + +### How To Use: + +```python +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.put.service_provider_device_tag( + "servivce_provider_id", + "group_id" + "device_name", + tag_name= "tagName", + tag_value= "tagValue" +) +``` diff --git a/docs/docs/methods/devices/service-provider-device-type-tag.md b/docs/docs/methods/devices/service-provider-device-type-tag.md new file mode 100644 index 0000000..eea75f8 --- /dev/null +++ b/docs/docs/methods/devices/service-provider-device-type-tag.md @@ -0,0 +1,31 @@ +# 🎐 PUT - Service Provider Device Type Tag + +Update tags applied to device types at the Service Provider or Enterprise level. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where Group is located. +* device\_type (str): The target device type to apply the updates. +* tag\_name (str): Name of the tag to add or update. +* tag\_value (str): Value of tag to add or update. + +### Returns + +* Dict: Python dictionary of the new state after updates have been applied. + +### How To Use: + +```python +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.put.group_device_type_tag( + "servivce_provider_id", + "group_id" + "device_type", + tag_name= "tagName", + tag_value= "tagValue" +) +``` diff --git a/docs/docs/methods/devices/service-provider-device.md b/docs/docs/methods/devices/service-provider-device.md new file mode 100644 index 0000000..03edec5 --- /dev/null +++ b/docs/docs/methods/devices/service-provider-device.md @@ -0,0 +1,47 @@ +# πŸ“ž PUT - Service Provider Device + +Update a single device in a Service Provider or Enterprise. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where device is located. +* device\_name (str): Device name of the target device. +* updates (dict): Updates to apply to the target device. + +### Returns + +* Dict: Python dictionary of the new state after updates have been applied. + +### How To Use: + +```python +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() + +updates = { + "deviceType": "Polycom Soundpoint IP 500", + "protocol": "SIP 2.0", + "numberOfPorts": { + "quantity": "3" + }, + "numberOfAssignedPorts": 0, + "status": "Online", + "transportProtocol": "UDP", + "useCustomUserNamePassword": True, + "deviceLevel": "Service Provider", + "accessDeviceCredentials": { + "userName": None + }, + "tags": [], + "relatedServices": [] +} + + +my_api.put.service_provider_device( + "service_provider_id", + "group_id", + updates=updates +) +``` diff --git a/docs/docs/methods/devices/system-device-file.md b/docs/docs/methods/devices/system-device-file.md new file mode 100644 index 0000000..a727b48 --- /dev/null +++ b/docs/docs/methods/devices/system-device-file.md @@ -0,0 +1,33 @@ +# πŸ“ PUT - System Device File + +Update a config file for a single device at the system level. + +### Parameters + +* device\_name (str): Device name of the target device. +* updates (dict): Updates to apply to the target device. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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() + +updates = { + "fileSource": "Custom", + "fileFormat": "%BWMACADDRESS%.cfg", + "fileContent": "PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJ5ZXMiPz4KPCEtLSBEZWZhdWx0IE1hc3RlciBTSVAgQ29uZmlndXJhdGlvbiBGaWxlLS0+CjwhLS0gRm9yIGluZm9ybWF0aW9uIG9uIGNvbmZpZ3VyaW5nIFBvbHljb20gVm9JUCBwaG9uZXMgcGxlYXNlIHJlZmVyIHRvIHRoZSAtLT4KPCEtLSBDb25maWd1cmF0aW9uIEZpbGUgTWFuYWdlbWVudCB3aGl0ZSBwYXBlciBhdmFpbGFibGUgZnJvbTogLS0+CjwhLS0gaHR0cDovL3d3dy5wb2x5Y29tLmNvbS9jb21tb24vZG9jdW1lbnRzL3doaXRlcGFwZXJzL2NvbmZpZ3VyYXRpb25fZmlsZV9tYW5hZ2VtZW50X29uX3NvdW5kcG9pbnRfaXBfcGhvbmVzLnBkZiAtLT4KPCEtLSAkUkNTZmlsZTogMDAwMDAwMDAwMDAwLmNmZyx2ICQgICRSZXZpc2lvbjogMS4yMy44LjMgJCAtLT4KPEFQUExJQ0FUSU9OIEFQUF9GSUxFX1BBVEg9ImZ0cDovLzE2Mi4yNTAuMjQwLjEzMS9maXJtd2FyZS8lZmlybXdhcmUlL3NpcC5sZCIgQ09ORklHX0ZJTEVTPSJ1c2VyJUJXTUFDQUREUkVTUyUuY2ZnLGZlYXR1cmVzJUJXTUFDQUREUkVTUyUuY2ZnLHN5c3RlbSVCV01BQ0FERFJFU1MlLmNmZywlQldNQUNBRERSRVNTJV9kZWN0LmNmZyIgTUlTQ19GSUxFUz0iIiBMT0dfRklMRV9ESVJFQ1RPUlk9IiIgT1ZFUlJJREVTX0RJUkVDVE9SWT0iIiBDT05UQUNUU19ESVJFQ1RPUlk9IiIgTElDRU5TRV9ESVJFQ1RPUlk9IiI+CjwvQVBQTElDQVRJT04+Cg==" +} + + +my_api.put.system_device_file( + "device_name", + updates=updates +) +``` diff --git a/docs/docs/methods/devices/system-device-tag.md b/docs/docs/methods/devices/system-device-tag.md new file mode 100644 index 0000000..11be128 --- /dev/null +++ b/docs/docs/methods/devices/system-device-tag.md @@ -0,0 +1,31 @@ +# πŸ’Ύ PUT - System Device Tag + +Update a single tag assigned to a device at the System level. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where Group is located. +* device\_name (str): Device name of the target device. +* tag\_name (str): Name of the tag to add or update. +* tag\_value (str): Value of tag to add or update. + +### Returns + +* Dict: Python dictionary of the new state after updates have been applied. + +### How To Use: + +```python +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.put.system_device_tag( + "servivce_provider_id", + "group_id" + "device_name", + tag_name= "tagName", + tag_value= "tagValue" +) +``` diff --git a/docs/docs/methods/devices/system-devices.md b/docs/docs/methods/devices/system-devices.md new file mode 100644 index 0000000..704a788 --- /dev/null +++ b/docs/docs/methods/devices/system-devices.md @@ -0,0 +1,36 @@ +# πŸ’» PUT - System Devices + +Update a single device in the Broadworks system. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where device is located. +* device\_name (str): Device name of the target device. +* updates (dict): Updates to apply to the target device. + +### Returns + +* Dict: Python dictionary of the new state after updates have been applied. + +### How To Use: + +```python +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() + +updates = { + "deviceType":"Polycom_VVX400", + "protocol":"SIP 2.0", + "transportProtocol":"UDP", + "useCustomUserNamePassword":False, + "deviceLevel":"System" +} + + +my_api.put.system_devices( + "device_name", + updates=updates +) +``` diff --git a/docs/docs/methods/dns/README.md b/docs/docs/methods/dns/README.md new file mode 100644 index 0000000..e4ed8b3 --- /dev/null +++ b/docs/docs/methods/dns/README.md @@ -0,0 +1,3 @@ +# πŸ”’ DNs + +All things numbers. diff --git a/docs/docs/methods/dns/group-dn-details.md b/docs/docs/methods/dns/group-dn-details.md new file mode 100644 index 0000000..65747b6 --- /dev/null +++ b/docs/docs/methods/dns/group-dn-details.md @@ -0,0 +1,538 @@ +--- +description: my_api.get.group_dn_details() +--- + +# 3️⃣ GET - Group DN Details + +Gets all numbers assigned to Group in detail. This will show where the number is assigned in a group such as which user or hunt group. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where group is hosted. +* group\_id (str): Group ID of target group where numbers are located. + +### Returns + +* List: List of numbers matching search criteria + +### How To Use: + +{% code overflow="wrap" %} +```python +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.group_dn_details( + "serviceProviderId", + "groupID", +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +``` +{ + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "dns": [ + { + "phoneNumbers": "+1-2345678900", + "department": null, + "activated": false, + "userId": null, + "lastName": "Group Calling Line ID", + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-2345678900", + "max": "" + }, + { + "phoneNumbers": "+1-2345678900", + "department": null, + "activated": false, + "userId": "group.paging2@parkbenchsolutions.com", + "lastName": "group.paging2", + "firstName": "Group Paging", + "extension": 78900, + "emailAddress": null, + "userType": "Group Paging", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-2345678900", + "max": "" + }, + { + "phoneNumbers": "+1-2345678905", + "department": null, + "activated": true, + "userId": "huntgroup1@parkbenchsolutions.com", + "lastName": "huntgroup1", + "firstName": "Hunt Group", + "extension": null, + "emailAddress": null, + "userType": "Hunt Group", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-2345678905", + "max": "" + }, + { + "phoneNumbers": "+1-2345678908", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-2345678908", + "max": "" + }, + { + "phoneNumbers": "+1-5132224003", + "department": null, + "activated": false, + "userId": "aavis1@parkbenchsolutions.com", + "lastName": "aavis1", + "firstName": "Auto Attendant", + "extension": 24003, + "emailAddress": null, + "userType": "Auto Attendant", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-5132224003", + "max": "" + }, + { + "phoneNumbers": "+1-5134004000 - +1-5134004002", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-5134004000", + "max": "+1-5134004002" + }, + { + "phoneNumbers": "+1-5134004003", + "department": null, + "activated": true, + "userId": "6106424235X4020@parkbenchsolutions.com", + "lastName": 4003, + "firstName": 4003, + "extension": "04003", + "emailAddress": "developer@parkbenchsolutions.com", + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-5134004003", + "max": "" + }, + { + "phoneNumbers": "+1-5135564000", + "department": null, + "activated": true, + "userId": "5135564000@parkbenchsolutions.com", + "lastName": "Demo user", + "firstName": "Marc", + "extension": 64000, + "emailAddress": null, + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-5135564000", + "max": "" + }, + { + "phoneNumbers": "+1-5135564001 - +1-5135564004", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-5135564001", + "max": "+1-5135564004" + }, + { + "phoneNumbers": "+1-5135779000 - +1-5135779005", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-5135779000", + "max": "+1-5135779005" + }, + { + "phoneNumbers": "+1-7275551000", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-7275551000", + "max": "" + }, + { + "phoneNumbers": "+1-8001236780 - +1-8001236782", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8001236780", + "max": "+1-8001236782" + }, + { + "phoneNumbers": "+1-8135551001", + "department": null, + "activated": true, + "userId": "flexible1@parkbenchsolutions.com", + "lastName": "flexible1", + "firstName": "Flexible Seating Host", + "extension": 51001, + "emailAddress": null, + "userType": "Flexible Seating Host", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8135551001", + "max": "" + }, + { + "phoneNumbers": "+1-8135551002", + "department": null, + "activated": true, + "userId": "4001@parkbenchsolutions.com", + "lastName": 4001, + "firstName": 4001, + "extension": 51401, + "emailAddress": "developer@parkbenchsolutions.com", + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8135551002", + "max": "" + }, + { + "phoneNumbers": "+1-8135551004", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8135551004", + "max": "" + }, + { + "phoneNumbers": "+1-8135551005", + "department": null, + "activated": true, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8135551005", + "max": "" + }, + { + "phoneNumbers": "+1-8135551006 - +1-8135551008", + "department": null, + "activated": true, + "userId": "huntgroup1@parkbenchsolutions.com", + "lastName": "huntgroup1", + "firstName": "Hunt Group", + "extension": null, + "emailAddress": null, + "userType": "Hunt Group", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8135551006", + "max": "+1-8135551008" + }, + { + "phoneNumbers": "+1-8135551009", + "department": null, + "activated": true, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8135551009", + "max": "" + }, + { + "phoneNumbers": "+1-8595551001", + "department": null, + "activated": true, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551001", + "max": "" + }, + { + "phoneNumbers": "+1-8595551020", + "department": null, + "activated": true, + "userId": "aatest1@parkbenchsolutions.com", + "lastName": "aatest11", + "firstName": "Auto Attendant", + "extension": 51020, + "emailAddress": null, + "userType": "Auto Attendant", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551020", + "max": "" + }, + { + "phoneNumbers": "+1-8595551021 - +1-8595551022", + "department": null, + "activated": true, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551021", + "max": "+1-8595551022" + }, + { + "phoneNumbers": "+1-8595551023", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551023", + "max": "" + }, + { + "phoneNumbers": "+1-8595551024", + "department": null, + "activated": true, + "userId": "group.paging1@parkbenchsolutions.com", + "lastName": "group.paging1", + "firstName": "Group Paging", + "extension": 51024, + "emailAddress": null, + "userType": "Group Paging", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551024", + "max": "" + }, + { + "phoneNumbers": "+1-8595551025 - +1-8595551029", + "department": null, + "activated": true, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551025", + "max": "+1-8595551029" + }, + { + "phoneNumbers": "+1-8595551031 - +1-8595551102", + "department": null, + "activated": true, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551031", + "max": "+1-8595551102" + }, + { + "phoneNumbers": "+1-8595551104 - +1-8595551202", + "department": null, + "activated": true, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551104", + "max": "+1-8595551202" + }, + { + "phoneNumbers": "+1-8595551204 - +1-8595551400", + "department": null, + "activated": true, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551204", + "max": "+1-8595551400" + }, + { + "phoneNumbers": "+1-8595551401", + "department": null, + "activated": true, + "userId": "4001@parkbenchsolutions.com", + "lastName": 4001, + "firstName": 4001, + "extension": 51401, + "emailAddress": "developer@parkbenchsolutions.com", + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551401", + "max": "" + }, + { + "phoneNumbers": "+1-8595551402", + "department": null, + "activated": true, + "userId": "flexible2@parkbenchsolutions.com", + "lastName": "flexible2", + "firstName": "Flexible Seating Host", + "extension": 51402, + "emailAddress": null, + "userType": "Flexible Seating Host", + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551402", + "max": "" + }, + { + "phoneNumbers": "+1-8595551403", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551403", + "max": "" + }, + { + "phoneNumbers": "+1-8595551404 - +1-8595552001", + "department": null, + "activated": true, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-8595551404", + "max": "+1-8595552001" + }, + { + "phoneNumbers": "+1-9709010012 - +1-9709010014", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-9709010012", + "max": "+1-9709010014" + }, + { + "phoneNumbers": "+1-9709580011", + "department": null, + "activated": false, + "userId": null, + "lastName": null, + "firstName": null, + "extension": null, + "emailAddress": null, + "userType": null, + "countryCode": 1, + "nationalPrefix": null, + "min": "+1-9709580011", + "max": "" + } + ] +} +``` diff --git a/docs/docs/methods/dns/group-dn-search.md b/docs/docs/methods/dns/group-dn-search.md new file mode 100644 index 0000000..060b468 --- /dev/null +++ b/docs/docs/methods/dns/group-dn-search.md @@ -0,0 +1,308 @@ +--- +description: my_api.get.group_dns_search() +--- + +# 2️⃣ GET - Group DN Search + +Searches for numbers assigned to group and allows search criteria and limiting result. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where group is hosted. +* group\_id (str): Group ID of target group where numbers are located. +* dn (int): Number/ part of number to search for. +* filter\_type (str, optional): Options: equal to, starts with, or contains. Defaults to None. limit (int, optional): Limits the amount of values API returns. Defaults to None. + +### Returns + +* List: List of numbers matching search criteria + +### How To Use: + +{% code overflow="wrap" %} +```python +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.group_dns_search( + "serviceProviderId", + "groupID", + dn= "01942", + filter_type= "contains", + limit= 10 +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +``` +[ + { + "phoneNumbers": "+1-2345678900", + "department": null, + "activated": false, + "userId": "group.paging2@parkbenchsolutions.com", + "lastName": "group.paging2", + "firstName": "Group Paging", + "extension": "78900", + "emailAddress": null, + "userType": "Group Paging", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "group.paging2@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-2345678900", + "max": "", + "activated": false + } + }, + { + "phoneNumbers": "+1-2345678905", + "department": null, + "activated": true, + "userId": "huntgroup1@parkbenchsolutions.com", + "lastName": "huntgroup1", + "firstName": "Hunt Group", + "extension": "", + "emailAddress": null, + "userType": "Hunt Group", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "huntgroup1@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-2345678905", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-5132224003", + "department": null, + "activated": false, + "userId": "aavis1@parkbenchsolutions.com", + "lastName": "aavis1", + "firstName": "Auto Attendant", + "extension": "24003", + "emailAddress": null, + "userType": "Auto Attendant", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "aavis1@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-5132224003", + "max": "", + "activated": false + } + }, + { + "phoneNumbers": "+1-5134004003", + "department": null, + "activated": true, + "userId": "6106424235X4020@parkbenchsolutions.com", + "lastName": 4003, + "firstName": 4003, + "extension": "04003", + "emailAddress": "developer@parkbenchsolutions.com", + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "6106424235X4020@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-5134004003", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-5135564000", + "department": null, + "activated": true, + "userId": "5135564000@parkbenchsolutions.com", + "lastName": "Demo user", + "firstName": "Marc", + "extension": "64000", + "emailAddress": null, + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "5135564000@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-5135564000", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-8135551001", + "department": null, + "activated": true, + "userId": "flexible1@parkbenchsolutions.com", + "lastName": "flexible1", + "firstName": "Flexible Seating Host", + "extension": "51001", + "emailAddress": null, + "userType": "Flexible Seating Host", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "flexible1@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-8135551001", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-8135551002", + "department": null, + "activated": true, + "userId": "4001@parkbenchsolutions.com", + "lastName": 4001, + "firstName": 4001, + "extension": "51401", + "emailAddress": "developer@parkbenchsolutions.com", + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "4001@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-8135551002", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-8135551006 - +1-8135551008", + "department": null, + "activated": true, + "userId": "huntgroup1@parkbenchsolutions.com", + "lastName": "huntgroup1", + "firstName": "Hunt Group", + "extension": "", + "emailAddress": null, + "userType": "Hunt Group", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "huntgroup1@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-8135551006", + "max": "+1-8135551008", + "activated": true + } + }, + { + "phoneNumbers": "+1-8595551020", + "department": null, + "activated": true, + "userId": "aatest1@parkbenchsolutions.com", + "lastName": "aatest11", + "firstName": "Auto Attendant", + "extension": "51020", + "emailAddress": null, + "userType": "Auto Attendant", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "aatest1@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-8595551020", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-8595551024", + "department": null, + "activated": true, + "userId": "group.paging1@parkbenchsolutions.com", + "lastName": "group.paging1", + "firstName": "Group Paging", + "extension": "51024", + "emailAddress": null, + "userType": "Group Paging", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "group.paging1@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-8595551024", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-8595551401", + "department": null, + "activated": true, + "userId": "4001@parkbenchsolutions.com", + "lastName": 4001, + "firstName": 4001, + "extension": "51401", + "emailAddress": "developer@parkbenchsolutions.com", + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "4001@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-8595551401", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-8595551402", + "department": null, + "activated": true, + "userId": "flexible2@parkbenchsolutions.com", + "lastName": "flexible2", + "firstName": "Flexible Seating Host", + "extension": "51402", + "emailAddress": null, + "userType": "Flexible Seating Host", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userIdShort": "flexible2@parkbenchsolutions.com", + "domain": "parkbenchsolutions.com", + "dns": { + "min": "+1-8595551402", + "max": "", + "activated": true + } + } +] +``` diff --git a/docs/docs/methods/dns/group-dns-1.md b/docs/docs/methods/dns/group-dns-1.md new file mode 100644 index 0000000..81f2592 --- /dev/null +++ b/docs/docs/methods/dns/group-dns-1.md @@ -0,0 +1,44 @@ +--- +description: my_api.post.group_dns() +--- + +# 1️⃣ POST - Group DNs + +Adds a range of numbers to a Group. Range of numbers must be complete and format of number must follow: +{country code}-{number}. + +{% hint style="info" %} +Adding a singular number - Set both the start and end of range parameters as the same number. +{% endhint %} + +{% hint style="danger" %} +format of number must follow: +{country code}-{number} and range must be complete +{% endhint %} + +### Parameters + +* service\_provider\_id (str): Service provider ID where the target group is located. +* group\_id (str): Group ID where numbers should be added to. +* start\_of\_range\_number (str): Starting number in range to add to group. +* end\_of\_range\_number (str): Ending number in range to add to group. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.post.group_dns( + "serviceProviderId", + "groupID", + start_of_range_number="+1-1234567891, + end_of_range_number="+1-1234567892 +) +``` +{% endcode %} diff --git a/docs/docs/methods/dns/group-dns-2.md b/docs/docs/methods/dns/group-dns-2.md new file mode 100644 index 0000000..e6f11b1 --- /dev/null +++ b/docs/docs/methods/dns/group-dns-2.md @@ -0,0 +1,40 @@ +--- +description: my_api.put.group_dns() +--- + +# 1️⃣ DELETE - Group DNs + +Removes range of numbers from a Group. + +{% hint style="danger" %} +format of number must follow: "+{country code}-{number}" +{% endhint %} + +### Parameters + +* service\_provider\_id (str): Service provider ID where the group is located. +* group\_id (str): Group ID where numbers are hosted. +* start\_of\_range\_number (str): Starting number in range to remove from group. +* end\_of\_range\_number (str): Ending number in range to remove from group. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.delete.group_dns( + "serviceProviderId", + "groupID", + start_of_range_number= "+1-1234567891", + end_of_range_number= "+1-1234567895" +) +``` +{% endcode %} diff --git a/docs/docs/methods/dns/group-dns-activate.md b/docs/docs/methods/dns/group-dns-activate.md new file mode 100644 index 0000000..e86102c --- /dev/null +++ b/docs/docs/methods/dns/group-dns-activate.md @@ -0,0 +1,291 @@ +--- +description: my_api.put.group_dns_activate() +--- + +# 1️⃣ PUT - Group DNs Activate + +Update activation state of a list of numbers assigned to a group. + +{% hint style="danger" %} +format of number must follow: "+{country code}-{number}" +{% endhint %} + +### Parameters + +* service\_provider\_id (str): Service provider ID where the group is located. +* group\_id (str): Group ID where numbers are hosted. +* activated (bool): True to activate number and False to deactivate. +* numbers (list): List of target numbers to update. These must be strings and follow correct format. + +### Returns + +* JSON: All numbers assigned to group with activation state. + +### How To Use: + +{% code overflow="wrap" %} +```python +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() + +numbers = [ + "+1-1234567891", + "+1-1234567892", + "+1-1234567893", +] + +my_api.put.group_dns_activate( + "serviceProviderId", + "groupID", + activated =True, + numbers =numbers +) +``` +{% endcode %} + +### Example Returned Data (Formatted) + +```json +{ + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "dns": [ + { + "assigned": true, + "activated": true, + "min": "+1-2345678900", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-2345678908", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-5123875553", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-5131004000", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-5132011000", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-5132198500", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-5132337654", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-5132337655", + "max": null + }, + { + "assigned": true, + "activated": false, + "min": "+1-5132655005", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-5132655006", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-5132655007", + "max": "+1-5132655010" + }, + { + "assigned": true, + "activated": false, + "min": "+1-5132851520", + "max": "+1-5132851521" + }, + { + "assigned": true, + "activated": true, + "min": "+1-5133825000", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-5134031000", + "max": "+1-5134031001" + }, + { + "assigned": false, + "activated": true, + "min": "+1-5134031002", + "max": "+1-5134031003" + }, + { + "assigned": true, + "activated": true, + "min": "+1-5134221000", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-5134221001", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-5134221002", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-5136549851", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-5136549856", + "max": "+1-5136549859" + }, + { + "assigned": false, + "activated": true, + "min": "+1-5136569842", + "max": "+1-5136569844" + }, + { + "assigned": false, + "activated": true, + "min": "+1-5136569851", + "max": "+1-5136569852" + }, + { + "assigned": false, + "activated": true, + "min": "+1-5136569856", + "max": "+1-5136569859" + }, + { + "assigned": false, + "activated": true, + "min": "+1-5138881000", + "max": "+1-5138881004" + }, + { + "assigned": false, + "activated": true, + "min": "+1-5139228863", + "max": "+1-5139228870" + }, + { + "assigned": false, + "activated": true, + "min": "+1-5223875553", + "max": "+1-5223875554" + }, + { + "assigned": false, + "activated": true, + "min": "+1-5551001000", + "max": "+1-5551001001" + }, + { + "assigned": true, + "activated": true, + "min": "+1-8783449000", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-8783449001", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-8783449002", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-8783449003", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-8783449004", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-9135559716", + "max": null + }, + { + "assigned": true, + "activated": true, + "min": "+1-9871515000", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-9871515001", + "max": "+1-9871515002" + }, + { + "assigned": true, + "activated": true, + "min": "+1-9871515003", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-9871515004", + "max": "+1-9871515006" + }, + { + "assigned": true, + "activated": true, + "min": "+1-9871515007", + "max": null + }, + { + "assigned": false, + "activated": true, + "min": "+1-9871515008", + "max": "+1-9871515010" + } + ] +} +``` diff --git a/docs/docs/methods/dns/group-dns-assign-bulk.md b/docs/docs/methods/dns/group-dns-assign-bulk.md new file mode 100644 index 0000000..7cb8672 --- /dev/null +++ b/docs/docs/methods/dns/group-dns-assign-bulk.md @@ -0,0 +1,48 @@ +--- +description: my_api.post.group_dns_assign_bulk() +--- + +# 2️⃣ POST - Group DNs Assign Bulk + +Adds a range of numbers to a Group. Range of numbers must be complete and format of number must follow: +{country code}-{number}. + +{% hint style="info" %} +More efficient than Group DNs. +{% endhint %} + +{% hint style="info" %} +Adding a singular number - Set both the start and end of range parameters as the same number. +{% endhint %} + +{% hint style="danger" %} +format of number must follow: +{country code}-{number} and the range must be complete. +{% endhint %} + +### Parameters + +* service\_provider\_id (str): Service provider ID where the target group is located. +* group\_id (str): Group ID where numbers should be added to. +* start\_of\_range\_number (str): Starting number in range to add to group. +* end\_of\_range\_number (str): Ending number in range to add to group. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.post.group_dns_assign_bulk( + "serviceProviderId", + "groupID", + start_of_range_number="+1-1234567891, + end_of_range_number="+1-1234567892 +) +``` +{% endcode %} diff --git a/docs/docs/methods/dns/group-dns-unassign-bulk.md b/docs/docs/methods/dns/group-dns-unassign-bulk.md new file mode 100644 index 0000000..8c8e7c9 --- /dev/null +++ b/docs/docs/methods/dns/group-dns-unassign-bulk.md @@ -0,0 +1,44 @@ +--- +description: my_api.post.group_dns_unassign_bulk() +--- + +# 3️⃣ POST - Group DNs Unassign Bulk + +Unassign a range of numbers from a Group. Range of numbers must be complete and format of number must follow: +{country code}-{number}. + +{% hint style="info" %} +Unassigning a singular number - Set both the start and end of range parameters as the same number. +{% endhint %} + +{% hint style="danger" %} +format of number must follow: +{country code}-{number} and the range must be complete. +{% endhint %} + +### Parameters + +* service\_provider\_id (str): Service provider ID where the target group is located. +* group\_id (str): Group ID where numbers are located. +* start\_of\_range\_number (str): Starting number in range to unassign in group. +* end\_of\_range\_number (str): Ending number in range to unassign in group. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.post.group_dns_unassign_bulk( + "serviceProviderId", + "groupID", + start_of_range_number="+1-1234567891, + end_of_range_number="+1-1234567892 +) +``` +{% endcode %} diff --git a/docs/docs/methods/dns/group-dns.md b/docs/docs/methods/dns/group-dns.md new file mode 100644 index 0000000..c26f162 --- /dev/null +++ b/docs/docs/methods/dns/group-dns.md @@ -0,0 +1,55 @@ +--- +description: my_api.get.group_dns() +--- + +# 1️⃣ GET - Group DNs + +Gets all numbers assigned to group. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where group is hosted. +* group\_id (str): Group ID of target group. + +### Returns + +* Dict: Dictionary containing all DNs assigned to group. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.group_dns( + "serviceProviderId", + "groupID", +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +``` +{ + "serviceProviderId": "odin.mock.ent1", + "groupId": "odin.mock.grp1", + "dns": [ + { + "assigned": true, + "activated": true, + "min": "+1-9709580001", + "max": "+1-9709580009" + }, + { + "assigned": false, + "activated": false, + "min": "+1-9709580010", + "max": null + } + ] +} +``` diff --git a/docs/docs/methods/dns/service-provider-dn-search.md b/docs/docs/methods/dns/service-provider-dn-search.md new file mode 100644 index 0000000..73fa126 --- /dev/null +++ b/docs/docs/methods/dns/service-provider-dn-search.md @@ -0,0 +1,152 @@ +--- +description: my_api.get.service_provider_dns_search() +--- + +# 5️⃣ GET - Service Provider DN Search + +Searches for numbers assigned to Service Provider/ Enterprise and allows search criteria and limiting result. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where group is hosted. +* dn (int): Number/ part of number to search for. +* filter\_type (str, optional): Options: equal to, starts with, or contains. Defaults to None. limit (int, optional): Limits the amount of values API returns. Defaults to None. + +### Returns + +* List: List of numbers matching search criteria + +### How To Use: + +{% code overflow="wrap" %} +```python +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.service_provider_dns_search( + "serviceProviderId", + dn= "01942", + filter_type= "contains", + limit= 10 +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +``` +[ + { + "phoneNumbers": "+1-9589582000", + "department": null, + "activated": true, + "userId": "9589582000@as3.xdp.broadsoft.com", + "lastName": "mock-2000", + "firstName": "mock-2000", + "extension": "2000", + "emailAddress": null, + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "odin.mock.ent1", + "groupId": "odin.mock.grp1", + "userIdShort": "9589582000", + "domain": "as3.xdp.broadsoft.com", + "dns": { + "min": "+1-9589582000", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-9589582001", + "department": null, + "activated": true, + "userId": "9589582001@as3.xdp.broadsoft.com", + "lastName": "mock-2001", + "firstName": "mock-2001", + "extension": "2001", + "emailAddress": null, + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "odin.mock.ent1", + "groupId": "odin.mock.grp1", + "userIdShort": "9589582001", + "domain": "as3.xdp.broadsoft.com", + "dns": { + "min": "+1-9589582001", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-9589582002", + "department": null, + "activated": true, + "userId": "9589582002@as3.xdp.broadsoft.com", + "lastName": "mock-2002", + "firstName": "mock-2002", + "extension": "2002", + "emailAddress": null, + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "odin.mock.ent1", + "groupId": "odin.mock.grp1", + "userIdShort": "9589582002", + "domain": "as3.xdp.broadsoft.com", + "dns": { + "min": "+1-9589582002", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-9589582003", + "department": null, + "activated": true, + "userId": "9589582003@as3.xdp.broadsoft.com", + "lastName": "mock-2003", + "firstName": "mock-2003", + "extension": "2003", + "emailAddress": null, + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "odin.mock.ent1", + "groupId": "odin.mock.grp1", + "userIdShort": "9589582003", + "domain": "as3.xdp.broadsoft.com", + "dns": { + "min": "+1-9589582003", + "max": "", + "activated": true + } + }, + { + "phoneNumbers": "+1-9589582004", + "department": null, + "activated": true, + "userId": "9589582004@as3.xdp.broadsoft.com", + "lastName": "mock-2004", + "firstName": "mock-2004", + "extension": "2004", + "emailAddress": null, + "userType": "Normal", + "countryCode": 1, + "nationalPrefix": null, + "serviceProviderId": "odin.mock.ent1", + "groupId": "odin.mock.grp1", + "userIdShort": "9589582004", + "domain": "as3.xdp.broadsoft.com", + "dns": { + "min": "+1-9589582004", + "max": "", + "activated": true + } + } +] +``` diff --git a/docs/docs/methods/dns/service-provider-dns-1.md b/docs/docs/methods/dns/service-provider-dns-1.md new file mode 100644 index 0000000..24e31d7 --- /dev/null +++ b/docs/docs/methods/dns/service-provider-dns-1.md @@ -0,0 +1,42 @@ +--- +description: my_api.post.service_provider_dns() +--- + +# 4️⃣ POST - Service Provider DNs + +Adds a range of numbers to a Service Provider/ Enterprise. Range of numbers must be complete and format of number must follow: +{country code}-{number}. + +{% hint style="info" %} +Adding a singular number - Set both the start and end of range parameters as the same number. +{% endhint %} + +{% hint style="danger" %} +format of number must follow: +{country code}-{number} and the range must be complete. +{% endhint %} + +### Parameters + +* service\_provider\_id (str): Service provider ID where the target group is located. +* start\_of\_range\_number (str): Starting number in range to add to group. +* end\_of\_range\_number (str): Ending number in range to add to group. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.post.service_provider_dns( + "serviceProviderId", + start_of_range_number="+1-1234567891, + end_of_range_number="+1-1234567892 +) +``` +{% endcode %} diff --git a/docs/docs/methods/dns/service-provider-dns-2.md b/docs/docs/methods/dns/service-provider-dns-2.md new file mode 100644 index 0000000..7e48a84 --- /dev/null +++ b/docs/docs/methods/dns/service-provider-dns-2.md @@ -0,0 +1,38 @@ +--- +description: my_api.put.service_provider_dns() +--- + +# 2️⃣ DELETE - Service Provider DNs + +Removes range of numbers from a Service Proiver or Enterprise. + +{% hint style="danger" %} +format of number must follow: "+{country code}-{number}" +{% endhint %} + +### Parameters + +* service\_provider\_id (str): Service provider ID where the group is located. +* start\_of\_range\_number (str): Starting number in range to remove from group. +* end\_of\_range\_number (str): Ending number in range to remove from group. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.delete.service_provider_dns( + "serviceProviderId", + start_of_range_number= "+1-1234567891", + end_of_range_number= "+1-1234567895" +) +``` +{% endcode %} diff --git a/docs/docs/methods/dns/service-provider-dns.md b/docs/docs/methods/dns/service-provider-dns.md new file mode 100644 index 0000000..e1177f0 --- /dev/null +++ b/docs/docs/methods/dns/service-provider-dns.md @@ -0,0 +1,52 @@ +--- +description: my_api.get.service_provider_dns() +--- + +# 4️⃣ GET - Service Provider DNs + +Returns all numbers assigned to Service Provider/ Enterprise with the group its assigned to and if the numbers can be deleted. + +### Parameters + +* service\_provider\_id (str): Service Provider or Enterprise ID where target numbers are located. + +### Returns + +* Dict: All numbers assigned to Service Provider/ Enterprise with group and delete status. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.service_provider_dns( + "serviceProviderId" +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +``` +{ + "serviceProviderId": "odin.mock.ent1", + "dns": [ + { + "canDelete": true, + "groupId": null, + "min": "+1-9709580015", + "max": "+1-9709580100" + }, + { + "canDelete": false, + "groupId": "odin.mock.grp1", + "min": "+1-9709580001", + "max": "+1-9709580010" + } + ] +} +``` diff --git a/docs/docs/methods/dns/system-dn-summary.md b/docs/docs/methods/dns/system-dn-summary.md new file mode 100644 index 0000000..afcfc78 --- /dev/null +++ b/docs/docs/methods/dns/system-dn-summary.md @@ -0,0 +1,43 @@ +--- +description: my_api.get.system_dn_summary() +--- + +# 7️⃣ GET - System DN Summary + +Returns all numbers assigned to system. + +### Returns + +* List: List of all Service Providers/ Enterprises and numbers assigned in ranges. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.system_dn_summary() +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +``` +[ + { + "isEnterprise": true, + "serviceProviderId": "ent.odin", + "min": "+1-5131111110", + "max": "+1-5131111120" + }, + { + "isEnterprise": true, + "serviceProviderId": "ent.odin", + "min": "+1-6143334444", + "max": "+1-6143334448" + } +] +``` diff --git a/docs/docs/methods/dns/system-dn-utilization.md b/docs/docs/methods/dns/system-dn-utilization.md new file mode 100644 index 0000000..7d5fdeb --- /dev/null +++ b/docs/docs/methods/dns/system-dn-utilization.md @@ -0,0 +1,39 @@ +--- +description: my_api.get.system_dn_utilization() +--- + +# 8️⃣ GET - System DN Utilisation + +Returns DN statistics for each Service Provider/ Enterprise such as total DNs assigned. + +### Returns + +* List: List of all Service Provider/ Enterprises with statistics of DNs for each. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.system_dn_utilization() +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +[ + { + "serviceProviderId": "ent.odin", + "phoneNumbers": 382, + "assignedtoGroups": 159, + "percentageAssigned": 41, + "isEnterprise": true, + "activatedOnGroups": 20 + } +] +``` diff --git a/docs/docs/methods/dns/system-dns.md b/docs/docs/methods/dns/system-dns.md new file mode 100644 index 0000000..92b0238 --- /dev/null +++ b/docs/docs/methods/dns/system-dns.md @@ -0,0 +1,30 @@ +--- +description: my_api.get.system_dn() +--- + +# 6️⃣ GET - System DNs + +Searches for number from System level. This will return where the number is located on the system. It will show the Service Provider/ Enterprise, Group ID, and User ID the number is assigned to. + +### Parameters + +* dn (int): Target number excluding country code e.g. 123456789 + +### Returns + +* List: List of dictionaries containing details of each number that fit the search criteria. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.system_dn( + 123456789 +) +``` +{% endcode %} diff --git a/docs/docs/methods/do-not-disturb/README.md b/docs/docs/methods/do-not-disturb/README.md new file mode 100644 index 0000000..a515353 --- /dev/null +++ b/docs/docs/methods/do-not-disturb/README.md @@ -0,0 +1,3 @@ +# πŸ›‘ Do Not Disturb + +All things do not disturb. diff --git a/docs/docs/methods/do-not-disturb/get-user-do-not-disturb.md b/docs/docs/methods/do-not-disturb/get-user-do-not-disturb.md new file mode 100644 index 0000000..0f1a66a --- /dev/null +++ b/docs/docs/methods/do-not-disturb/get-user-do-not-disturb.md @@ -0,0 +1,36 @@ +--- +description: my_api.get.user_do_not_disturb() +--- + +# πŸ›‘ GET - User Do Not Disturb + +This method fetches the Do Not Disturb (DND) and Ring Splash (RS) status of a single. It takes a single User ID of the target user you would like to retrieve the status of. + +### Parameters + +* user\_id (str): Target User you would like to know the DND/ RS status of + +### Returns + +* Dict: Target users DND/ RS status. True is enabled and False disabled. + +### How To Use: + +```python +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_do_not_disturb(userId) +``` + +## Examples Data (Formatted) + +```python +{ + "isActive": true, + "ringSplash": true, + "userId": "9709580001@microv-works.com" +} +``` diff --git a/docs/docs/methods/do-not-disturb/put-user-do-not-disturb.md b/docs/docs/methods/do-not-disturb/put-user-do-not-disturb.md new file mode 100644 index 0000000..542959e --- /dev/null +++ b/docs/docs/methods/do-not-disturb/put-user-do-not-disturb.md @@ -0,0 +1,42 @@ +--- +description: my_api.put.user_do_not_disturb() +--- + +# πŸ›‘ PUT - User Do Not Disturb + +This method updates the Do Not Disturb (DND) and Ring Splash (RS) status of a single. It takes a single User ID of the target user you would like to retrieve the status of. + +### Parameters + +* user\_id (str): Target user id of user you would like to update the state of. +* dnd\_active (bool): True to enable DND and False to disable DND. Defaults to False. +* ring\_splash\_active (bool): True to enable Ring Splash and False to disable Ring Splash. Defaults to False + +### Returns + +* Dict: Target users DND/ RS status. True is enabled and False disabled. + +### How To Use: + +```python +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.put.user_do_not_disturb( + user_id='UserID', + dnd_active= True + ring_splash_active= True +) +``` + +## Examples Data (Formatted) + +```python +{ + "isActive": true, + "ringSplash": true, + "userId": "9709580001@microv-works.com" +} +``` diff --git a/docs/docs/methods/hunt-groups/README.md b/docs/docs/methods/hunt-groups/README.md new file mode 100644 index 0000000..10426e7 --- /dev/null +++ b/docs/docs/methods/hunt-groups/README.md @@ -0,0 +1,3 @@ +# πŸ‡ Hunt Groups + +All things updating Hunt Groups. diff --git a/docs/docs/methods/hunt-groups/group-hunt-group-weighted-call-distribution.md b/docs/docs/methods/hunt-groups/group-hunt-group-weighted-call-distribution.md new file mode 100644 index 0000000..5e82540 --- /dev/null +++ b/docs/docs/methods/hunt-groups/group-hunt-group-weighted-call-distribution.md @@ -0,0 +1,62 @@ +--- +description: my_api.group_hunt_group_weighted_call_distribution() +--- + +# πŸ’― PUT - Group Hunt Group Weighted Call Distribution + +Update the Weighted Call Distribution (WCD) between users in a Hunt Group (HG). + +Note: All weightings need to equal 100. + +### Parameters + +* service\_provider\_id (str): Service provider ID where the group is located. +* group\_id (_type_): Group ID where the HG is located. +* hunt\_group\_user\_id (str): Service user ID of the target HG. +* agents (dict): Updates of WCD to be applied to HG. + +### Raises + +* AOInvalidWeighting: The WCD must equal 100 if it does not this error will be returned. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_service_provider_id = "serviceProviderId" +my_group_id = "groupId" +my_hunt_group_id = "huntGroupID@domain.com" +my_agents = [ + { + "userId": "5131110051", + "weight": 20 + }, + { + "userId": "5131111108", + "weight": 20 + }, + { + "userId": "5131111110", + "weight": 20 + }, + { + "userId": "5131111115", + "weight": 40 + } + ] + +my_api.put.group_hunt_group_weighted_call_distribution( + service_provider_id = my_service_provider_id , + group_id = my_group_id, + hunt_group_user_id = my_hunt_group_user_id, + agents= my_agents +) +``` diff --git a/docs/docs/methods/hunt-groups/group-hunt-group.md b/docs/docs/methods/hunt-groups/group-hunt-group.md new file mode 100644 index 0000000..2f2081f --- /dev/null +++ b/docs/docs/methods/hunt-groups/group-hunt-group.md @@ -0,0 +1,69 @@ +--- +description: my_api.group_hunt_group() +--- + +# 🍏 PUT - Group Hunt Group + +Update a Hunt Groups (HG) settings. + +{% hint style="warning" %} +**Modifying Agents in Hunt Group -** Remember to follow the correct formatting, the list contains dictionaries of userId and the users id.\ +Example - \[{"userId":"9709580001"}, {"userId":"9709580002"}] +{% endhint %} + +### Parameters + +* service\_provider\_id (str): Service provider ID of where the group that hosts the HG is located. +* group\_id (_type_): Group ID of where the HG is located. +* hunt\_group\_user\_id (str): Target service user ID of the HG. +* updates (dict): Updates to be applied to HG. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_service_provider_id = "serviceProviderId" +my_group_id = "groupId" +my_hunt_group_id = "huntGroupID@domain.com" +updates = { + "serviceInstanceProfile":{ + "name":"odin.mock.hg.2", + "callingLineIdLastName":"odin.mock.hg.2", + "callingLineIdFirstName":"odin.mock.hg.2", + "hiraganaLastName":"odin.mock.hg.2", + "hiraganaFirstName":"Hunt Group", + "language":"English", + "timeZone":"America/Denver", + "aliases":[] + }, + "policy":"Regular", + "huntAfterNoAnswer":true, + "noAnswerNumberOfRings":5, + "forwardAfterTimeout":false, + "forwardTimeoutSeconds":10, + "allowCallWaitingForAgents":true, + "useSystemHuntGroupCLIDSetting":true, + "includeHuntGroupNameInCLID":true, + "enableNotReachableForwarding":false, + "makeBusyWhenNotReachable":false, + "agents":[ + {"userId":"9709580001"}, + {"userId":"9709580002"} + ] +} + +my_api.put.group_hunt_group( + service_provider_id = my_service_provider_id , + group_id = my_group_id, + hunt_group_user_id = my_hunt_group_user_id, + updates = my_updates +) +``` diff --git a/docs/docs/methods/hunt-groups/group-hunt-groups-status.md b/docs/docs/methods/hunt-groups/group-hunt-groups-status.md new file mode 100644 index 0000000..b6e7af9 --- /dev/null +++ b/docs/docs/methods/hunt-groups/group-hunt-groups-status.md @@ -0,0 +1,31 @@ +# 🟒 PUT - Group Hunt Groups Status + +Updates a list of Hunt Groups (HG) status to either active or inactive. + +### Parameters + +* service\_user\_ids (list): List of service user IDs of target HGs. +* status (bool, optional): Status to apply to target HGs. Defaults to True. + +### Returns + +* None: This method does not return any specific value. + +### How To Use: + +```python +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_hunt_group_user_ids= [ + "hunt_group1@domain.com", + "hunt_group2@domain.com" +] + +my_api.put.group_hunt_groups_status( + call_centhunt_group_user_ids = my_hunt_group_user_ids, + status = True +) +``` diff --git a/docs/docs/methods/password-generate/README.md b/docs/docs/methods/password-generate/README.md new file mode 100644 index 0000000..26c7f4f --- /dev/null +++ b/docs/docs/methods/password-generate/README.md @@ -0,0 +1,3 @@ +# πŸ”‘ Password Generate + +All things password/ passcode generates. diff --git a/docs/docs/methods/password-generate/passcode-generate.md b/docs/docs/methods/password-generate/passcode-generate.md new file mode 100644 index 0000000..9f93605 --- /dev/null +++ b/docs/docs/methods/password-generate/passcode-generate.md @@ -0,0 +1,40 @@ +--- +description: my_api.get.passcode_generate() +--- + +# πŸ—οΈ GET - Passcode Generate + +Generates a single passcode following group rules. + +### Parameters + +* service\_provider\_id (str): Service Provider ID where Group is located. +* group\_id (str): Group ID to generate passcode for. + +### Returns + +* dict: Multiple passwords generated according to the groups rules. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.passcode_generate( + "serviceProviderId", + "groupID", +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "passcode": "68204751" +} +``` diff --git a/docs/docs/methods/password-generate/passcodes-generate.md b/docs/docs/methods/password-generate/passcodes-generate.md new file mode 100644 index 0000000..dc303d2 --- /dev/null +++ b/docs/docs/methods/password-generate/passcodes-generate.md @@ -0,0 +1,53 @@ +--- +description: my_api.get.passcodes_generate() +--- + +# πŸ—οΈ GET - Passcodes Generate + +Generates a multiple passcodes to the limit set in pararmeters. + +### Parameters + +* service\_provider\_id (str): Service Provider ID where Group is located. +* group\_id (str): Group ID to generate passcodes for. +* limit (int, optional): Number of passwords api will return. Defaults to 10. + +### Returns + +* Dict: Multiple passwords generated according to the groups rules. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.passcodes_generate( + "serviceProviderId", + "groupID", + limit =10 +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "passcodes": [ + "52184637", + "73586940", + "27648093", + "14608397", + "35810742", + "64907832", + "47692380", + "69307485", + "95013267", + "78210935" + ] +} +``` diff --git a/docs/docs/methods/password-generate/password-generate.md b/docs/docs/methods/password-generate/password-generate.md new file mode 100644 index 0000000..0f91f05 --- /dev/null +++ b/docs/docs/methods/password-generate/password-generate.md @@ -0,0 +1,40 @@ +--- +description: my_api.get.password_generate() +--- + +# πŸ”“ GET - Password Generate + +Generates a single passwords following the groups rules. + +### Parameters + +* service\_provider\_id (str): Service Provider ID where Group is located. +* group\_id (str): Group ID to generate password for. + +### Returns + +* dict: Single password generated according to the groups rules.. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.password_generate( + "serviceProviderId", + "groupID", +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "password": "?+^8RZ40MeC3+:i.BQ" +} +``` diff --git a/docs/docs/methods/password-generate/passwords-generate.md b/docs/docs/methods/password-generate/passwords-generate.md new file mode 100644 index 0000000..400bbaa --- /dev/null +++ b/docs/docs/methods/password-generate/passwords-generate.md @@ -0,0 +1,105 @@ +--- +description: my_api.get.passwords_generate() +--- + +# πŸ”“ GET - Passwords Generate + +Generates a single passwords following the groups rules. + +### Parameters + +* service\_provider\_id (str): Service Provider ID where Group is located. +* group\_id (str): Group ID to generate password for. +* limit (int, optional): Number of passwords api will return. Defaults to 10. + +### Returns + +* dict: Multiple passwords generated according to the groups rules. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.passwords_generate( + "serviceProviderId", + "groupID", + limit= 100 +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "passwords": [ + ".:2hnk:VYW80G[!5@-", + "?f-O6Ui$8*Nd3L[?2-", + "5wGV8M[@I%1OE4-(3.", + "I3%^O_8kC!9rSUG}4l", + "27@{P4[leD9A_xWNY^", + "4{)Y2Y.LM9G5c?7G}n", + "$38VZF[kP%#691U^1_", + "22T64[P-WE3_43gbe^", + "7@*5cnG(S1I6XApW[O", + "Pe9V4%@$3sb:R}5w}F", + "n:3a97%W]8Y4$TQKO*", + "V8]*YCJ#8^3gKr09sK", + "gW^5[97fJ0)p@(1TZX", + "X3M5z-?1_n:%OWR2I1", + "9vNMTZV6e7?WW5#_n-", + "AQ*8#$:baP7WIZ^*02", + "w781U?%F]u226-WDcH", + "ojK_XE%7#g^9J3E*4T", + "73Va(51^Gh.A0R0U2_", + "vXWBO4f)(82pR7?^Zy", + "14Z4o7_Rl5}!6_-[HD", + "fPy$2:*jJ[D59H7@2Q", + "Z_OBT7Hn315rE_}7r+", + "^W%1NDKq_8PX#^9Ra6", + "P:.R[361M(0}GdDA6s", + "WX3B?S_@5Cj?(20}^E", + "Ryhp97CC}1$Q)EN6@Y", + "3X+(B*Y]G_h%25%9LV", + "4[22k#_PV8(AFFX_9u", + "27]VHWWRB}1nfT*-4c", + "(eR30NJ50*WL:8m^D+", + "N.8(C7U9NvD$61^6:I", + "53S0sE71_6B_H!?(BO", + "YP6VM$*5!4j3}Oxy%9", + "Po^683[I+75_*ZwK$H", + ":51[Im6}6PfV#4[Z(N", + "Up12k#:Gr{3}ED9_cQ", + "8*UjFD^6.HH4v?d9w*", + "%W5+584MkQ1$3cJ_lK", + "9G5-348[RTj.!w0)oP", + "p7}Y5--30]Z@Pt!DHf", + "_pY8o]#TMD5IH-4a{1", + "]!e5MW8J{w7:.VIp3@", + "{)D003(-37V.8lZh{S", + "0(CD$:.Yt50S8-PS27", + "u+{U4xS8)^0LWH7S[X", + ":[d!s_+3@R60BNIl9^", + "#LA@m2[5.O@TkXP+68", + "3dy5{b7}$Ak_0$ZJW^", + "W?^3BN51M!uFIu{_9r", + "g5UYF5_k9V30NX+(?2", + "D7L{_!++1N}PuJ^46T", + "*#DD:6K.L2q0S:YO_1", + "XQ0@+7_G4P+6w3}WFL", + "70$FWLl1r{QZ*O:4)3", + "J1y3*q$UYN4T{o2p8@", + "w@uBv!HP*5924N:TZ%", + "n$6Qe_9+^X83aGWN_E", + "m2_?3Q1!@y69E}*LgG", + "5G2#T-YV.Cu!g84M2D" + ] +}{ + "password": "?+^8RZ40MeC3+:i.BQ" +} +``` diff --git a/docs/docs/methods/password-generate/sip-password-generate.md b/docs/docs/methods/password-generate/sip-password-generate.md new file mode 100644 index 0000000..36dd1fc --- /dev/null +++ b/docs/docs/methods/password-generate/sip-password-generate.md @@ -0,0 +1,40 @@ +--- +description: my_api.get.sip_password_generate() +--- + +# πŸ—οΈ GET - SIP Password Generate + +Generates a single SIP password. + +### Parameters + +* service\_provider\_id (str): Service Provider ID where Group is located. +* group\_id (str): Group ID to generate SIP password for. + +### Returns + +* dict: Single SIP password generated according to the groups rules. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.sip_password_generate( + "serviceProviderId", + "groupID", +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "password": "8!01T_8Hk{R6" +} +``` diff --git a/docs/docs/methods/password-generate/sip-passwords-generate.md b/docs/docs/methods/password-generate/sip-passwords-generate.md new file mode 100644 index 0000000..bdd1c26 --- /dev/null +++ b/docs/docs/methods/password-generate/sip-passwords-generate.md @@ -0,0 +1,90 @@ +--- +description: my_api.get.sip_passwords_generate() +--- + +# πŸ—οΈ GET - SIP Passwords Generate + +Generates multiple SIP passwords to the limit set in parameters. Defaults to 10. + +### Parameters + +* service\_provider\_id (str): Service Provider ID where Group is located. +* group\_id (str): Group ID to generate SIP password for. +* limit (int, optional): Number of passwords api will return. Defaults to 10. + +### Returns + +* dict: Mutliple SIP passwords generated according to the groups rules. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.sip_passwords_generate( + "serviceProviderId", + "groupID", + limit= 15 +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "passwords": [ + "A9y2Rk[L:E2+94JW{6", + "#OZmK3-HI7s9).N4WJ", + "*_Z#6@J2cUBf3?-7W0", + "X{_z%O+06LXJVC7K19", + "!*DFJ1O(^B3041#:Zb", + "7#*6+)Q*A3:L6$e1UT", + "!w_PI-H691N7w+qBO^", + "@j4r2R[{HB2^pO7IL9", + "fT3{_!2n8NJN19:fF}", + "41nQT{Az6j2#%uE8!F", + "8T_9R%14?W5r1^8aA[", + "2R!lK3]K2:6n^DJbO1", + "_O]C26c{4Pg7A$*X.N", + "*Ilr1E0We_:G$qN59@", + "#%9cH$0B3QH0qJaZ{4", + ".V$F2?(U_Lx6%Y_83R", + "q:85a4^xTZ0*C_HE!c", + "Zc-C+6]4N)5I0$eFC7", + "S9[87y$RZ3jU8C?A0_", + "SpYM([1yT2%5N2F0M*", + "_4W_8x?Q:6EH3(D9Ow", + "?Z$HqF2tZ6__S7+9z?", + "3]]5wP)M$^OD8#1DK?", + "?gPK16q7B7o@#.:0uQ", + "8%yFK*N{I5QUi^7$I9", + "S_X^810L)n@z3_Ia.e", + "WR*6h_{bA2*{HC4O(1", + "?@0%AWS13mOE_%bY-5", + "2ZN^*:M@89Sq+T1xD_", + ":89]WM@5SqJ.B@s}h4", + "F%s2_68TKGH269^?DE", + "8GR+{d5_-t6a7AlNJY", + "-Lij5}8$KV2+IAd46X", + "7?orTIST(53*X21RA%", + "Y1![Pp0:_U4Bo_ZlI2", + "4oK.[2*Rt$NB8PH1VQ", + "19MDr}%03R*}U.A(7J", + "NJI[L.]o5341P82If(", + "FL49D^__5V?d:6{pI7", + "ZB28wCp-*P?lS!19D0", + "SC!XOI%u]97GO?I5$2", + "_UYPC4^Sc}3.Z86X+F", + "9diO_?QD7v166s.Y3!", + "KA4]r8$Y.#5:J9Nzwj", + "D0r.Q4K2x%G[8w_XP)" + ] +}{ + "password": "8!01T_8Hk{R6" +} +``` diff --git a/docs/docs/methods/registration/README.md b/docs/docs/methods/registration/README.md new file mode 100644 index 0000000..f3a6734 --- /dev/null +++ b/docs/docs/methods/registration/README.md @@ -0,0 +1,6 @@ +--- +description: All things registration. +--- + +# 🟒 Registration + diff --git a/docs/docs/methods/registration/bulk-user-registration.md b/docs/docs/methods/registration/bulk-user-registration.md new file mode 100644 index 0000000..a95f8c5 --- /dev/null +++ b/docs/docs/methods/registration/bulk-user-registration.md @@ -0,0 +1,280 @@ +--- +description: my_api.get.bulk_user_regsitration() +--- + +# πŸ’š GET - Bulk User Registration + +Gets all users in a group and their device registrations. This includes soft phones. + +{% hint style="info" %} +If a users registrations is an empty list this means the user currently has no active registrations. +{% endhint %} + +### Parameters + +* service\_provider\_id (str): Service Provider/ Enterprise ID where Group is hosted. +* group\_id (str): Target Group ID where users are located. + +### Returns + +* dict: All users devices and details on device such as registration. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.bulk_user_registration( + "serviceProviderID", + "groupID" +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "serviceProviderId": "LabEnterprise", + "groupId": "regression.test", + "users": [ + { + "profile": { + "userId": "test.user1@alliedtelecom.net", + "lastName": "User 1", + "firstName": "Test", + "department": "Bandwidth.com (regression.test)", + "phoneNumber": "+1-2026951172", + "phoneNumberActivated": true, + "emailAddress": null, + "hiraganaLastName": "User 1", + "hiraganaFirstName": "Test", + "inTrunkGroup": false, + "extension": "2639", + "countryCode": 1, + "nationalPrefix": null, + "domain": "alliedtelecom.net" + }, + "data": { + "registrations": [ + { + "deviceLevel": "Group", + "deviceName": "ECG_0004f2accaf7", + "order": 1, + "uRI": "sip:2026951172@10.2.2.45:5060;transport=udp;jtr=22-1808", + "expiration": "Thu May 23 08:33:00 EDT 2019", + "line/Port": "2026951172@alliedtelecom.net", + "endpointType": "Primary", + "publicNetAddress": null, + "publicPort": null, + "privateNetAddress": null, + "privatePort": null, + "userAgent": "Polycom/5.4.1.14510 PolycomVVX-VVX_500-UA/5.4.1.14510", + "lockoutStarted": null, + "lockoutExpires": null, + "lockoutCount": 0, + "accessInfo": null + } + ], + "userId": "test.user1@alliedtelecom.net" + } + }, + { + "profile": { + "userId": "test.user3@alliedtelecom.net", + "lastName": "User 3", + "firstName": "Test", + "department": "Level3 (regression.test)", + "phoneNumber": "+1-3092650759", + "phoneNumberActivated": true, + "emailAddress": null, + "hiraganaLastName": "User 3", + "hiraganaFirstName": "Test", + "inTrunkGroup": false, + "extension": "2437", + "countryCode": 1, + "nationalPrefix": null, + "domain": "alliedtelecom.net" + }, + "data": { + "registrations": [ + { + "deviceLevel": "Group", + "deviceName": "ECG-0004F289F5AC", + "order": 1, + "uRI": "sip:2022662437@10.2.2.45:5060;transport=udp;jtr=57-2417", + "expiration": "Thu May 23 08:34:03 EDT 2019", + "line/Port": "2022662437@alliedtelecom.net", + "endpointType": "Primary", + "publicNetAddress": null, + "publicPort": null, + "privateNetAddress": null, + "privatePort": null, + "userAgent": "PolycomVVX-VVX_310-UA/5.6.2.1593", + "lockoutStarted": null, + "lockoutExpires": null, + "lockoutCount": 0, + "accessInfo": null + } + ], + "userId": "test.user3@alliedtelecom.net" + } + }, + { + "profile": { + "userId": "gs.test@alliedtelecom.net", + "lastName": "Test", + "firstName": "GS", + "department": null, + "phoneNumber": "", + "phoneNumberActivated": null, + "emailAddress": null, + "hiraganaLastName": "Test", + "hiraganaFirstName": "GS", + "inTrunkGroup": false, + "extension": "2456", + "countryCode": null, + "nationalPrefix": null, + "domain": "alliedtelecom.net" + }, + "data": { + "registrations": [], + "userId": "gs.test@alliedtelecom.net" + } + }, + { + "profile": { + "userId": "test.user2@alliedtelecom.net", + "lastName": "User 2", + "firstName": "Test", + "department": "Telnyx (regression.test)", + "phoneNumber": "+1-2023478048", + "phoneNumberActivated": true, + "emailAddress": null, + "hiraganaLastName": "User 2", + "hiraganaFirstName": "Test", + "inTrunkGroup": false, + "extension": "6866", + "countryCode": 1, + "nationalPrefix": null, + "domain": "alliedtelecom.net" + }, + "data": { + "registrations": [ + { + "deviceLevel": "Group", + "deviceName": "ECG-0004f283b2f5", + "order": 1, + "uRI": "sip:2023478048@10.2.2.45:5060;transport=udp;jtr=6-147", + "expiration": "Thu May 23 08:30:12 EDT 2019", + "line/Port": "2023478048@alliedtelecom.net", + "endpointType": "Primary", + "publicNetAddress": null, + "publicPort": null, + "privateNetAddress": null, + "privatePort": null, + "userAgent": "Polycom/5.4.1.14510 PolycomVVX-VVX_500-UA/5.4.1.14510", + "lockoutStarted": null, + "lockoutExpires": null, + "lockoutCount": 0, + "accessInfo": null + } + ], + "userId": "test.user2@alliedtelecom.net" + } + }, + { + "profile": { + "userId": "This.Is.A.Test.User@alliedtelecom.net", + "lastName": "User", + "firstName": "PB.Test", + "department": null, + "phoneNumber": "", + "phoneNumberActivated": null, + "emailAddress": null, + "hiraganaLastName": "User", + "hiraganaFirstName": "PB.Test", + "inTrunkGroup": false, + "extension": "", + "countryCode": null, + "nationalPrefix": null, + "domain": "alliedtelecom.net" + }, + "data": { + "registrations": [], + "userId": "This.Is.A.Test.User@alliedtelecom.net" + } + }, + { + "profile": { + "userId": "Another.Test.User.From.XSP@alliedtelecom.net", + "lastName": "XSP.Test", + "firstName": "PB.User.XSP", + "department": null, + "phoneNumber": "", + "phoneNumberActivated": null, + "emailAddress": null, + "hiraganaLastName": "XSP.Test", + "hiraganaFirstName": "PB.User.XSP", + "inTrunkGroup": false, + "extension": "", + "countryCode": null, + "nationalPrefix": null, + "domain": "alliedtelecom.net" + }, + "data": { + "registrations": [], + "userId": "Another.Test.User.From.XSP@alliedtelecom.net" + } + }, + { + "profile": { + "userId": "CLi.Test.User@alliedtelecom.net", + "lastName": "CLi.Test.User", + "firstName": "CLi.Test.User", + "department": null, + "phoneNumber": "", + "phoneNumberActivated": null, + "emailAddress": null, + "hiraganaLastName": "CLi.Test.User", + "hiraganaFirstName": "CLi.Test.User", + "inTrunkGroup": false, + "extension": "", + "countryCode": null, + "nationalPrefix": null, + "domain": "alliedtelecom.net" + }, + "data": { + "registrations": [], + "userId": "CLi.Test.User@alliedtelecom.net" + } + }, + { + "profile": { + "userId": "kallani@alliedtelecom.net", + "lastName": "Allani", + "firstName": "Karim", + "department": null, + "phoneNumber": "+1-2025551234", + "phoneNumberActivated": false, + "emailAddress": "kallani@alliedtelecom.net", + "hiraganaLastName": "Allani", + "hiraganaFirstName": "Karim", + "inTrunkGroup": false, + "extension": "234", + "countryCode": 1, + "nationalPrefix": null, + "domain": "alliedtelecom.net" + }, + "data": { + "registrations": [], + "userId": "kallani@alliedtelecom.net" + } + } + ] +} +``` diff --git a/docs/docs/methods/registration/user-registration.md b/docs/docs/methods/registration/user-registration.md new file mode 100644 index 0000000..4a055ac --- /dev/null +++ b/docs/docs/methods/registration/user-registration.md @@ -0,0 +1,62 @@ +--- +description: my_api.get.user_regsitration() +--- + +# πŸ’š GET - User Registration + +Gets a users devices and if those devices are registered. This includes soft phones. + +{% hint style="info" %} +If registrations is an empty list this means the user has no active registrations. +{% endhint %} + +### Parameters + +* user\_id (str): Target user ID to check registration + +### Returns + +* dict: All users devices and details on device such as registration. + +### How To Use: + +{% code overflow="wrap" %} +```python +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_registration( + "testUserId@domain.com" +) +``` +{% endcode %} + +### Example Returned Data of SIP Passwords (Formatted) + +```json +{ + "registrations": [ + { + "deviceLevel": "Group", + "deviceName": "ECG_0004f2accaf7", + "order": 1, + "uRI": "sip:2026951172@10.2.2.45:5060;transport=udp;jtr=22-1808", + "expiration": "Thu May 23 08:33:00 EDT 2019", + "line/Port": "2026951172@alliedtelecom.net", + "endpointType": "Primary", + "publicNetAddress": null, + "publicPort": null, + "privateNetAddress": null, + "privatePort": null, + "userAgent": "Polycom/5.4.1.14510 PolycomVVX-VVX_500-UA/5.4.1.14510", + "lockoutStarted": null, + "lockoutExpires": null, + "lockoutCount": 0, + "accessInfo": null + } + ], + "userId": "test.user1@alliedtelecom.net" +} +``` diff --git a/docs/docs/methods/schedules.md b/docs/docs/methods/schedules.md new file mode 100644 index 0000000..e985d92 --- /dev/null +++ b/docs/docs/methods/schedules.md @@ -0,0 +1,3 @@ +# πŸ“† Schedules + +All things schedules. diff --git a/docs/docs/methods/services/README.md b/docs/docs/methods/services/README.md new file mode 100644 index 0000000..4996342 --- /dev/null +++ b/docs/docs/methods/services/README.md @@ -0,0 +1,3 @@ +# πŸ’ Services + +All things services and service packs. diff --git a/docs/docs/methods/services/user-services.md b/docs/docs/methods/services/user-services.md new file mode 100644 index 0000000..b788cee --- /dev/null +++ b/docs/docs/methods/services/user-services.md @@ -0,0 +1,40 @@ +--- +description: my_api.put.user_services() +--- + +# 🧍 PUT - User Services + +This method updates a Broadwork entity's services and service packs if applicable. Any entity that can have a service or service pack assigned can be updated such as a user's service pack or a Hunt Group services. Note that services and service packs are separated into two lists when passed to the method, if you only want to update one list only pass in the list you wish to update. For example, adding the service pack 'SP-A' to user A will only require I pass this in the service\_pack parameter. + +### Parameters + +* user\_id (str): User ID of the target user. +* services (list): List of services to be applied to user. +* service\_packs (list): List of service packs to be applied to user. +* assigned (bool, optional): Assign (True) or unassign(False). Defaults to True. + +### Returns + +* Dict: User services assigned to the user. + +### How To Use: + +```python +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() + +# updating a users service pack +my_api.put.user_services( + "userId@domain.com", + service_packs=["SP-A"], + assigned=True +) + +my_api.user_services( +user_id = hunt_group_user_id, +services = hunt_group_services, +assigned = False +) +``` diff --git a/docs/docs/methods/trunk-groups/README.md b/docs/docs/methods/trunk-groups/README.md new file mode 100644 index 0000000..e92e691 --- /dev/null +++ b/docs/docs/methods/trunk-groups/README.md @@ -0,0 +1,3 @@ +# 🌊 Trunk Groups + +All things Trunk Groups. diff --git a/docs/docs/methods/trunk-groups/get-group-trunk-group.md b/docs/docs/methods/trunk-groups/get-group-trunk-group.md new file mode 100644 index 0000000..31ae346 --- /dev/null +++ b/docs/docs/methods/trunk-groups/get-group-trunk-group.md @@ -0,0 +1,102 @@ +--- +description: api.get.group_trunk_group() +--- + +# ☎️ GET - Group Trunk Group + +Fetches all Trunk Group details of a single Trunk Group in a Group. + +### Parameters + +* service\_provider\_id (str): Service Provider/ Enterprise ID where Group is located. +* group\_id (str): Group ID where the target Trunk Group is located. +* trunk\_group\_name (str): Target Trunk Group Name. + +### Returns + +* Dict: Details of a target trunk group. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.group_trunk_group( + "ServiceProviderID", + "GroupID", + "trunkGroupName" +) +``` +{% endcode %} + +### Example Data Returned (Formatted) + +```json +{ + "department": { + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "name": "test" + }, + "accessDevice": { + "deviceLevel": "Group", + "deviceName": "Generic SIP IP-PBX Single Registration 1" + }, + "maxActiveCalls": 5, + "maxIncomingCalls": 5, + "maxOutgoingCalls": 5, + "enableBursting": false, + "capacityExceededTrapInitialCalls": 0, + "capacityExceededTrapOffsetCalls": 0, + "invitationTimeout": 6, + "requireAuthentication": false, + "trunkGroupIdentity": "grp.odin.trunka@parkbenchsolutions.com", + "allowTerminationToTrunkGroupIdentity": false, + "allowTerminationToDtgIdentity": false, + "includeTrunkGroupIdentity": false, + "includeDtgIdentity": false, + "includeTrunkGroupIdentityForNetworkCalls": false, + "includeOtgIdentityForNetworkCalls": false, + "enableNetworkAddressIdentity": false, + "allowUnscreenedCalls": false, + "allowUnscreenedEmergencyCalls": false, + "pilotUserCallingLineIdentityForExternalCallsPolicy": "No Calls", + "pilotUserChargeNumberPolicy": "No Calls", + "callForwardingAlwaysAction": "Reroute", + "callForwardingAlwaysForwardAddress": 123123123, + "callForwardingAlwaysRerouteTrunkGroupKey": { + "serviceProviderId": "ent.odin", + "groupId": "grp.odin.audit", + "name": "trunk.odin.audit" + }, + "routeToPeeringDomain": false, + "prefixEnabled": false, + "statefulReroutingEnabled": false, + "sendContinuousOptionsMessage": false, + "continuousOptionsSendingIntervalSeconds": 30, + "failureOptionsSendingIntervalSeconds": 10, + "failureThresholdCounter": 1, + "successThresholdCounter": 1, + "inviteFailureThresholdCounter": 1, + "inviteFailureThresholdWindowSeconds": 30, + "trunkGroupState": "Available", + "pilotUserCallingLineAssertedIdentityPolicy": "Unscreened Originating Calls", + "useSystemCallingLineAssertedIdentityPolicy": true, + "totalActiveIncomingCalls": 0, + "totalActiveOutgoingCalls": 0, + "pilotUserCallOptimizationPolicy": "Optimize For User Services", + "clidSourceForScreenedCallsPolicy": "Profile Name Profile Number", + "useSystemCLIDSourceForScreenedCallsPolicy": true, + "userLookupPolicy": "Basic", + "useSystemUserLookupPolicy": true, + "pilotUserCallingLineIdentityForEmergencyCallsPolicy": "No Calls", + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "name": "grp.odin.trunka", + "users": [] +} +``` diff --git a/docs/docs/methods/trunk-groups/get-group-trunk-groups-call-capacity.md b/docs/docs/methods/trunk-groups/get-group-trunk-groups-call-capacity.md new file mode 100644 index 0000000..dfdeab2 --- /dev/null +++ b/docs/docs/methods/trunk-groups/get-group-trunk-groups-call-capacity.md @@ -0,0 +1,46 @@ +--- +description: api.get.group_trunk_groups_call_capacity() +--- + +# πŸ“ž GET - Group Trunk Groups Call Capacity + +Fetches Trunk Call Capacity data for a single Group. + +### Parameters + +* service\_provider\_id (str): Service Provider/ Enterprise ID where Group is located. +* group\_id (str): Target Group to return data on. + +### Returns + +* Dict: Trunk Group Call Capacity data of target group. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.group_trunk_groups_call_capacity( + "ServiceProviderID", + "GroupID" + +) +``` +{% endcode %} + +### Example Data Returned (Formatted) + +```json +{ + "maxActiveCalls": 3, + "maxAvailableActiveCalls": 5, + "burstingMaxActiveCalls": 3, + "burstingMaxAvailableActiveCalls": 5, + "serviceProviderId": "odin.mock.sp1", + "groupId": "odin.mock.sp1.grp1" +} +``` diff --git a/docs/docs/methods/trunk-groups/get-group-trunk-groups.md b/docs/docs/methods/trunk-groups/get-group-trunk-groups.md new file mode 100644 index 0000000..88cb3b5 --- /dev/null +++ b/docs/docs/methods/trunk-groups/get-group-trunk-groups.md @@ -0,0 +1,55 @@ +--- +description: api.get.group_trunk_groups() +--- + +# 🚰 GET - Group Trunk Groups + +Fetches list of all trunk groups in a single group. + +### Parameters + +* service\_provider\_id (str): Service Provider/ Enterprise ID where Group is located. +* group\_id (str): Group ID where the target Trunk Group is located. + +### Returns + +* List: List of core details of all Trunk Groups located in a single Group. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.group_trunk_groups( + "ServiceProviderID", + "GroupID" +) +``` +{% endcode %} + +### Example Data Returned (Formatted) + +```json +[ + { + "name": "odin.mock.trunk1", + "department": null, + "deviceName": "odin.mock.dev1", + "deviceLevel": "Group", + "groupId": "odin.mock.sp.grp1", + "serviceProviderId": "odin.mock.sp1" + }, + { + "name": "odin.mock.trunk1", + "department": null, + "deviceName": "odin.mock.dev1", + "deviceLevel": "Group", + "groupId": "odin.mock.sp.grp1", + "serviceProviderId": "odin.mock.sp1" + } +] +``` diff --git a/docs/docs/methods/trunk-groups/get-service-provider-call-capacity-report.md b/docs/docs/methods/trunk-groups/get-service-provider-call-capacity-report.md new file mode 100644 index 0000000..0ded1a8 --- /dev/null +++ b/docs/docs/methods/trunk-groups/get-service-provider-call-capacity-report.md @@ -0,0 +1,125 @@ +--- +description: api.get.service_provider_trunk_call_capacity_report() +--- + +# πŸ“‚ GET - Service Provider Call Capacity Report + +Fetches trunk call capacity details of Service Provider/ Enterprise and all Groups in the SP/ ENT. + +{% hint style="info" %} +Note the feature 'Service Provider Trunking Capacity' in Scripter also achieves this. Link below. +{% endhint %} + +{% content-ref url="../../features/scripter/service-provider-trunking-capacity.md" %} +[service-provider-trunking-capacity.md](../../features/scripter/service-provider-trunking-capacity.md) +{% endcontent-ref %} + +### Parameters + +* servive\_provider\_id (str): Target Service Provider/ Enterprise ID. + +### Returns + +* Dict: Breakdown of all trunk call capacity details of target Service Provider/ Enterprise and all Groups in the target SP/ ENT. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.service_provider_trunk_call_capacity_report( + "ServiceProviderID" +) +``` +{% endcode %} + +### Example Data Returned (Formatted) + +```json +{ + "serviceProviderId": "ent.odin", + "serviceProviderTrunkCapacity": { + "serviceProviderId": "ent.odin", + "maxActiveCalls": 40, + "burstingMaxActiveCalls": -1 + }, + "groups": [ + { + "groupId": "connections.demo", + "groupName": "connections.demo", + "userLimit": 200, + "service": { + "serviceName": "Trunk Group", + "authorized": true, + "assigned": true, + "limited": "Limited", + "quantity": 1, + "usage": 0, + "licensed": true, + "allowed": -1, + "alias": "Trunk Group" + }, + "groupTrunkCapacity": { + "maxActiveCalls": 10, + "maxAvailableActiveCalls": 40, + "burstingMaxActiveCalls": 0, + "burstingMaxAvailableActiveCalls": -1, + "serviceProviderId": "ent.odin", + "groupId": "connections.demo" + } + }, + { + "groupId": "group.odin", + "groupName": "odin Group", + "userLimit": 100, + "service": { + "serviceName": "Trunk Group", + "authorized": true, + "assigned": true, + "limited": "Unlimited", + "quantity": -1, + "usage": 4, + "licensed": true, + "allowed": -1, + "alias": "Trunk Group" + }, + "groupTrunkCapacity": { + "maxActiveCalls": 15, + "maxAvailableActiveCalls": 40, + "burstingMaxActiveCalls": 0, + "burstingMaxAvailableActiveCalls": -1, + "serviceProviderId": "ent.odin", + "groupId": "group.odin" + } + }, + { + "groupId": "phonism.test", + "groupName": "Phonism Test", + "userLimit": 25, + "service": { + "serviceName": "Trunk Group", + "authorized": true, + "assigned": true, + "limited": "Unlimited", + "quantity": -1, + "usage": 0, + "licensed": true, + "allowed": -1, + "alias": "Trunk Group" + }, + "groupTrunkCapacity": { + "maxActiveCalls": 40, + "maxAvailableActiveCalls": 40, + "burstingMaxActiveCalls": 0, + "burstingMaxAvailableActiveCalls": -1, + "serviceProviderId": "ent.odin", + "groupId": "phonism.test" + } + } + ] +} +``` diff --git a/docs/docs/methods/trunk-groups/get-service-provider-trunk-group-call-capacity.md b/docs/docs/methods/trunk-groups/get-service-provider-trunk-group-call-capacity.md new file mode 100644 index 0000000..3d3a23d --- /dev/null +++ b/docs/docs/methods/trunk-groups/get-service-provider-trunk-group-call-capacity.md @@ -0,0 +1,40 @@ +--- +description: api.get.service_provider_trunk_group_call_capacity() +--- + +# 🚿 GET - Service Provider Trunk Group Call Capacity + +Fetches trunk call capacity details of a single Service Provider. + +### Parameters + +* service\_provider\_id (str): Target Service Provider/ Enterprise ID. + +### Returns + +* Dict: Trunk call capacity details of a single Service Provider/ Enterprise ID. + +### How To Use: + +{% code overflow="wrap" %} +```python +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.service_provider_trunk_group_call_capacity( + "ServiceProviderID" +) +``` +{% endcode %} + +### Example Data Returned (Formatted) + +```json +{ + "serviceProviderId": "odin.mock.clone.ent1", + "maxActiveCalls": 10, + "burstingMaxActiveCalls": 10 +} +``` diff --git a/docs/docs/methods/user/README.md b/docs/docs/methods/user/README.md new file mode 100644 index 0000000..4b060f8 --- /dev/null +++ b/docs/docs/methods/user/README.md @@ -0,0 +1,3 @@ +# 🀡 User + +All things users diff --git a/docs/docs/methods/user/get-user-by-id.md b/docs/docs/methods/user/get-user-by-id.md new file mode 100644 index 0000000..4a74f99 --- /dev/null +++ b/docs/docs/methods/user/get-user-by-id.md @@ -0,0 +1,116 @@ +--- +description: api.get.user_by_id() +--- + +# πŸ†” GET - User By ID + +Returns extensive details of a single user including alias, enpoint device, and more common details like first and last name. + +### Parameters + +* user\_id (str): Target user ID of the user you would like to review. + +### Returns + +* Dict: Python dictionary of the users details + +### How To Use: + +{% code overflow="wrap" %} +```python +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" +) +``` +{% endcode %} + +### Example Data Returned (Formatted) + +```json +{ + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "userId": "testdept@lab.tekvoice.net", + "lastName": "dsd", + "firstName": "dsd", + "callingLineIdLastName": "dsd", + "callingLineIdFirstName": "ddsdsd", + "hiraganaLastName": "dsd", + "hiraganaFirstName": "dsd", + "phoneNumber": "5136549859", + "extension": "9859", + "callingLineIdPhoneNumber": "9871515000", + "department": { + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "name": "mayur" + }, + "departmentFullPath": "mayur (grp.odin)", + "language": "English", + "timeZone": "America/Denver", + "timeZoneDisplayName": "(GMT-06:00) (US) Mountain Time", + "defaultAlias": "testdept@lab.tekvoice.net", + "accessDeviceEndpoint": { + "accessDevice": { + "deviceType": "BroadWorks Media Server", + "protocol": "SIP 2.0", + "numberOfPorts": { + "unlimited": "true" + }, + "numberOfAssignedPorts": 1, + "status": "Online", + "transportProtocol": "Unspecified", + "useCustomUserNamePassword": false, + "deviceName": "broadworks-media-server", + "macAddress": "", + "deviceLevel": "Group", + "accessDeviceCredentials": { + "userName": null + }, + "serviceProviderId": "ent.odin", + "groupId": "grp.odin", + "tags": [], + "relatedServices": [] + }, + "linePort": "testdept_lin1@lab.tekvoice.net", + "staticRegistrationCapable": "true", + "useDomain": "true", + "supportVisualDeviceManagement": "true", + "contacts": [ + { + "sipContact": "sip1" + }, + { + "sipContact": "sip2" + }, + { + "sipContact": "sip3" + }, + { + "sipContact": "sip4" + }, + { + "sipContact": "sip5" + } + ] + }, + "countryCode": "1", + "networkClassOfService": "testncos1", + "allowVideo": true, + "domain": "lab.tekvoice.net", + "endpointType": "accessDeviceEndpoint", + "aliases": [], + "trunkAddressing": { + "trunkGroupDeviceEndpoint": { + "contacts": [] + } + }, + "isEnterprise": true, + "passwordExpiresDays": 2147483647 +} +``` diff --git a/docs/docs/methods/user/get-users.md b/docs/docs/methods/user/get-users.md new file mode 100644 index 0000000..d986377 --- /dev/null +++ b/docs/docs/methods/user/get-users.md @@ -0,0 +1,301 @@ +--- +description: api.get.users() +--- + +# πŸ‘― GET - Users + +Returns list of users depending on filter criteria you set. See supported filters and filter examples on how to use. + +### Parameters + +* servive\_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. + +## 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 + +```python +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" +) +``` + +#### Get all users in Group grp1 + +```python +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 + +```python +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"
+)
+
+ +### Returns + +* Dict: Python dictionary of the users details + +### How To Use: + +{% code overflow="wrap" %} +```python +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" +) +``` +{% endcode %} + +### Example Data Returned (Formatted) + +```json +[ + { + "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 + } +] +``` diff --git a/docs/troubleshooting-and-faq/README.md b/docs/troubleshooting-and-faq/README.md new file mode 100644 index 0000000..bbd2092 --- /dev/null +++ b/docs/troubleshooting-and-faq/README.md @@ -0,0 +1,3 @@ +# πŸ†˜ Troubleshooting & FAQ + +Cominge soon! We are working hard to get all the relevant information together for you and present it a easy to understand way. diff --git a/docs/troubleshooting-and-faq/common-issues.md b/docs/troubleshooting-and-faq/common-issues.md new file mode 100644 index 0000000..f01de5b --- /dev/null +++ b/docs/troubleshooting-and-faq/common-issues.md @@ -0,0 +1,2 @@ +# πŸ› Common Issues + diff --git a/docs/troubleshooting-and-faq/frequently-asked-questions/README.md b/docs/troubleshooting-and-faq/frequently-asked-questions/README.md new file mode 100644 index 0000000..9c79836 --- /dev/null +++ b/docs/troubleshooting-and-faq/frequently-asked-questions/README.md @@ -0,0 +1,2 @@ +# ⁉️ Frequently Asked Questions + diff --git a/docs/troubleshooting-and-faq/frequently-asked-questions/do-you-need-to-set-up-multiple-loggers-for-multiple-api-objects-no..md b/docs/troubleshooting-and-faq/frequently-asked-questions/do-you-need-to-set-up-multiple-loggers-for-multiple-api-objects-no..md new file mode 100644 index 0000000..55bf8f1 --- /dev/null +++ b/docs/troubleshooting-and-faq/frequently-asked-questions/do-you-need-to-set-up-multiple-loggers-for-multiple-api-objects-no..md @@ -0,0 +1,41 @@ +# 1️⃣ Do You Need To Set Up Multiple Loggers For Multiple API Objects? No. + +The Logger object is a Singleton and can only be created once across multiple API objects for your multiple Broadwork instances. All API calls for all your API objects will be sent to the same places you defined in one API object. + +The reason here is it allows administrators to see all uses of the library in one space. However, if there is a need to separate this so logs for different systems can be sent to different locations please contact us to discuss below. + +{% content-ref url="../../contact.md" %} +[contact.md](../../contact.md) +{% endcontent-ref %} + +### How To Use: + +Like normal create your api objects however, before authentication use the set up handler methods on **one** of your objects to specify locations the logs should be sent. + +```python +from odins_spear import api + +may_api_1= api.Api(base_url="https://base_url_1/api/vx", username="john.smith", password="ODIN_INSTANCE_1") +may_api_2= api.Api(base_url="https://base_url_2/api/vx", username="john.smith", password="ODIN_INSTANCE_2") +may_api_3= api.Api(base_url="https://base_url_3/api/vx", username="john.smith", password="ODIN_INSTANCE_3") + +my_api_1.logger.set_up_sys_log_handler('yourURL', 1234) +my_api_1.logger.set_up_file_handler('yourPath') + +my_api_1.authenticate() +my_api_2.authenticate() +my_api_3.authenticate() +``` + +### Example logs. + +```log +2024-04-25 15:39:33,919 | Odin's Spear | Username | 400 | /service-providers/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID +2024-04-25 15:48:05,673 | Odin's Spear | Username | 200 | /auth/token +2024-04-25 15:48:06,447 | Odin's Spear | Username | 400 | /service-providers/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID +2024-04-25 15:48:07,215 | Odin's Spear | Username | 200 | /service-providers/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID +2024-04-25 15:48:08,513 | Odin's Spear | Username | 200 | /groups?serviceProviderId=ServicePrividerID +2024-04-25 15:48:09,484 | Odin's Spear | Username | 400 | /groups/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID&groupId=groupId +2024-04-25 15:48:10,305 | Odin's Spear | Username | 400 | /groups/trunk-groups/call-capacity?serviceProviderId=ServicePrividerID&groupId=groupId +``` +