users¶
Summary¶
Resource |
Operation |
Description |
|---|---|---|
Users |
Authenticate user |
|
Authorize user |
||
Create user |
||
Delete user |
||
Get user info |
||
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:
200 OK – Success
400 Bad Request – Bad Request - invalid parameters
401 Unauthorized – Access Denied
500 Internal Server Error – Internal Server Error
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:
200 OK – Success - user authorization
400 Bad Request – Bad Request - invalid parameters, username
401 Unauthorized – Access Denied
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:
200 OK – Success - user created
400 Bad Request – Bad Request - invalid parameters
401 Unauthorized – Access Denied
409 Conflict – Conflict - user already exists
422 Unprocessable Entity – Unprocessable Entity - invalid user data
500 Internal Server Error – Internal Server Error - invalid parameter
- 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:
200 OK – Success - user deleted
400 Bad Request – Bad Request - invalid parameters
401 Unauthorized – Access Denied
404 Not Found – Not Found - user doesn’t exist
500 Internal Server Error – Internal Server Error
- 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:
200 OK – Success - user list
400 Bad Request – Bad Request - invalid parameters
401 Unauthorized – Access Denied
500 Internal Server Error – Internal Server Error
- Accepted Authorization:
admin
Example 1 - Request: Get all user information:
DELETE /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:
200 OK – Success - user updated
400 Bad Request – Bad Request - invalid parameters
401 Unauthorized – Access Denied
404 Not Found – Not Found - user doesn’t exist
422 Unprocessable Entity – Unprocessable Entity - invalid user data
500 Internal Server Error – Internal Server Error
- 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" }