Local Users¶
Retrieve Local User list¶
-
GET
/api/v1/local/apio_users/
¶ Retrieve the Local Users list.
Example request:
GET /api/v1/local/apio_users/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "local_users": { [ { "username": "ApioSupportTest@sip.netaxis.be", "firstName": "Firstcustomer", "lastName": "Lastcustomer", "emailAddress": "customer@test.netaxis.be", "language": "English", "userType": "reseller", "accessType": 3, "userLevel": 16, "readOnly": false } ] } }
Second example: Retrieve the Local Users list with search criteria.
Example request:
GET /api/v1/local/apio_users/ HTTP/1.1 Host: example.com { "insensitiveUserNameStarts": "Apio", "insensitiveUserLastNameEquals": "Lastcustomer" }
- Response JSON Object:
insensitiveUserNameStarts (string) – See insensitiveUserNameStarts from Search criteria.
insensitiveUserNameContains (string) – See insensitiveUserNameContains from Search criteria.
insensitiveUserNameEquals (string) – See insensitiveUserNameEquals from Search criteria.
insensitiveUserFirstNameStarts (string) – See insensitiveUserFirstNameStarts from Search criteria.
insensitiveUserFirstNameContains (string) – See insensitiveUserFirstNameContains from Search criteria.
insensitiveUserFirstNameEquals (string) – See insensitiveUserFirstNameEquals from Search criteria.
insensitiveUserLastNameStarts (string) – See insensitiveUserLastNameStarts from Search criteria.
insensitiveUserLastNameContains (string) – See insensitiveUserLastNameContains from Search criteria.
insensitiveUserLastNameEquals (string) – See insensitiveUserLastNameEquals from Search criteria.
insensitiveEmailAddressStarts (string) – See insensitiveEmailAddressStarts from Search criteria.
insensitiveEmailAddressContains (string) – See insensitiveEmailAddressContains from Search criteria.
insensitiveEmailAddressEquals (string) – See insensitiveEmailAddressEquals from Search criteria.
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "local_users": { [ { "username": "ApioSupportTest@sip.netaxis.be", "firstName": "Firstcustomer", "lastName": "Lastcustomer", "emailAddress": "customer@test.netaxis.be", "language": "English", "userType": "reseller", "accessType": 3, "userLevel": 16, "readOnly": false } ] } }
- Response JSON Object:
local_users (array) – A list of Local Users. See Local User Detail Attributes.
- Status Codes:
200 OK – no error
Retrieve Local User instance¶
-
GET
/api/v1/local/apio_users/
(string: username)/
¶ Retrieve a Local User instance.
Example request:
GET /api/v1/local/apio_users/ApioSupportTest@sip.netaxis.be/ HTTP/1.1 Host: example.com
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" { "username": "ApioSupportTest@sip.netaxis.be", "firstName": "Firstcustomer", "lastName": "Lastcustomer", "emailAddress": "customer@test.netaxis.be", "language": "English", "userType": "reseller", "accessType": 3, "userLevel": 16, "readOnly": false }
- Response JSON Object:
username (string) – see username from Local User Detail Attributes.
firstName (string) – see firstName from Local User Detail Attributes.
lastName (string) – see lastName from Local User Detail Attributes.
emailAddress (string) – see emailAddress from Local User Detail Attributes.
language (string) – see language from Local User Detail Attributes.
userType (string) – see userType from Local User Detail Attributes.
accessType (string) – see accTs_type from Local User Detail Attributes.
userLevel (string) – see userLevel from Local User Detail Attributes.
readOnly (string) – see readOnly from Local User Detail Attributes.
userProfileType (string) – see userProfileType from Local User Detail Attributes.
resellerId (string) – see resellerId from Local User Detail Attributes.
- Status Codes:
200 OK – no error
400 Bad Request – failed
404 Not Found – not found
Create a Local User¶
-
POST
/api/v1/local/apio_users/
¶ Create a Local User instance.
Example request:
POST /api/v1/local/apio_users/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "username": "ApioSupportTest@sip.netaxis.be", "firstName": "Firstcustomer", "lastName": "Lastcustomer", "emailAddress": "customer@test.netaxis.be", "language": "English", "userType": "reseller" }
- Request JSON Object:
username (string) – see username from Local User Detail Attributes.
firstName (string) – see firstName from Local User Detail Attributes.
lastName (string) – see lastName from Local User Detail Attributes.
password (string) – see password from Local User Detail Attributes.
confirmPassword (string) – see confirmPassword from Local User Detail Attributes.
emailAddress (string) – see emailAddress from Local User Detail Attributes.
language (string) – see language from Local User Detail Attributes.
userType (string) – see userType from Local User Detail Attributes.
userProfileType (string) – see userProfileType from Local User Detail Attributes.
resellerId (string) – see resellerId from Local User Detail Attributes.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
201 Created – created
400 Bad Request – failed to create
Update a Local User¶
-
PUT
/api/v1/local/apio_users/
(string: username)/
¶ Update a Local User instance.
Example request:
PUT /api/v1/local/apio_users/ApioSupportTest@sip.netaxis.be/ HTTP/1.1 Host: example.com Content-Type: "application/json" { "firstName": "Apio Customer", "lastName": "Support", "password": "ChangeMe", "confirmPassword": "ChangeMe", "emailAddress": "test_customer@test.netaxis.be", "language": "English", }
- Request JSON Object:
firstName (string) – see firstName from Local User Detail Attributes.
lastName (string) – see lastName from Local User Detail Attributes.
password (string) – see password from Local User Detail Attributes.
confirmPassword (string) – see confirmPassword from Local User Detail Attributes.
emailAddress (string) – see emailAddress from Local User Detail Attributes.
language (string) – see language from Local User Detail Attributes.
userType (string) – see userType from Local User Detail Attributes.
userProfileType (string) – see userProfileType from Local User Detail Attributes.
resellerId (string) – see resellerId from Local User Detail Attributes.
Example response:
- Response:
Similar to GET instance method response.
- Status Codes:
200 OK – instance updated
400 Bad Request – failed to update
Delete a Local User¶
-
DELETE
/api/v1/local/apio_users/
(string: username)/
¶ Delete a Local User instance.
Example request:
DELETE /api/v1/local/apio_users/ApioSupportTest@sip.netaxis.be/ HTTP/1.1 Host: example.com Content-Type: "application/json" {}
Example response:
HTTP/1.1 200 OK Content-Type: "application/json" {}
- Status Codes:
200 OK – instance deleted
Configuration Information for User Types¶
The APIO behaviour is controlled by the following settings:
"LOCAL_USERS_LOGIN_TYPES": [1, 2]
Originally this API was only allowing to access (GET, PUR , DELETE) to Local Users, meaning users present in APIO DB and with a login mode “local dedicated” or “local shared”).
Ity has been decided to extend this API to allow to manage more types, meaning also the cased users for server access and sso.
The allowed values are:
0: SERVER_LOGIN (Login credentials are validated by the Main NE)
1: LOCAL_LOGIN_SHARED (Login credentials are validated by the APIO and shared credentials are used towards the Main NE)
2: LOCAL_LOGIN_DEDICATED (Login credentials are validated by the APIO and dedicated credentials are used towards the Main NE)
3: SSO_LOGIN_DEDICATED (Login credentials are validated by a SSO server and dedicated credentials are used towards the Main NE)
Configuration Information for Create/Modify a Local 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
- 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 tru, 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.
Local User Detail Attributes¶
Name |
Type |
Methods |
Description |
||
---|---|---|---|---|---|
GET |
POST |
PUT |
|||
username |
String |
A |
R |
F |
The local user’s username. |
firstName |
String |
A |
O |
O |
The local user’s first name. |
lastName |
String |
A |
O |
O |
The local user’s last name. |
emailAddress |
String |
A |
R |
O |
The local user’s email. |
language |
String |
A |
R |
O |
The local user’s preferred language. |
language_code |
String |
O |
F |
F |
The associated language code. See Language and language code. |
password |
String |
N |
O |
O |
The local user’s password. |
confirmPassword |
String |
N |
C |
C |
The local user’s confirmation password. Conditionally required if password is provided. |
userType |
String |
O |
C |
F |
The local user’s type. See User Types. In a GET i is only present if the user matches one of the user types defined |
accessType |
Integer |
A |
F |
F |
Only for info. The local user’s access type. See User Access Types. |
userLevel |
Integer |
A |
F |
F |
Only for info. The local user’s user level. See User Levels. |
readOnly |
Boolean |
A |
F |
F |
Only for info. The local user’s read only state. |
userProfileName |
String |
C |
C |
F |
The Reference User Profile of this user The values are dynamically defined using APIO admin web interface (by Netaxis) |
resellerId |
String |
C |
C |
C |
The resellerId (only relevant if the accessType is ‘Restricted’) |
role |
String |
O |
O |
O |
An optional role for the admin. No logic associated in the APIO itself. |
The usage of the ‘userProfileName’ is the recommanded way of working as it is the most generic one (any Reference User Profile can be created) . However the ‘userType’ can be used when wanting to use only similar types to the ones defined in the legacy solution (PIE).
At least of the 2 ‘userType’ or ‘userProfileName’ must be present. If both are present ‘userType’ will be used (for backward compatibility reason).
User Types¶
Value |
Type |
Description |
---|---|---|
enduser |
String |
Indicates a Enduser user type. |
customer_administrator |
String |
Indicates a Customer Administrator user type. |
customer_support |
String |
Indicates a Customer Support user type. |
super_customer_support |
String |
Indicates a Super Customer Support user type. |
screener |
String |
Indicates a Screener user type. |
reseller |
String |
Indicates a Reseller user type. |
User Access Types¶
Name |
Type |
Value |
Description |
---|---|---|---|
Normal |
Integer |
0 |
Indicates a Normal User. |
Restricted |
Integer |
1 |
Usually indicate a reseller: it can manage only a restricted sub-set of the objects at his regular level. |
Multi |
Integer |
2 |
For Future Use |
Super |
Integer |
3 |
A Super User is a Normal User but that has some additional super rights (such as manipulating APIO data). |
User Levels¶
Name |
Type |
Value |
---|---|---|
End User |
Integer |
0 |
Group Department Admin |
Integer |
4 |
Group Admin |
Integer |
8 |
Tenant Admin |
Integer |
12 |
System Admin |
Integer |
16 |