Updating a user

POST https://{{base_url}}/v6/users/{{uid}}/update.json

Updating a user

Modifies a user. This can include changing the user’s name, email address, account group assignments, or roles. Use of this endpoint requires the Edit users in all account groups or Edit users permission.

Optional (querystring) Parameters

  • format=json|xml optional, specifies the format of output requested. See Output Formats for more information
  • aid={aid} optional, changes the account group context of the current request. If an invalid account group ID is specified as a parameter, the response will come back as an HTTP/400 error

Request

  • uid={uid} is the unique user ID for the user
  • content-type and accept headers must be set (both to application/json) when using this endpoint.
  • Request body allows update of certain user fields:
    • name string required the name of the user
    • email string required email address for the user
    • loginAccountGroup accountGroup object required login accountGroup for the user
    • loginAccountGroup.aid integer required for loginAccountGroup object system-generated unique ID of the account group
    • accountGroupRoles list of accountGroupRole objects optional see below
    • accountGroupRoles.accountGroupName.aid integer required for accountGroupName object unique account ID for the accountGroup
    • accountGroupRoles.roles.roleID integer required for roles object system-defined unique ID of the role
    • allAccountGroupRoles list of roles objects optional see below
    • allAccountGroupRoles.roles.roleID integer required for roles object system-defined unique ID of the role

A few notes on the topic of user modifications: * If a user’s email is updated, the user will need to validate the username change before being able to subsequently log in, or execute API operations. * Any update which contains accountGroupRoles is a replace-based update, rather than a delta-based update.

Request Body

{"name"=>"Postman DevNet User Updated", "email"=>"postman+devnet@cisco.com", "loginAccountGroup"=>{"aid"=>691}, "accountGroupRoles"=>[{"accountGroup"=>{"aid"=>315}, "roles"=>[{"roleId"=>57}]}, {"accountGroup"=>{"aid"=>691}, "roles"=>[{"roleId"=>60}]}], "allAccountGroupRoles"=>[{"roleId"=>1140}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring