View a User
Only users with administrator privileges can use the accounts API.
Syntax
Operation | URI |
---|---|
Get a user by name | GET /api/v3/user/by-name/{name} |
Get a user by id | GET /api/v3/user/{id} |
Response Output
Dremio user output in JSON{
"id": String [immutable, generated by Dremio],
"name": String
}
Name | Type | Description |
---|---|---|
id | String | User ID. Generated by Dremio, immutable. |
name | String | Name of the user. |
Response Codes
403
- user does not have permission (has to be an administrator).
404
- user could not be found.
Example: Get user information
In the following examples, a Dremio Admin retrieves the user information by their username, cdarling and by their ID.
Curl Request
Example request by usernamecurl -X GET \
http://localhost:9047/api/v3/user/by-name/cdarling \
-H "Content-Type: application/json" \
-H "Authorization: _dremiohs85l11k2mh0b10l51ett9fsca"
Alternatively, you can access the user information by the user ID.
Example request by user IDcurl -X GET \
http://localhost:9047/api/v3/user/6be1a04a-f0bb-4ea8-a4f3-f86bf5e02bec \
-H "Content-Type: application/json" \
-H "Authorization: _dremiomn9i63s3r6sokad6hoif2j7730"
Response
The response body includes the username and their user ID.
Response body{
"id": "6be1a04a-f0bb-4ea8-a4f3-f86bf5e02bec",
"name": "cdarling"
}
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.