> For the complete documentation index, see [llms.txt](https://docs.redivis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redivis.com/api/client-libraries/redivis-r/reference/user.md).

# 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="/api/client-libraries/redivis-r/reference/redivis/redivisusduser.md"><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="/api/client-libraries/redivis-r/reference/user/userusddataset.md"><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="/api/client-libraries/redivis-r/reference/user/userusdlist_datasets.md"><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="/api/client-libraries/redivis-r/reference/user/userusdlist_workflows.md"><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="/api/client-libraries/redivis-r/reference/user/userusdsecret.md"><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="/api/client-libraries/redivis-r/reference/user/userusdworkflow.md"><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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.redivis.com/api/client-libraries/redivis-r/reference/user.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
