Skip to content

Commit

Permalink
Updating online docs (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
LivCurtis authored Jul 26, 2024
1 parent 73c28ab commit a4bcccf
Show file tree
Hide file tree
Showing 8 changed files with 368 additions and 2 deletions.
8 changes: 7 additions & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@
* [📂 GET - Service Provider Call Capacity Report](docs/methods/trunk-groups/get-service-provider-call-capacity-report.md)
* [📞 PUT - Group Trunk Groups Call Capacity](docs/methods/trunk-groups/put-group-trunk-groups-call-capacity.md)
* [☎️ PUT - Group Trunk Group](docs/methods/trunk-groups/put-group-trunk-group.md)
* [🚿 PUT - Service Provider Trunk Group Call Capacity](docs/methods/trunk-groups/put-service-providers-trunk-group-call-capacity.md)
* [🚿 POST - Group Trunk Group](docs/methods/trunk-groups/post-group-trunk-group.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)
* [📮 POST - User](docs/methods/user/post-user.md)
* [👩‍💻 PUT - User](docs/methods/user/put-user.md)
* [👩‍👩‍👧‍👧 PUT - Users Bulk](docs/methods/user/put-users-bulk.md)
* [🔏 PUT - User Portal Passcode](docs/methods/user/put-user-portal-passcode.md)
* [🔑 Authentication](docs/methods/authentication/README.md)
* [🔏 PUT - User Web Authentication Password](docs/methods/authentication/user-web-authentication-password.md)
* [🔏 PUT - User Web Authentication Password](docs/methods/authentication/put-user-web-authentication-password.md)
* [👮‍♀️ PUT - User Authentication Service](docs/methods/authentication/put-user-authentication-service.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)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
description: my_api.put.user_authentication_service()
---

# 👮‍♀️ PUT - User Authentication Service

Set new SIP Authentication passowrd for a single user. Authentication service must be assigned to the user in order to use this method.

### Parameters 

* user\_id (str): Target user ID to reset the SIP authentication password. 
* new\_password (str): New web authentication password to apply to new user. Please note: the password must be at least 6 characters and not more than 60 characters; including 1 uppercase alpha char(s); including 1 lowercase alpha char(s); In addition, it cannot contain the authentication name.

### Returns

* Dict: Python dictionary of the user that has been updated. The password will not be printed to the terminal.

### How To Use:

The below code will update the user's Authentication password.

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

### Example Returned Data of Device (Formatted)

```json
{
"userId": "[email protected]",
"userName": "john.smith",
"newPassword": ""
}
```
2 changes: 1 addition & 1 deletion docs/docs/methods/user/get-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Returns list of users depending on filter criteria you set. See supported filter

### Parameters 

* servive\_provider\_id (str, optional): Service or Enterprise ID, top level object. Defaults to None.
* service\_provider\_id (str, optional): Service or Enterprise ID, top level object. Defaults to None.
* group\_id (str, optional): Group ID where user is hosted. Defaults to None. 
* filter (str, optional): Filter criteria, supported filters below. Defaults to None. 
* filter\_type (str, optional): Options: equal to, starts with, or contains. Defaults to None. 
Expand Down
94 changes: 94 additions & 0 deletions docs/docs/methods/user/post-user.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
description: api.post.user()
---

# 📮 POST - User

Creates a new user in the specified group with the configuration defined in the payload.

### Parameters 

* service_provider_id (str): Service provider ID where Group is loctaed.
* group_id (str): Group ID where new user will be built.
* user_id (str): Complete User ID including group domain of new user.
* first_name (str): First name of new user.
* last_name (str): Last name of new user.
* extension (str): Extension number of new user.
* web_auth_password (str): Web authentication password. Note get.password_generate() can be used to get this.
* payload (dict): User configuration.

### Returns

* Dict: New user entity.

### 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_user_payload = {

}

my_api.post.user(
"my_service_provider_id",
"my_group_id",
"[email protected]",
"John",
"Smith",
"1234",
"my_web_auth_password123!",
my_user_payload
)
```
{% endcode %}

### Example Data Returned (Formatted)

```json
[
{"serviceProviderId": "my_service_provider_id",
"groupId": "my_group_id",
"userId": "[email protected]",
"lastName": "Smith",
"firstName": "John",
"callingLineIdLastName": "Smith",
"callingLineIdFirstName": "John",
"hiraganaLastName": "Smith",
"hiraganaFirstName": "John",
"extension": "1234",
"language": "English",
"timeZone": "Europe/London",
"timeZoneDisplayName": "(GMT+01:00) Greenwich Mean Time",
"defaultAlias": "[email protected]",
"countryCode": "1",
"allowVideo": true,
"callingLineIdPhoneNumber": "",
"phoneNumber": "",
"domain": "testdomain.net",
"endpointType": "none",
"aliases": [],
"accessDeviceEndpoint": {
"contacts": []
},
"trunkAddressing": {
"trunkGroupDeviceEndpoint": {"contacts": []}
},
"department": {
"serviceProviderId": "",
"groupId": "",
"name": ""
},
"emailAddress": "",
"nationalPrefix": "",
"phoneNumberActivated": false,
"isEnterprise": true,
"passwordExpiresDays": "-2147483648"
}
]

