-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
368 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
docs/docs/methods/authentication/put-user-authentication-service.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "" | ||
} | ||
``` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
[] | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
|
||
] | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} | ||
] | ||
|
||
``` |