# Sisense

> Manage Sisense users, groups, dashboards, folders and data model builds.

App · 26 actions. Web page: https://docs.lodol.com/docs/integrations/sisense

## Actions

### Cancel builds

Stop every running build of a data model.

**Inputs**

- Data model (`datamodel`, text, required): The data model whose builds to stop.

**Outputs**

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

**Example output**

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

### Create folder

Create a dashboard folder, at the top level or inside another folder.

**Inputs**

- Name (`name`, text, required): The folder's name.
- Parent folder (`parent`, text): The folder to create it in. Leave empty for the top level.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created": "example",
    "lastUpdated": "example",
    "name": "example",
    "oid": "example",
    "owner": "example",
    "parentId": "example",
    "type": "example",
    "userId": "example"
  }
}
```

### Create group

Add a user group to Sisense.

**Inputs**

- Name (`name`, text, required): The group's name, unique in Sisense.
- Hide from sharing (`exclude_from_sharing`, true/false): Leave the group out of the people a dashboard can be shared with.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "_id": "example",
    "ad": true,
    "created": "example",
    "lastUpdated": "example",
    "mail": "example",
    "name": "example",
    "roleId": "example"
  }
}
```

### Create user

Add a user to Sisense with a role, and optionally to groups.

**Inputs**

- Email (`email`, text, required): The user's email address.
- Username (`user_name`, text): The name the user signs in with. Sisense uses the email when left empty.
- First name (`first_name`, text): The user's first name.
- Last name (`last_name`, text): The user's last name.
- Role (`role`, text, required): The user's role, such as Viewer or Designer.
- Groups (`groups`, list): The groups the user belongs to.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "_id": "example",
    "active": true,
    "created": "example",
    "email": "example",
    "firstName": "example",
    "groups": [
      "example"
    ],
    "lastLogin": "example",
    "lastName": "example",
    "lastUpdated": "example",
    "roleId": "example",
    "userName": "example"
  }
}
```

### Delete dashboard

Delete a dashboard.

**Inputs**

- Dashboard (`dashboard`, text, required): The dashboard.

**Outputs**

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

**Example output**

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

### Delete folder

Delete a folder and what it holds.

**Inputs**

- Folder (`folder`, text, required): The folder.

**Outputs**

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

**Example output**

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

### Delete group

Delete a user group. Its members stay in Sisense.

**Inputs**

- Group (`group`, text, required): The Sisense group.

**Outputs**

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

**Example output**

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

### Delete user

Delete a user from Sisense.

**Inputs**

- User (`user`, text, required): The Sisense user.

**Outputs**

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

**Example output**

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

### Duplicate dashboard

Make a copy of a dashboard, owned by the connected user.

**Inputs**

- Dashboard (`dashboard`, text, required): The dashboard.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created": "example",
    "datasource": {
      "address": "example",
      "database": "example",
      "fullname": "example",
      "id": "example",
      "title": "example"
    },
    "desc": "example",
    "instanceType": "example",
    "lastUpdated": "example",
    "oid": "example",
    "owner": "example",
    "parentFolder": "example",
    "shares": [
      {
        "rule": "example",
        "shareId": "example",
        "subscribe": true,
        "type": "example"
      }
    ],
    "title": "example",
    "type": "example",
    "userId": "example"
  }
}
```

### Export dashboard as PDF

Render a dashboard as a PDF file.

**Inputs**

- Dashboard (`dashboard`, text, required): The dashboard.
- Paper size (`paper_format`, text, required): The paper size. One of: `A4`, `LETTER`, `LEGAL`, `A3`, `TABLOID`, `A5`, `A2`, `A1`, `A0`.
- Orientation (`orientation`, text, required): Portrait or landscape. One of: `portrait`, `landscape`.
- Layout (`layout`, text): Lay the widgets out as on screen, or one per row. One of: `asis` (As on screen), `feed` (One widget per row).
- Show filters (`show_filters`, true/false): Print the dashboard's filters.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "content_base64": "example",
    "content_type": "example"
  }
}
```

### Get build

Get a build's state by its ID. Sisense removes finished builds after a while.

**Inputs**

- Build ID (`build_id`, text, required): The build's ID, from Start build or List builds.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "buildType": "example",
    "completed": "example",
    "created": "example",
    "datamodelId": "example",
    "datamodelTitle": "example",
    "datamodelType": "example",
    "oid": "example",
    "rowLimit": 1,
    "schemaLastUpdate": "example",
    "source": "example",
    "started": "example",
    "status": "example"
  }
}
```

### Get current user

