# Omni

> Manage Omni dashboards, folders, and labels, and run saved queries.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/omni

## Actions

### Create and publish document

Create and publish a document in Omni.

**Inputs**

- Model (`model_id`, text, required): Model ID.
- Name (`name`, text, required): Name.
- Description (`description`, text): Description.

**Outputs**

- `data` (object): The Omni response.

**Example output**

```json
{
  "data": {
    "description": "example",
    "identifier": "example",
    "name": "example"
  }
}
```

### Create folder

Create folder in Omni.

**Inputs**

- Name (`name`, text, required): Name.
- Parent folder (`parent_folder_id`, text): Parent folder ID.
- Scope (`scope`, text): Scope. One of: `organization`, `restricted`. Default: `organization`.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "breadcrumbRoot": false,
    "id": "example",
    "name": "example",
    "ownerId": "example",
    "path": "example",
    "scope": "organization"
  }
}
```

### Create label

Create label in Omni.

**Inputs**

- Name (`name`, text, required): Name.
- Color (`color`, text): Color.
- Description (`description`, text): Description.
- Verified (`verified`, true/false): Verified. Default: `false`.
- Homepage (`homepage`, true/false): Homepage. Default: `false`.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "color": "example",
    "description": "example",
    "homepage": false,
    "name": "example",
    "usage_count": 1,
    "verified": false
  }
}
```

### Delete document

Delete document in Omni.

**Inputs**

- Document (`document_id`, text, required): Document ID.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "success": false
  }
}
```

### Delete folder

Delete folder in Omni.

**Inputs**

- Folder (`folder_id`, text, required): Folder ID.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "success": false
  }
}
```

### Delete label

Delete label in Omni.

**Inputs**

- Label name (`label_name`, text, required): Label name.

**Outputs**

- `data` (object): The Omni response.

**Example output**

```json
{
  "data": {}
}
```

### Get current identity and permissions

Get current identity and permissions in Omni.

**Inputs**

- Model (`model_id`, text): Model ID.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "keyScope": "user",
    "orgRole": "MEMBER",
    "rolesByModel": {},
    "rolesByModelTruncated": false,
    "user": {
      "id": "example",
      "membershipId": "example"
    }
  }
}
```

### Get document state

Read the published state or the specified draft in Omni.

**Inputs**

- Document (`document_id`, text, required): Document ID.

**Outputs**

- `data` (object): The Omni response.

**Example output**

```json
{
  "data": {
    "controls": {},
    "description": "example",
    "modelId": "example",
    "name": "example",
    "queryPresentations": {},
    "settings": {},
    "workbookModelId": "example"
  }
}
```

### Get folder

Get folder in Omni.

**Inputs**

- Folder (`folder_id`, text, required): Folder ID.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "breadcrumbRoot": false,
    "id": "example",
    "labels": [],
    "name": "example",
    "path": "example",
    "url": "example"
  }
}
```

### Get label

Get label in Omni.

**Inputs**

- Label name (`label_name`, text, required): Label name.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "color": "example",
    "description": "example",
    "homepage": false,
    "name": "example",
    "usage_count": 1,
    "verified": false
  }
}
```

### List document queries

List document queries in Omni.

**Inputs**

- Document (`document_id`, text, required): Document ID.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "queries": []
  }
}
```

### List documents

List documents in Omni.

**Inputs**

- Labels (`labels`, text): Labels.
- Folder (`folder_id`, text): Folder ID.
- Page size (`page_size`, number): Page size. From 1 to 100. Default: `20`.
- Sort field (`sort_field`, text): Sort field. One of: `favorites`, `lastViewedAt`, `name`, `updatedAt`, `visits`. Default: `name`.
- Sort direction (`sort_direction`, text): Sort direction. One of: `asc`, `desc`. Default: `desc`.
- Cursor (`cursor`, text): Cursor.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "pageInfo": {
      "hasNextPage": false,
      "nextCursor": "example",
      "pageSize": 1,
      "totalRecords": 1
    },
    "records": []
  }
}
```

### List folders

List folders in Omni.

**Inputs**

- Path (`path`, text): Path.
- Scope (`scope`, text): Scope. One of: `organization`, `restricted`. Default: `organization`.
- Sort field (`sort_field`, text): Sort field. One of: `favorites`, `name`, `path`. Default: `name`.
- Sort direction (`sort_direction`, text): Sort direction. One of: `asc`, `desc`. Default: `desc`.
- Cursor (`cursor`, text): Cursor.
- Page size (`page_size`, number): Page size. At least 1. Default: `20`.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "pageInfo": {
      "hasNextPage": false,
      "nextCursor": "example",
      "pageSize": 1,
      "totalRecords": 1
    },
    "records": []
  }
}
```

### List labels

List labels in Omni.

**Inputs**: None.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "labels": []
  }
}
```

### List models

List models in Omni.

**Inputs**

- Connection (`target_connection_id`, text): Connection ID.
- Model kind (`model_kind`, text): Model kind. One of: `SCHEMA`, `SHARED`, `SHARED_EXTENSION` (Shared extension), `WORKBOOK`, `BRANCH`, `QUERY`, `TOPIC`, `FIELD_PICKER_TOPIC` (Field picker topic).
- Name (`name`, text): Name.
- Page size (`page_size`, number): Page size. From 1 to 100. Default: `20`.
- Sort direction (`sort_direction`, text): Sort direction. One of: `asc`, `desc`.
- Sort field (`sort_field`, text): Sort field. One of: `name`, `modelKind`, `connectionId`, `baseModelId`, `createdAt`, `updatedAt`. Default: `updatedAt`.
- Page cursor (`cursor`, text): Page cursor.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "pageInfo": {
      "hasNextPage": false,
      "nextCursor": "example",
      "pageSize": 1,
      "totalRecords": 1
    },
    "records": []
  }
}
```

### Publish document draft

Publish the main draft of an Omni document.

**Inputs**

- Document (`document_id`, text, required): Document ID.

**Outputs**

- `data` (object): The Omni response.

**Example output**

```json
{
  "data": {
    "description": "example",
    "identifier": "example",
    "name": "example"
  }
}
```

### Run a saved document query

Run a saved document query in Omni.

**Inputs**

- Document (`document_id`, text, required): Document ID.
- Query (`query_id`, text, required): Query ID.
- Filters (`filters`, object): Filters.
- Format results (`format_results`, true/false): Format results. Default: `true`.

**Outputs**

- `data` (list): Response value.

**Example output**

```json
{
  "data": []
}
```

### Search dashboards and apps

Search dashboards and apps in Omni.

**Inputs**

- Limit (`limit`, number): Limit. At most 25. Default: `10`.
- Search query (`q`, text, required): Q.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "results": []
  }
}
```

### Update document draft

Apply changes to a draft of an Omni document.

**Inputs**

- Document (`document_id`, text, required): Document ID.
- Name (`name`, text): Name.
- Description (`description`, text): Description.

**Outputs**

- `data` (object): The Omni response.

**Example output**

```json
{
  "data": {
    "description": "example",
    "draftIdentifier": "example",
    "identifier": "example",
    "name": "example"
  }
}
```

### Update folder

Update folder in Omni.

**Inputs**

- Folder (`folder_id`, text, required): Folder ID.
- Name (`name`, text): Name.

**Outputs**

- `data` (object): Response value.

**Example output**

```json
{
  "data": {
    "breadcrumbRoot": false,
    "id": "example",
    "name": "example",
    "path": "example"
  }
}
```
