# User

## *class* <mark style="color:purple;">User</mark>

Used to list and reference resources (e.g., datasets, workflows) owned by a particular user. If referencing resources owned by another user, you will only be able to see entities that you have access to.

## Constructors

<table data-header-hidden><thead><tr><th width="342">Method</th><th>Description</th></tr></thead><tbody><tr><td><a href="redivis/redivisusduser"><strong><code>redivis$user</code></strong></a>(user_name)</td><td>Construct a reference to a user based on their (case-insensitive) username.</td></tr></tbody></table>

## Examples

{% tabs %}
{% tab title="Basics" %}

```python
library("redivis")

user <- redivis$user("imathews")

# List all datasets
datasets = user$list_datasets()

# Create a reference to a specific dataset
dataset = user$dataset("test_dataset")
```

{% endtab %}
{% endtabs %}

## Methods

<table data-header-hidden><thead><tr><th width="421">Name</th><th>Description</th></tr></thead><tbody><tr><td><a href="user/userusddataset"><strong><code>user$dataset</code></strong></a>(dataset_name[, ...])</td><td>Construct a reference to a dataset owned by the user.</td></tr><tr><td><a href="user/userusdlist_datasets"><strong><code>user$list_datasets</code></strong></a>([max_results])</td><td>List all visible datasets owned by the user.</td></tr><tr><td><a href="user/userusdlist_workflows"><strong><code>user$list_workflows</code></strong></a>([max_results])</td><td>List all visible workflows owned by the user.</td></tr><tr><td><a href="user/userusdsecret"><strong><code>user$secret</code></strong></a>(name)</td><td>Create a reference to a secret defined by the user.</td></tr><tr><td><a href="user/userusdworkflow"><strong><code>user$workflow</code></strong></a>(workflow_name)</td><td>Construct a reference to a workflow owned by the user.</td></tr></tbody></table>
