Reseller Admins

It must be noted that Reseller Admins are special cases of APIO Local Users, and therefore the APIs are quite similar.

Retrieve Reseller Admins list

GET /api/v1/local/resellers/(string: reseller_name)/admins/

Retrieve the Administrators of a Reseller.

Authorization rights: a normal System Admin has full access, a System Reseller Admin has only access to all Reseller Admins of his Reseller, a Tenant Reseller Admin has only access to all Reseller Admins of his Reseller and linked to his Tenant.

Example request:

GET /api/v1/local/resellers/MyReseller/admins/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
  "admins": [
      {
          "username": "existing_reseller",
          "firstName": "FirstReseller",
          "lastName": "LastReseller",
          "emailAddress": "apio_super_customer_test@sip.netaxis.be",
          "language": "English",
          "readOnly": False,
          "userLevel": 12,
          "userProfileType": "teant_reseller",
          "resellerId": "MyReseller",
          "tenantId": "ApioTenant"
      },
      {
          "username": "reseller_1_admin_1",
          "firstName": "admin_1",
          "lastName": "udpated",
          "emailAddress": "",
          "language": "English",
          "readOnly": False,
          "userLevel": 16,
          "userProfileType": "system_reseller",
          "resellerId": "MyReseller"
      }
  ]
}
Response JSON Object:
Status Codes:

Create a Reseller Admin

POST /api/v1/local/resellers/(string: reseller_name)/admins/

Create a new Administrators for a Reseller.

Note: if the new Administrator is of level Tenant Admin it will be created in the AS too.

Authorization rights: a normal System Admin has full access, a System Reseller Admin can only create new Reseller Admins in his Reseller, a Tenant Reseller Admin can only create new Reseller Admins in his Reseller and his Tenant

Example request:

POST /api/v1/local/resellers/MyReseller/admins/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "username": "reseller_1_admin_1",
   "firstName": "admin_1",
   "lastName": "reseller_1",
   "language": "English",
   "userProfileType": "system_reseller"
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Retrieve a Reseller Admin

GET /api/v1/local/resellers/(string: reseller_name)/admins/(string: username)/

Retrieve the profile of a Administrator of a Reseller.

Authorization rights: a normal System Admin has full access, a System Reseller Admin has only access to all Reseller Admins of his Reseller, a Tenant Reseller Admin has only access to all Reseller Admins of his Reseller and linked to his Tenant.

Example request:

GET /api/v1/local/resellers/MyReseller/admins/reseller_1_admin_1/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
  "username": "reseller_1_admin_1",
  "firstName": "admin_1",
  "lastName": "udpated",
  "emailAddress": "",
  "language": "English",
  "readOnly": False,
  "userLevel": 16,
  "userProfileType": "system_reseller",
  "resellerId": "MyReseller",
  "language_code": "en"
}
Response JSON Object:

Modify a Reseller Admin

PUT /api/v1/local/resellers/(string: reseller_name)/admins/(string: username)/

Modify the profile of a Administrator of a Reseller.

Authorization rights: a normal System Admin has full access, a System Reseller Admin can only modify Reseller Admins of his Reseller, a Tenant Reseller Admin can only modify Reseller Admins of his Reseller and linked to his Tenant.

Example request:

PUT /api/v1/local/resellers/MyReseller/admins/reseller_1_admin_1/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "firstName": "admin_1",
   "lastName": "hello",
   "language": "French",
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Delete a Reseller Admin

DELETE /api/v1/local/resellers/(string: reseller_name)/admins/(string: username)/

Delete a Administrator of a Reseller.

Authorization rights: a normal System Admin has full access, a System Reseller Admin can only delete Reseller Admins of his Reseller, a Tenant Reseller Admin can only delete Reseller Admins of his Reseller and linked to his Tenant.

Example request:

DELETE /api/v1/local/resellers/MyReseller/admins/reseller_1_admin_1/ 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

  • 400 Bad Request

    failed to delete. This is usually due to following error:

    • 15: CANNOT_DELETE_YOURSELF, “Cannot delete yourself”

Reseller Admin Attributes

Name

Type

Methods

Description

GET

POST

PUT

username

String

A

R

F

The reseller admin’s username.

userProfileType

String

C

R

O

The User Profile Type of this reseller admin The configured values and description can be retrieved via User Profiles Types

firstName

String

A

O

O

The reseller admin’s first name.

lastName

String

A

O

O

The reseller admin’s last name.

emailAddress

String

A

O

O

The reseller admin’s email.

language

String

A

O

O

The reseller admin’s preferred language.

language_code

String

O

F

F

The associated language code. See Language and language code.

password

String

N

O

O

The reseller admin’s password.

accessType

Integer

A

F

F

The reseller admin’s access type. See User Access Types.

userLevel

Integer

A

F

F

The reseller admin’s user level. See User Levels.

readOnly

Boolean

A

F

F

The reseller admin’s read only state.

resellerId

String

A

F

F

The Reseller Id

tenantId

String

C

C

F

The Tenant Id if the Reseller Admin is of level Tenant Admin.

role

String

O

O

O

An optional role for the admin. No logic associated in the APIO itself.

Configuration Information for Create/Modify a Reseller Admin

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.