Profile Management

Retrieve an user

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/

Retrieve a user profile.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK

{
   "lastName": "Test",
   "firstName": "Test",
   "cliLastName": "Test",
   "cliFirstName": "Test",
   "phoneNumber": "",
   "extension": "4000",
   "cliPhoneNumber": "",
   "department": {
      "tenantId": "ApioSpTest",
      "groupId": "ApioGrpTest",
      "departmentName": "test_department_initial",
      "fullPathName": "test_department_parent_1 \\ test_department_initial"
   },
   "language": "English",
   "emailAddress": "test_mail@test.netaxis.be",
   "networkClassOfService": "9",
   "accessDeviceEndpoint": {
      "accessDevice": {
         "name": "DP_ApioUserTest",
         "level": "Group"
      },
      "lineNumber": 0,
      "contacts": [],
      "linePort": "LP_ApioUserTest@sip.netaxis.be"
   },
   "timeZone": "Europe/Brussels"
}
Response JSON Object:
Note:

accessDeviceEndpoint and trunkEndpoint are mutually exclusive fields. One of them will be shown if set.

Status Codes:

Update an user

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/

Update the profile of the user.

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
    "lastName": "Last Test PUT",
    "firstName": "First Test PUT",
    "cliLastName": "CLID Last Test PUT",
    "cliFirstName": "CLID First Test PUT",
    "department": {
      "tenantId": "ApioSpTest",
      "groupId": "ApioGrpTest",
      "departmentName": "test_department_initial"
    },
    "oldPassword": "test_passwd",
    "newPassword": "new_test_passwd",
    "timeZone": "Europe/Luxembourg",
    "language": "English",
    "emailAddress": "modified.test_mail@test.netaxis.be",
    "networkClassOfService": "9",
}
Request JSON Object:
Note:

accessDeviceEndpoint and trunkEndpoint are mutually exclusive fields.

Note:

see Configuration Information for the Line Port for the line port inside accessDeviceEndpoint and trunkEndpoint

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Delete an user

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/

Delete the user profile.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK

{}
Request JSON Object:
  • delete_devices (boolean) – (Optional) if set to true, APIO will identify all phones that the user owns and will also delete them. Default is based on an APIO settings DELETE_USER_DEVICES with default value True.

  • _excludedAppIds (array) – (Optional) The delete will delete all EndUserAppData, but it could occur that the caller still needs some of them and will take the responsibility to delete them afterwards. The format is an array of Application Ids (string). (from 1.11.1)

Response JSON Object:
  • detached_additional_users (array) – list of objects. In case other users have been unlinked from the phone, a reference will be present in this list. Each object contains a field userId and a field linePort.

  • deleted_additional_devices (array) – list of objects. In case an additional phone of the user has been deleted, a reference will be present in this list. Each object contains a field userId and a field linePort.

  • deleted_main_device (object) – if a main device has been deleted or unlink an object containing a field userId and a field linePort will be present

Note

The field userId in deleted_additional_devices and deleted_main_device is a redundant information but it allows to have the same object in the 3 cases.

Status Codes:
  • 200 OK – no error: either the delete was successful or the user was not present.

Pin code

Retrieve an user’s pin code

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/pincode/

Retrieve info about a user profile’s pin code.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/pincode/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK

{
   "loginDisabled": false,
   "expirationDays": 3600,
   "doesNotExpire": false,
   "pinCode": "123456"
}
Response JSON Object:
  • loginDisabled (boolean) – if set, the login will be disabled and the pin code will be used instead.

  • expirationDays (integer) – number of days the pin code will last.

  • doesNotExpire (boolean) – if set, the pin code will not expire.

  • pinCode (string) – the pin code. It must be noted that depending on the AS behind the APIO, this field could be present or not.

Status Codes:

Update an user’s pin code

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/pincode/

Update the user profile’s pin code.

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/pincode/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
    "pinCode": "123456",
    "oldPinCode": "987654",
}
Request JSON Object:
  • pinCode (string) – the new pin code.

  • oldPinCode (string) – (Optional) the old pin code.

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Configuration Information for Update an user

The APIO behaviour for the validation of the passwords is controlled by the following setting:

 "VALIDATE_PASSWORD_LOCALLY": true
 "VALIDATE_PASSWORD_LOCAL_RULE": true
 "VALIDATE_PINCODE_LOCALLY": true,
 "MINIMUM_PASSWORD_RULES": {
     "END_USER" : {
         "PASSWORD_MIN_SPECIAL_CHARACTERS": 1,
         "PASSWORD_MIN_UPPERCASE_LETTERS": 1,
         "PASSWORD_MIN_LOWERCASE_LETTERS": 1,
         "PASSWORD_MIN_DIGITS": 1,
         "PASSWORD_MIN_LENGTH": 8
     }
}
Settings description:
  • VALIDATE_PASSWORD_LOCALLY: APIO will check the passwords based on the user level rules from the network element. Default is false.

  • VALIDATE_PASSWORD_LOCAL_RULE: if the previous settings is false and that this settings is true, the APIO will check the password with respect to an hardcoded local rule (min 8 chars, aat least 1 upper and 1 lower cases). This local rule can be overwritten in project mode. Default is false.

  • VALIDATE_PINCODE_LOCALLY: APIO will check the pincode based on the user level rules from the network element. Default is true.

  • MINIMUM_PASSWORD_RULES.**END_USER**: (from 1.11.0) minium password rules for End Users, on top of the ones of the network element. Default are the ones in the example. Please note that this settings will also be used when creating hidden users for APIO features.