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

# Organization

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

Organizations own datasets and workflows, and have members. Various methods allow you to construct and list the datasets, workflows, members, and secrets of an organization.

## Constructors

| Method                                                                                                                                 | Description                                 |
| -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| [**`redivis.organization`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/redivis/redivis.organization.md)(name) | Return an Organization, given its username. |

## Examples

```javascript
const organization = redivis.organization('demo');

await organization.exists(); // -> true

const dataset = organization.dataset('iris_species'); // -> Returns a Dataset
const workflow = organization.workflow('some_workflow'); // -> Returns a Workflow

for (const dataset of await organization.listDatasets({ labels: ['climate'] })) {
  console.log(dataset.properties.name);
}

const members = await organization.listMembers();
```

## Attributes

| Name             | Description                                                                                                                                    |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **`name`**       | The organization's username.                                                                                                                   |
| **`properties`** | An object containing the [API resource representation of the organization](https://docs.redivis.com/api/resource-definitions/organization.md). |

## Methods

| Method                                                                                                                                                                  | Description                                                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| [**`Organization.dataset`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/organization/organization.dataset.md)(name\[, options])                 | Return a [Dataset](https://docs.redivis.com/api/client-libraries/redivis-js/reference/dataset.md) owned by the organization.   |
| [**`Organization.exists`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/organization/organization.exists.md)()                                   | Check whether the organization exists.                                                                                         |
| [**`Organization.listDatasets`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/organization/organization.listdatasets.md)(\[maxResults, options]) | List the organization's [Datasets](https://docs.redivis.com/api/client-libraries/redivis-js/reference/dataset.md).             |
| [**`Organization.listMembers`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/organization/organization.listmembers.md)(\[maxResults, options])   | List the organization's [Members](https://docs.redivis.com/api/client-libraries/redivis-js/reference/member.md).               |
| [**`Organization.listWorkflows`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/organization/organization.listworkflows.md)(\[maxResults])        | List the organization's [Workflows](https://docs.redivis.com/api/client-libraries/redivis-js/reference/workflow.md).           |
| [**`Organization.member`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/organization/organization.member.md)(name)                               | Return a [Member](https://docs.redivis.com/api/client-libraries/redivis-js/reference/member.md) of the organization.           |
| [**`Organization.secret`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/organization/organization.secret.md)(name)                               | Return a [Secret](https://docs.redivis.com/api/client-libraries/redivis-js/reference/secret.md) of the organization.           |
| [**`Organization.workflow`**](https://docs.redivis.com/api/client-libraries/redivis-js/reference/organization/organization.workflow.md)(name)                           | Return a [Workflow](https://docs.redivis.com/api/client-libraries/redivis-js/reference/workflow.md) owned by the organization. |


---

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