```
43 changes: 43 additions & 0 deletions docs/docs/methods/user/put-user-portal-passcode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
description: api.put.user_portal_passcode()
---

# 👩‍👩‍👧‍👧 PUT - User Portal Passcode

Updates the specified User's portal passcode.

### Parameters 

* user_id (str): User ID of the target user you would like to change the portal passcode for.
* new_passcode (int): New portal passcode to set for the target user.

### Raises

* AOInvalidCode: If code is less than 4 or higher than 6.

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

### Example Data Returned (Formatted)

```json
[]

```
105 changes: 105 additions & 0 deletions docs/docs/methods/user/put-user.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
description: api.put.user()
---

# 👩‍💻 PUT - User

Updates specified User's options, such as extension, name and etc.

Note: Available options to change can be seen through: get.user_by_id()

### Parameters 

* service_provider_id (str): Target Service Provider where group is located
* group_id (str): Target Group ID where user is located
* user_id (str): Target User ID
* updates (dict): The updates to be applied to the list of Users e.g {"extension":"9999"}

### Returns

* Dict: Returns the changes made including User ID and updates.

### 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.put.user(
"my_service_provider",
"my_group_id",
"[email protected]",
{
"address": {
"addressLine1": "Bldg 1",
"addressLine2": "Suite 2",
"city": "Cincinnat",
"stateOrProvince": "Ohio",
"zipOrPostalCode": "45204",
"country": "US"
}
}
)
```
{% endcode %}

### Example Data Returned (Formatted)

```json
[
{
"serviceProviderId": "my_service_provider_id",
"groupId": "my_group_id",
"userId": "[email protected]",
"lastName": "Smith",
"firstName": "John",
"callingLineIdLastName": "Smith",
"callingLineIdFirstName": "John",
"hiraganaLastName": "Smith",
"hiraganaFirstName": "John",
"extension": "1234",
"language": "English",
"timeZone": "Europe/London",
"timeZoneDisplayName": "(GMT+01:00) Greenwich Mean Time",
"defaultAlias": "[email protected]",
"address": {
"addressLine1": "Bldg 1",
"addressLine2": "Suite 2",
"city": "Cincinnat",
"stateOrProvince": "Ohio",
"zipOrPostalCode": "45204",
"country": "US"
},
"countryCode": "1",
"allowVideo": true,
"callingLineIdPhoneNumber": "",
"phoneNumber": "",
"domain": "testdomain.net",
"endpointType": "none",
"aliases": ["[email protected]"],
"accessDeviceEndpoint": {
"contacts": []
},
"trunkAddressing": {
"trunkGroupDeviceEndpoint": {
"contacts": []
}
},
"department": {
"serviceProviderId": "",
"groupId": "",
"name": ""
},
"emailAddress": "",
"nationalPrefix": "",
"phoneNumberActivated": false,
"isEnterprise": true,
"passwordExpiresDays": "-107"
}

]

```
74 changes: 74 additions & 0 deletions docs/docs/methods/user/put-users-bulk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
description: api.put.users_bulk()
---

# 👩‍👩‍👧‍👧 PUT - Users Bulk

Updates specified list of User's options, such as extension, name and etc.

Note: Available options to change can be seen through: get.user_by_id()

### Parameters 

* users (list): List of specified User IDs to update
* updates (dict): The updates to be applied to the list of Users e.g {"extension":"9999"}

### Returns

* Dict: Returns the changes made including the list of User IDs and updates.

### 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_users = [
"[email protected]",
"[email protected]"
]

my_user_payload = {
"address": {
"addressLine1": "Bldg 1",
"addressLine2": "Suite 2",
"city": "Cincinnat",
"stateOrProvince": "Ohio",
"zipOrPostalCode": "45204",
"country": "US"
}
}

my_api.put.users_bulk(
my_users,
my_user_payload
)
```
{% endcode %}

### Example Data Returned (Formatted)

```json
[
{
"users": [
{"userId": "[email protected]"},
{"userId": "[email protected]"}
],
"data": {
"address": {
"addressLine1": "Bldg 1",
"addressLine2": "Suite 2",
"city": "Cincinnat",
"stateOrProvince": "Ohio",
"zipOrPostalCode": "45204",
"country": "US"
}
}
}
]

```

0 comments on commit a4bcccf

Please sign in to comment.