Edit User Details
Allows updating user details, including roles, permissions, and authentication type. Requires admin permissions to run this API.
Note: To edit a user's password, use the Change User Password endpoint (PUT /api/v1/users/changePassword).
Note: See Manage users and roles in AFA to better understand the request parameters.
Resource name: /api/v1/users
Request Method: PUT
Request parameters
| Parameter | Type | Description |
|---|---|---|
|
userName mandatory |
string | Username for the new user |
|
fullName mandatory |
string | Full name of the user |
|
mandatory |
string | Email address of the user |
| notes | string | Notes for the user |
| roles | array | Roles assigned to the user |
| authenticationType | string | Type of authentication (local, radius, ldap). Default: local. |
| administrator | string | Administrator permissions (yes or no) |
| landingPage | string |
Default landing page. Valid values are: afa, aff, abf, automatic. Default: automatic. |
| fireflowAdmin | string | FireFlow admin privileges (yes or no) |
| enableAnalysisFromFile | string | Enable analysis from file (yes or no). Default: yes. |
| enableGlobalTrustTraffic | string | Enable global trust traffic (yes or no). Default: yes. |
| emailNotifications | object | |
| risk | string | Receive risk notifications (yes or no). Default: no. |
| policy | string | Receive policy notifications (yes or no). Default: no. |
| groupReport | string | Receive group report notifications (yes or no) |
| allReports | string | Receive all reports (yes or no) |
| configurationChanges | string | Receive configuration change notifications (yes or no) |
| objectExpiration | string | Receive object expiration notifications (yes or no). Default: no. |
| errors | string | Receive error notifications (yes or no). Default: no. |
| customizations | string | Receive customizations notifications (yes or no). Default: no. |
| hideDetails | string | Hide details in notifications (yes or no). Default: no. |
| authorizedViewsAndActions | object | Authorized views and actions settings. |
| reportAll | string | Access to all reports (yes or no). Default: yes. |
| reportRisks | string | Access to risk reports (yes or no). Default: no. |
| reportChanges | string | Access to change reports (yes or no). Default: no. |
| reportOptimize | string | Access to optimization reports (yes or no). Default: no. |
| reportVpn | string | Access to VPN reports (yes or no). Default: no. |
| reportCompliance | string | Access to compliance reports (yes or no). Default: no. |
| reportBaseline | string | Access to baseline reports (yes or no). Default: no. |
| reportExplore | string | Access to explore reports (yes or no). Default: no. |
| reportConfig | string | Access to configuration and logs (yes or no). Default: no. |
| actionViews | string | Access to all home views (yes or no). Default: yes. |
| actionMap | string | Access to Map view (yes or no). Default: no. |
| actionMonitor | string | Access to changes view (yes or no). Default: no. |
| artPermission | string | Access to view and edit reporting tool dashboard (yes or no). Default: yes. |
| actionAll | string | Permissions to execute all actions (yes or no) |
| actionAnalyze | string | Analyze actions permissions (yes or no). Default: no. |
| actionQuery | string | Query actions permissions (yes or no). Default: no. |
| actionTrusted | string | Trusted actions permissions (yes or no). Default: no. |
| actionTopology | string | Topology actions permissions (yes or no). Default: no. |
| actionCompare | string | Compare actions permissions (yes or no). Default: no. |
| actionDelete | string | Delete actions permissions (yes or no) |
| actionDocumentation | string | Documentation actions permissions (yes or no). Default: no. |
| firewallProfile | string | Default permission profile |
|
authorizedDevices mandatory |
object | Authorized devices |
| id | string | Device ID |
| displayName | string | Display name of the device |
| profile | string | Authorization profile for the device. Valid values are: Standard, ReadOnly, None. Default: Standard. |
| notification | string | Receive notifications for this device (yes or no). Default: yes. |
Request example
Copy{
"userName": "newuser",
"fullName": "algo test",
"email": "[email protected]",
"notes": "example note",
"roles": [],
"authenticationType": "local",
"administrator": "no",
"landingPage": "afa",
"fireflowAdmin": "no",
"enableAnalysisFromFile": "no",
"enableGlobalTrustTraffic": "no",
"emailNotifications": {
"risk": "no",
"policy": "no",
"groupReport": "no",
"allReports": "yes",
"configurationChanges": "yes",
"objectExpiration": "no",
"errors": "no",
"customizations": "no",
"hideDetails": "no"
},
"authorizedViewsAndActions": {
"reportAll": "yes",
"reportRisks": "no",
"reportChanges": "no",
"reportOptimize": "no",
"reportVpn": "no",
"reportCompliance": "no",
"reportBaseline": "no",
"reportExplore": "no",
"reportConfig": "no",
"actionViews": "yes",
"actionMap": "no",
"actionMonitor": "no",
"artPermission": "yes",
"actionAll": "yes",
"actionAnalyze": "no",
"actionQuery": "no",
"actionTrusted": "no",
"actionTopology": "no",
"actionCompare": "no",
"actionDelete": "no",
"actionDocumentation": "no"
},
"firewallProfile": "Standard",
"authorizedDevices": [
{
"id": "ALL_FIREWALLS",
"profile": "Standard",
"notification": "yes"
}
]
}
cURL Example
Copycurl -X PUT "https://<localhost>/api/v1/users" -H "Content-Type: application/json" -d '{
"userName": "algotest",
"email": "[email protected]",
"roles": ["admin","viewer"],
"authenticationType": "local",
"administrator": "no",
"authorizedDevices": [
{"displayName":"device123",
"id":"device123",
"notification":"yes",
"profile":"Standard"}
]
}'
Status codes
|
Code |
Description |
|---|---|
|
200 |
OK - User details updated successfully. |
|
400 |
Bad Request - Invalid input parameters. |
|
401 |
Unauthorized - Authentication failed. |
|
403 |
Forbidden - User does not have permission. |
|
404 |
Not Found - User does not exist. |
|
500 |
Internal Server Error - Something went wrong. |
Response parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
successUsers |
array of object |
List of users successfully processed. |
|
username |
string |
Username of the successfully processed user. |
|
|
string |
Email address of the successfully processed user. |
|
status |
string |
Overall result status of the request (e.g., "OK"). |
| errorDetails | object | Details of any errors encountered. |
| description | string | Detailed message describing the error. |
| error | string | Error type or code. |
| fieldErrors | array | List of specific field validation errors. |
| error | string | Specific error message related to the field. |
| field | string | The field that caused the error. |
Response example success 200
Copy{
"successUsers": [
{
"username": "newuser",
"email": "[email protected]"
}
],
"status": "OK"
}
Response example failure 400
Copy{
"status": "Failure",
"errorDetails": {
"description": "Invalid input parameter",
"fieldErrors": [
{
"error": "Invalid email format",
"field": "email"
}
]
}
}