# OneStream

> Run Data Management sequences and steps and read data from data adapters, cube views and queries in OneStream.

App · 7 actions. Web page: https://docs.lodol.com/docs/integrations/onestream

## Actions

### Get cube view results

Get the rows of a cube view as a table.

**Inputs**

- Application (`application`, text, required): The OneStream application to work in.
- Cube view (`cube_view_name`, text, required): The name of the cube view.
- One table per row (`table_per_row`, true/false): Turn on to get a separate table for each row of the cube view.
- Substitution variables (`variables`, text): Substitution variables for OneStream to fill in, as comma-separated name and value pairs written the way OneStream expects them. Leave empty when there are none.

**Outputs**

- `data` (object): The response from OneStream.

**Example output**

```json
{
  "data": {
    "row_count": 1,
    "rows": [
      {}
    ],
    "tables": {}
  }
}
```

### Get data adapter results

Get the rows a dashboard data adapter returns.

**Inputs**

- Application (`application`, text, required): The OneStream application to work in.
- Data adapter (`adapter_name`, text, required): The name of the dashboard data adapter.
- System-level adapter (`system_level`, true/false): Turn on when the data adapter is defined at the system level rather than in the application.
- Substitution variables (`variables`, text): Substitution variables for OneStream to fill in, as comma-separated name and value pairs written the way OneStream expects them. Leave empty when there are none.

**Outputs**

- `data` (object): The response from OneStream.

**Example output**

```json
{
  "data": {
    "row_count": 1,
    "rows": [
      {}
    ],
    "tables": {}
  }
}
```

### List applications

List the OneStream applications this connection may open.

**Inputs**: None.

**Outputs**

- `data` (object): The response from OneStream.

**Example output**

```json
{
  "data": {
    "applications": [
      "example"
    ],
    "count": 1
  }
}
```

### Run data management sequence

Run a Data Management sequence, such as a consolidation or an export, and wait for it to finish.

**Inputs**

- Application (`application`, text, required): The OneStream application to work in.
- Sequence name (`sequence_name`, text, required): The name of the sequence, as it appears under Data Management.
- Substitution variables (`variables`, text): Substitution variables for OneStream to fill in, as comma-separated name and value pairs written the way OneStream expects them. Leave empty when there are none.
- Workspace (`workspace_name`, text): The workspace that holds the sequence. Leave empty for the default workspace.

**Outputs**

- `data` (object): The response from OneStream.

**Example output**

```json
{
  "data": {
    "message": "example"
  }
}
```

### Run data management step

Run one step of a Data Management group and wait for it to finish.

**Inputs**

- Application (`application`, text, required): The OneStream application to work in.
- Group name (`group_name`, text, required): The Data Management group that holds the step.
- Step name (`step_name`, text, required): The name of the step to run.
- Substitution variables (`variables`, text): Substitution variables for OneStream to fill in, as comma-separated name and value pairs written the way OneStream expects them. Leave empty when there are none.

**Outputs**

- `data` (object): The response from OneStream.

**Example output**

```json
{
  "data": {
    "message": "example"
  }
}
```

### Run method query

Get workflow, journal, form, certification or intercompany status from one of OneStream's built-in method queries. Needs the Administrator role in OneStream.

**Inputs**

- Application (`application`, text, required): The OneStream application to work in.
- Method (`method_type`, text, required): Which built-in method query to run. One of: `WorkflowCalculationEntities`, `WorkflowConfirmationEntities`, `WorkflowProfileAndDependentProfileEntities`, `WorkflowProfileEntities`, `WorkflowProfiles`, `WorkflowProfileRelatives`, `WorkflowStatus`, `WorkflowStatusTwelvePeriod`, `WorkflowAndEntityStatus`, `JournalsForWorkflowUnit`, and 7 more.
- Method query (`method_query`, text, required): The method query's arguments, such as `{Houston}{Actual}{2018M1}{true}{}` for a workflow unit.
- Substitution variables (`variables`, text): Substitution variables for OneStream to fill in, as comma-separated name and value pairs written the way OneStream expects them. Leave empty when there are none.

**Outputs**

- `data` (object): The response from OneStream.

**Example output**

```json
{
  "data": {
    "row_count": 1,
    "rows": [
      {}
    ],
    "tables": {}
  }
}
```

### Run SQL query

Run a SQL query against the application's database, or an external database OneStream is set up to reach, and get the rows. Needs the Administrator role in OneStream.

**Inputs**

- Application (`application`, text, required): The OneStream application to work in.
- SQL query (`sql_query`, text, required): The SQL query, such as `SELECT TOP 100 * FROM Cube`.
- Database (`database`, text): Which database to query. Defaults to the application's database. One of: `Application`, `External`. Default: `Application`.
- External connection (`external_connection`, text): The name of the external database connection in OneStream. Needed when Database is External.
- Substitution variables (`variables`, text): Substitution variables for OneStream to fill in, as comma-separated name and value pairs written the way OneStream expects them. Leave empty when there are none.

**Outputs**

- `data` (object): The response from OneStream.

**Example output**

```json
{
  "data": {
    "row_count": 1,
    "rows": [
      {}
    ],
    "tables": {}
  }
}
```
