> 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-js/reference/redivis/redivis.config.md).

# redivis.config

### redivis.<mark style="color:purple;">config</mark>(*\[options]*) → `object`

Sets library-wide defaults, and returns the current configuration. Values that haven't been set fall back to their [environment variables](https://docs.redivis.com/api/client-libraries/redivis-js/reference.md#environment-variables) (in Node.js). Pass `null` to clear a previously set value.

Options passed directly to a method (e.g., `table.toArrowTable({ maxParallelization: 2 })`) always take precedence over the configuration.

```javascript
redivis.config({ defaultWorkflow: 'jane.my_workflow' });

const table = redivis.table('output_table'); // Within jane.my_workflow
const rows = await redivis.query('SELECT * FROM output_table LIMIT 10').toRowsArray();
```

**Parameters:**

**`options.defaultWorkflow`** : *string | Workflow | null*\
The workflow (`owner.workflow`) within which unqualified table, query, parameter, transform, notebook, and datasource references are resolved.

**`options.defaultDataset`** : *string | Dataset | null*\
The dataset (`owner.dataset`) within which unqualified table and query references are resolved, when there's no default workflow.

**`options.defaultUser`** : *string | User | null*\
The owner of unqualified dataset and workflow references.

**`options.defaultOrganization`** : *string | Organization | null*\
The owner of unqualified dataset and workflow references, when there's no default user.

**`options.apiEndpoint`** : *string | null*\
The base URL of the Redivis API. Defaults to `https://redivis.com/api/v1`.

**`options.configDir`** : *string | null*\
The directory in which credentials are cached after logging in, in Node.js. Defaults to `~/.redivis`. Credentials for redivis.com are cached directly in this directory, and those for any other API endpoint in a subdirectory for its host (e.g., `environments/localhost_8080/`). Changing it loads any credentials cached in the new directory.

**`options.maxParallelization`** : *number | null*\
The default for the `maxParallelization` option of methods that read data, upload files, or download files. When not set, each method uses its own default. Reads are always limited to at most 8 parallel streams.

Invalid values throw a [`ValueError`](https://docs.redivis.com/api/client-libraries/redivis-js/reference/redivis/redivis.errors.md), and no settings are changed.

**Returns:** `{ defaultWorkflow?, defaultDataset?, defaultUser?, defaultOrganization?, apiEndpoint, configDir?, maxParallelization? }`, the current configuration.


---

# 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-js/reference/redivis/redivis.config.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.
