On this page

    View a User

    This API retrieves a specific user’s information.

    Only users with administrator privileges can use the accounts API.

    Note:

    You must enable Personal Access Tokens to successfully call this API.

    Syntax

    OperationURI
    Get a user by nameGET /api/v3/user/by-name/{name}
    Get a user by idGET /api/v3/user/{id}

    Response Output

    Dremio user output in JSON:

    {
      "id": String [immutable, generated by Dremio],
      "name": String
    }
    
    NameTypeDescription
    idStringUser ID. Generated by Dremio, immutable.
    nameStringName 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

    curl -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.

    curl -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.

    {
      "id": "6be1a04a-f0bb-4ea8-a4f3-f86bf5e02bec",
      "name": "cdarling"
    }