users

Summary

Resource Operation Description
Users POST /api/app/v1/sys/user/authentication Authenticate user
  GET /api/app/v1/sys/user/authorization Authorize user
  POST /api/app/v1/sys/user/create Create user
  DELETE /api/app/v1/sys/user/delete Delete user
  GET /api/app/v1/sys/user/get Get user info
  PUT /api/app/v1/sys/user/set Set user attributes

Details

POST /api/app/v1/sys/user/authentication

Authenticate a user account by verifying that the account exists and the correct password is supplied.

New in version 1.0.

Form Parameters:
 
  • required username – The username of the account to authenticate
  • required password – Password of the user
Status Codes:

Example 1 - Request: Authenticate user:

POST /api/app/v1/sys/user/authenticate HTTP/1.1
Accept: application/x-www-form-urlencoded

username=user
password=pass

Example 1 - Response: Authenticate user:

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

{
  "Status": true
}
GET /api/app/v1/sys/user/authorization

Get user account authorization.

New in version 1.0.

Query Parameters:
 
  • username (required) – The username for the account to authorize
Status Codes:

Example 1 - Request: Get user authorization:

GET /api/app/v1/sys/user/authorization?username=megger HTTP/1.1
Accept: text/html

Example 1 - Response: Get user authorization:

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

{
  "group": [
    "admin"
  ]
}
POST /api/app/v1/sys/user/create

Create a user account on the appliance.

New in version 1.0.

Query Parameters:
 
  • username (required) – The username for the account to create
  • level (required) – The account authorization level (admin, audit)
  • status (optional) – The account status (enabled, disabled), if omitted default to disabled
Status Codes:
Accepted Authorization:
 

super-admin

Example 1 - Request: Create user:

POST /api/app/v1/sys/user/create?username=user&auth_level=audit& status=enabled HTTP/1.1
Accept: text/html

Example 1 - Response: Create user:

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

{
  "Status": "Success"
}
DELETE /api/app/v1/sys/user/delete

Delete a user account.

New in version 1.0.

Query Parameters:
 
  • username (required) – The username for the account to delete
  • force (optional) – set to ‘True’ to force deletion of user and any certificates
Status Codes:
Accepted Authorization:
 

super-admin

Example 1 - Request: Delete user:

DELETE /api/app/v1/sys/user/delete?username=myuser HTTP/1.1
Accept: application/json

Example 1 - Response: Delete user:

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

{
  "Status": "Success"
}

Example 2 - Request: Delete user with force=True so user and any associated certificates are deleted:

DELETE /api/app/v1/sys/user/delete?username=myuser&force=True HTTP/1.1
Accept: application/json

Example 1 - Response: Delete user with force=True so user and any associated certifcates are deleted:

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

{
  "Status": "Success"
}
GET /api/app/v1/sys/user/get

Get user information.

New in version 1.0.

Query Parameters:
 
  • username (optional) – The username of the user to view information about, if omitted view all users
Status Codes:
Accepted Authorization:
 

admin

Example 1 - Request: Get all user information:

GET /api/app/v1/sys/user/get?username=myuser HTTP/1.1
Accept: application/json

Example 1 - Response: Get all user information:

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

{
  "users": [
    {
      "authz": [
        {
          "level": "admin",
          "location": "local",
          "status": "enabled"
        }
      ],
      "name": "megger",
      "passwordHash": "$6$CTIrtS73.94N2H6F$Y7hsf5zhDE1qxSNN8U0aAjJ4nx5fccWyPw89i6oex.eXz5dQRmb1gfUVZK7O4ZVGubZaJx772pJszPoeY.Urf/"
    }
  ]
}
PUT /api/app/v1/sys/user/set

Set user account attributes.

Note

Be sure to check appliance documentation for password complexity requirements.

New in version 1.0.

Query Parameters:
 
  • username (required) – The username for the account to modify
  • level (optional) – The account authorization level (admin, audit)
  • status (optional) – The account status (enabled, disabled)
  • password (optional) – The password for the account
Status Codes:
Accepted Authorization:
 

super-admin

Example 1 - Request: Set user attributes:

PUT /api/app/v1/sys/user/set?username=<USERNAME>&auth_level=admin&status=enabled&password=<PASSWORD>HTTP/1.1
Accept: text/html

Example 1 - Response: Set user attributes:

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

{
  "Status": "Success"
}