Get the Sisense user the API token belongs to, with their role.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "_id": "example",
    "active": true,
    "baseRoleName": "example",
    "created": "example",
    "email": "example",
    "firstName": "example",
    "groups": [
      "example"
    ],
    "lastLogin": "example",
    "lastName": "example",
    "lastUpdated": "example",
    "roleId": "example",
    "roleName": "example",
    "userName": "example"
  }
}
```

### Get dashboard

Get one dashboard by ID.

**Inputs**

- Dashboard (`dashboard`, text, required): The dashboard.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created": "example",
    "datasource": {
      "address": "example",
      "database": "example",
      "fullname": "example",
      "id": "example",
      "title": "example"
    },
    "desc": "example",
    "instanceType": "example",
    "lastUpdated": "example",
    "oid": "example",
    "owner": "example",
    "parentFolder": "example",
    "shares": [
      {
        "rule": "example",
        "shareId": "example",
        "subscribe": true,
        "type": "example"
      }
    ],
    "title": "example",
    "type": "example",
    "userId": "example"
  }
}
```

### Get role

Get one role by its ID or its name, such as consumer for Viewer.

**Inputs**

- Role (`role`, text, required): The role, or its name: consumer (Viewer), contributor (Designer), dataDesigner, dataAdmin or admin.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "_id": "example",
    "baseRoleName": "example",
    "desc": "example",
    "displayName": "example",
    "name": "example"
  }
}
```

### Get user

Get one Sisense user by ID.

**Inputs**

- User (`user`, text, required): The Sisense user.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "_id": "example",
    "active": true,
    "created": "example",
    "email": "example",
    "firstName": "example",
    "groups": [
      "example"
    ],
    "lastLogin": "example",
    "lastName": "example",
    "lastUpdated": "example",
    "roleId": "example",
    "userName": "example"
  }
}
```

### List builds

List data model builds, optionally for one model or in one state.

**Inputs**

- Data model (`datamodel`, text): Only builds of this data model.
- Status (`status`, text): Only builds in this state. One of: `pending`, `building`, `done`, `failed`, `cancelled`.

**Outputs**

- `data` (list): The response from Sisense.

**Example output**

```json
{
  "data": [
    {
      "buildType": "example",
      "completed": "example",
      "created": "example",
      "datamodelId": "example",
      "datamodelTitle": "example",
      "datamodelType": "example",
      "oid": "example",
      "rowLimit": 1,
      "schemaLastUpdate": "example",
      "source": "example",
      "started": "example",
      "status": "example"
    }
  ]
}
```

### List dashboards

List the dashboards the connected user owns or can see.

**Inputs**

- Title (`name`, text): Only dashboards with this title.
- Folder (`folder`, text): Only dashboards directly in this folder.
- Data model (`datasource`, text): Only dashboards built on this data model, by its title.

**Outputs**

- `data` (list): The response from Sisense.

**Example output**

```json
{
  "data": [
    {
      "created": "example",
      "datasource": {
        "address": "example",
        "database": "example",
        "fullname": "example",
        "id": "example",
        "title": "example"
      },
      "desc": "example",
      "instanceType": "example",
      "lastUpdated": "example",
      "oid": "example",
      "owner": "example",
      "parentFolder": "example",
      "shares": [
        {
          "rule": "example",
          "shareId": "example",
          "subscribe": true,
          "type": "example"
        }
      ],
      "title": "example",
      "type": "example",
      "userId": "example"
    }
  ]
}
```

### List data models

List the data models (ElastiCubes and live models).

**Inputs**

- Title (`title`, text): Only the data model with this title.

**Outputs**

- `data` (list): The response from Sisense.

**Example output**

```json
{
  "data": [
    {
      "lastBuildTime": "example",
      "lastUpdated": "example",
      "oid": "example",
      "server": "example",
      "title": "example",
      "type": "example"
    }
  ]
}
```

### List folders

List the dashboard folders the connected user can see.

**Inputs**

- Name (`name`, text): Only folders with this name.
- Limit (`limit`, number): How many to return at most. From 1 to 1000. Default: `50`.
- Skip (`skip`, number): How many to skip first, to read the next page. At least 0.

**Outputs**

- `data` (list): The response from Sisense.

**Example output**

```json
{
  "data": [
    {
      "created": "example",
      "lastUpdated": "example",
      "name": "example",
      "oid": "example",
      "owner": "example",
      "parentId": "example",
      "type": "example",
      "userId": "example"
    }
  ]
}
```

### List groups

List the user groups in Sisense.

**Inputs**

- Name (`name`, text): Only the group with this name.
- Limit (`limit`, number): How many to return at most. From 1 to 1000. Default: `50`.
- Skip (`skip`, number): How many to skip first, to read the next page. At least 0.

**Outputs**

- `data` (list): The response from Sisense.

**Example output**

