> 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/parameter.md).

# Parameter

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

Parameters are named lists of values within a [workflow](https://docs.redivis.com/api/client-libraries/redivis-js/reference/workflow.md), which can be referenced in the workflow's transforms (e.g., to filter data). Various methods allow you to create, update, and delete parameters, and to read their values.

## Constructors

| Method                                                                                                                                                 | Description                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**`redivis.parameter`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/redivis/redivis.parameter.md)(name\[, options])           | Return a Parameter within the [default workflow](https://docs.redivis.com/api/client-libraries/redivis-js/reference.md#environment-variables), or given its fully qualified reference (`owner.workflow.parameter`). |
| [**`Workflow.parameter`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/workflow/workflow.parameter.md)(name)                    | Return a Parameter within a specific [workflow](https://docs.redivis.com/api/client-libraries/redivis-js/reference/workflow.md).                                                                                    |
| [**`Workflow.listParameters`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/workflow/workflow.listparameters.md)(\[maxResults]) | List the Parameters of a workflow.                                                                                                                                                                                  |

## Examples

```javascript
const workflow = redivis.workflow('jane.my_workflow');

const parameter = await workflow.parameter('states').create({ values: ['CA', 'NY'] });

await parameter.update({ values: ['CA', 'NY', 'TX'] });
await parameter.getValues(); // ['CA', 'NY', 'TX']

await parameter.delete();
```

## Attributes

| Name             | Description                                                                                                                                                                                                                           |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`name`**       | The parameter's name.                                                                                                                                                                                                                 |
| **`workflow`**   | The [Workflow](https://docs.redivis.com/api/client-libraries/redivis-js/reference/workflow.md) that the parameter belongs to.                                                                                                         |
| **`properties`** | An object containing the [API resource representation of the parameter](https://docs.redivis.com/api/resource-definitions/parameter.md). This will only be populated after certain methods are called, particularly the `get` method. |

## Methods

| Method                                                                                                                              | Description                                                        |
| ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [**`Parameter.create`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/parameter/parameter.create.md)(options) | Create the parameter.                                              |
| [**`Parameter.delete`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/parameter/parameter.delete.md)()        | Delete the parameter.                                              |
| [**`Parameter.exists`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/parameter/parameter.exists.md)()        | Check whether the parameter exists.                                |
| [**`Parameter.get`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/parameter/parameter.get.md)()              | Fetch the parameter's metadata, populating `parameter.properties`. |
| [**`Parameter.getValues`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/parameter/parameter.getvalues.md)()  | Return the parameter's values.                                     |
| [**`Parameter.update`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/parameter/parameter.update.md)(options) | Update the parameter's name, type, or values.                      |


---

# 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/parameter.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.
