Update a User

Version Requirement:

This functionality is for Dremio v18.0+ Enterprise Edition only.

This API updates the information of a local user (first name and last name) and the roles that it belongs to.

Endpoint Syntax

PUT /api/v3/user/{id}

Required Privileges

All users executing this Rest API must have the MANAGE GRANTS privilege assigned to receive a response output.

Response Input

{
 "id": "aaf2dc39-8c95-450b-a542-2e0192ea7150",
 "name": "test_user",
 "firstName": "new",
 "lastName": "name",
 "tag": "UmGtb/FB3LI=",
 "roles": [
   {
     "id": "1bce89d1-1b39-4717-bf1f-bfb0d9653146",
     "name": "PUBLIC",
     "type": "SYSTEM"
   }
 ],
 "type": "LOCAL"
}

Response Output

This is the standard response output for the API.

{
  "@type": "EnterpriseUser",
  "id": "aaf2dc39-8c95-450b-a542-2e0192ea7150",
  "name": "test_user",
  "firstName": "new",
  "lastName": "name",
  "tag": "mXlDbMf6+Zk=",
  "roles": [
    {
      "id": "1bce89d1-1b39-4717-bf1f-bfb0d9653146",
      "name": "PUBLIC",
      "type": "SYSTEM"
    }
  ],
  "type": "LOCAL"
}

Response Codes

  • 200 - Success.
  • 400 - Invalid request or duplicate user name.
  • 403 - The user executing the API request lacks the MANAGE GRANTS permission.

Example

curl -X PUT --location "http://automaster.drem.io:9047/api/v3/user/aaf2dc39-8c95-450b-a542-2e0192ea7150" \
    -H "Authorization: _dremiopu2916f7aph06aahv4ksu4life" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d "{
          \"id\": \"aaf2dc39-8c95-450b-a542-2e0192ea7150\",
          \"name\": \"test_user\",
          \"firstName\": \"new\",
          \"lastName\": \"name\",
          \"tag\": \"INGVQicRdPs=\",
          \"roles\": [
            {
              \"id\": \"1bce89d1-1b39-4717-bf1f-bfb0d9653146\",
              \"name\": \"PUBLIC\",
              \"type\": \"SYSTEM\"
            }
          ]
        }"