```json
{
  "data": [
    {
      "_id": "example",
      "ad": true,
      "created": "example",
      "lastUpdated": "example",
      "mail": "example",
      "name": "example",
      "roleId": "example"
    }
  ]
}
```

### List roles

List the roles a Sisense user can have.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Sisense.

**Example output**

```json
{
  "data": [
    {
      "_id": "example",
      "baseRoleName": "example",
      "desc": "example",
      "displayName": "example",
      "name": "example"
    }
  ]
}
```

### List users

List the users in Sisense, optionally filtered by text, group, role or state.

**Inputs**

- Search (`search`, text): Text to find in the user's name or email.
- Email (`email`, text): Only the user with this email.
- Group (`group`, text): Only members of this group.
- Role (`role`, text): Only users with this role.
- Active (`active`, true/false): Only active users (on) or only inactive ones (off).
- Order (`sort`, text): The order to list them in. One of: `-created` (Newest first), `created` (Oldest first), `email` (Email, A to Z), `userName` (Username, A to Z), `-lastUpdated` (Recently updated first).
- Limit (`limit`, number): How many to return at most. From 1 to 1000. Default: `50`.
- Skip (`skip`, number): How many to skip first, to read the next page. At least 0.

**Outputs**

- `data` (list): The response from Sisense.

**Example output**

```json
{
  "data": [
    {
      "_id": "example",
      "active": true,
      "created": "example",
      "email": "example",
      "firstName": "example",
      "groups": [
        "example"
      ],
      "lastLogin": "example",
      "lastName": "example",
      "lastUpdated": "example",
      "roleId": "example",
      "userName": "example"
    }
  ]
}
```

### Start build

Start building a data model, or publish a live one. Returns at once; read the build to follow it.

**Inputs**

- Data model (`datamodel`, text, required): The data model to build.
- Build type (`build_type`, text, required): What to build. Live models only publish. One of: `schema_changes` (Schema changes only), `by_table` (By table (each table's own setting)), `full` (Full rebuild), `publish` (Publish (live models)).
- Row limit (`row_limit`, number): Import at most this many rows per table. At least 1.
- Schema (`schema_origin`, text): Build the latest saved schema or the one now running. One of: `latest` (Latest saved schema), `running` (Schema of the running model).

**Outputs**

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

**Example output**

```json
{
  "data": {
    "buildType": "example",
    "completed": "example",
    "created": "example",
    "datamodelId": "example",
    "datamodelTitle": "example",
    "datamodelType": "example",
    "oid": "example",
    "rowLimit": 1,
    "schemaLastUpdate": "example",
    "source": "example",
    "started": "example",
    "status": "example"
  }
}
```

### Update dashboard

Rename a dashboard, change its description or move it to another folder.

**Inputs**

- Dashboard (`dashboard`, text, required): The dashboard.
- Title (`title`, text): The dashboard's new title.
- Description (`description`, text): The dashboard's new description.
- Folder (`folder`, text): The folder to move the dashboard into.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created": "example",
    "datasource": {
      "address": "example",
      "database": "example",
      "fullname": "example",
      "id": "example",
      "title": "example"
    },
    "desc": "example",
    "instanceType": "example",
    "lastUpdated": "example",
    "oid": "example",
    "owner": "example",
    "parentFolder": "example",
    "shares": [
      {
        "rule": "example",
        "shareId": "example",
        "subscribe": true,
        "type": "example"
      }
    ],
    "title": "example",
    "type": "example",
    "userId": "example"
  }
}
```

### Update folder

Rename a folder or move it into another folder.

**Inputs**

- Folder (`folder`, text, required): The folder.
- Name (`name`, text): The folder's new name.
- Parent folder (`parent`, text): The folder to move it into.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "created": "example",
    "lastUpdated": "example",
    "name": "example",
    "oid": "example",
    "owner": "example",
    "parentId": "example",
    "type": "example",
    "userId": "example"
  }
}
```

### Update user

Change a user's details, role or groups. Fields left empty stay as they are.

**Inputs**

- User (`user`, text, required): The Sisense user.
- Email (`email`, text): The user's email address.
- Username (`user_name`, text): The name the user signs in with. Sisense uses the email when left empty.
- First name (`first_name`, text): The user's first name.
- Last name (`last_name`, text): The user's last name.
- Role (`role`, text): The user's role, such as Viewer or Designer.
- Groups (`groups`, list): The groups the user belongs to. Replaces the user's groups.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "_id": "example",
    "active": true,
    "created": "example",
    "email": "example",
    "firstName": "example",
    "groups": [
      "example"
    ],
    "lastLogin": "example",
    "lastName": "example",
    "lastUpdated": "example",
    "roleId": "example",
    "userName": "example"
  }
}
```
