Dremio user creation from backend

I want to use the API and it needs the username and password. How do I create those?

@lyashninan, you can GET the user. For example:

GET /api/v3/user/by-name/robert
… returns:

{
  "id": "6f8cd0a2-c23d-41d7-9fed-06304fdf3005",
  "name": "robert",
  "firstName": "Robert",
  "lastName": "Fripp",
  "email": "fripp@email.com",
  "tag": "vraQCFiipCI="
}

Then update their account with a PUT (note that you have to be an Admin to change the password) and a new password:

PUT /api/v3/user/6f8cd0a2-c23d-41d7-9fed-06304fdf3005
    {
      "name": "robert",
      "firstName": "Robert",
      "lastName": "Fripp",
      "email": "fripp@email.com",
      "password": "new-password-123",
      "tag": "vraQCFiipCI="
    }

@ben - Can I create the first user as an admin user well from the API?

@lyashninan, yes:

POST /api/v3/user
    {
      "firstName": "Some",
      "lastName": "User",
      "name": "some.user",
      "email": "user@email.com",
      "password": "user-123"
    }

It’s available for all the users as well right? Being new to this so just asking the basics of the stuffs. Thanks in advance @ben

Creation and deletion of users is only available to the Admin users. If you are non-admin, you should get “permission denied” or something similar if you try to use these endpoints.

I have just installed the dremio and there are no users created and I want to create one user with which i can do the API requests. How will I create my first user? Can I use the POST of the user?

The first user you create will be an Admin user. This user will be able to do the API calls I describe.

Thanks ben. I have created the user and its a admin user too.(I can see “admin”: true, in my login API response) But after I pass the token value(“token”: “32jhne9qpvi2c64aqkgl9eip88”,) which I get after hitting the login API as the header for the get user I am getting 401 in the response. That’s the correct value for the “Authorization” key which is required to be passed in the header right? or Am i missing something else too?

The Authorization token should be prefixed with _dremio. So in the example you gave, it would be _dremio32jhne9qpvi2c64aqkgl9eip88