Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Prescott committed Mar 8, 2024
2 parents b1dd76a + 45a2664 commit d24a2cc
Show file tree
Hide file tree
Showing 4 changed files with 343 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
* [🗝️ Passcodes Generate](docs/methods/get/password-generate/passcodes-generate.md)
* [🗝️ SIP Password Generate](docs/methods/get/password-generate/sip-password-generate.md)
* [🗝️ SIP Passwords Generate](docs/methods/get/password-generate/sip-passwords-generate.md)
* [🟢 Registration](docs/methods/get/registration/README.md)
* [💚 User Registration](docs/methods/get/registration/user-registration.md)
* [💚 Bulk User Registration](docs/methods/get/registration/bulk-user-registration.md)
* [✉️ Post](docs/methods/post.md)
* [🔢 DNs](docs/methods/post/dns/README.md)
* [1️⃣ Group DNs](docs/methods/post/dns/group-dns.md)
Expand Down
6 changes: 6 additions & 0 deletions docs/methods/get/registration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
description: All things registration.
---

# 🟢 Registration

276 changes: 276 additions & 0 deletions docs/methods/get/registration/bulk-user-registration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
---
description: my_api.get.bulk_user_regsitration()
---

# 💚 Bulk User Registration

Gets all users in a group and their device registrations. This includes soft phones.

### 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": "[email protected]",
"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:[email protected]:5060;transport=udp;jtr=22-1808",
"expiration": "Thu May 23 08:33:00 EDT 2019",
"line/Port": "[email protected]",
"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": "[email protected]"
}
},
{
"profile": {
"userId": "[email protected]",
"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:[email protected]:5060;transport=udp;jtr=57-2417",
"expiration": "Thu May 23 08:34:03 EDT 2019",
"line/Port": "[email protected]",
"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": "[email protected]"
}
},
{
"profile": {
"userId": "[email protected]",
"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": "[email protected]"
}
},
{
"profile": {
"userId": "[email protected]",
"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:[email protected]:5060;transport=udp;jtr=6-147",
"expiration": "Thu May 23 08:30:12 EDT 2019",
"line/Port": "[email protected]",
"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": "[email protected]"
}
},
{
"profile": {
"userId": "[email protected]",
"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": "[email protected]"
}
},
{
"profile": {
"userId": "[email protected]",
"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": "[email protected]"
}
},
{
"profile": {
"userId": "[email protected]",
"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": "[email protected]"
}
},
{
"profile": {
"userId": "[email protected]",
"lastName": "Allani",
"firstName": "Karim",
"department": null,
"phoneNumber": "+1-2025551234",
"phoneNumberActivated": false,
"emailAddress": "[email protected]",
"hiraganaLastName": "Allani",
"hiraganaFirstName": "Karim",
"inTrunkGroup": false,
"extension": "234",
"countryCode": 1,
"nationalPrefix": null,
"domain": "alliedtelecom.net"
},
"data": {
"registrations": [],
"userId": "[email protected]"
}
}
]
}
```
58 changes: 58 additions & 0 deletions docs/methods/get/registration/user-registration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
description: my_api.get.user_regsitration()
---

# 💚 User Registration

Gets a users devices and if those devices are registered. This includes soft phones.

### 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(
"[email protected]"
)
```
{% endcode %}

### Example Returned Data of SIP Passwords (Formatted)

```json
{
"registrations": [
{
"deviceLevel": "Group",
"deviceName": "ECG_0004f2accaf7",
"order": 1,
"uRI": "sip:[email protected]:5060;transport=udp;jtr=22-1808",
"expiration": "Thu May 23 08:33:00 EDT 2019",
"line/Port": "[email protected]",
"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": "[email protected]"
}
```

0 comments on commit d24a2cc

Please sign in to comment.