Workspaces

Workspaces are a view or a filter objects/items for a specific use case, role, system. The workspaces are role based and act as a sub-portal within Onify. A workspace can also have shortcuts and bulletins.

Workspace configuration

  • name - Internal name for workspace
  • title - Title (external) for workspace (supports Handlebars)
  • slug - Unique url for workspace
  • description - Description (external) for workspace (supports Handlebars)
  • icon - Icon for workspace
  • color - Color for workspace
  • tag - Tag(s) for workspace
  • role - Role(s) that have access to workspace
  • domain - Domains that have access to workspace (if multitenant is enabled)
  • startpage - Custom startpage for the workspace
  • query - Elasticsearch query see Query string query docs (supports Handlebars)
  • hide - If the workspace should be hidden in web app
  • help.menulink - Adds a help icon in the workspace top right corner to help (supports Handlebars)
  • help.searchtext - Help text that auto scrolls in the search field (supports Handlebars)
  • order - What order to sort the workspace in the web app
  • shared - If the workspace should be shared or not. If it shared, it will be shared to the set roles. If no roles are set it will be shared to everyone.
  • owner - The owner of the workspace. If not shared, it will be only visible to this user.
  • export.enabled - Is exporting enabled for the workspace.
  • export.exclude - What fields to exclude when exporting (eg. attribute.salary)
  • export.role - If set, only users with this role can export results from the workspace
  • fields.includes - If set, this will be the only fields to include in workspace result, eg. key, name, tag (supports Handlebars)
  • fields.excludes - If set, these fields will be excluded in workspace result, eg. attachment.* or {{#unless user.custom.vip}}attribute.secret{{/unless}} (supports Handlebars)

Query examples

For more examples, see Elasticsearch query docs.

Filter examples

Filter items where users role exists matches a custom role attribute and item tag

{
    "filter": {
        "bool": {
            "must": [{
                    "terms": {
                        "attribute._googlerole.keyword": "{{user.role}}"
                    }
                }, {
                    "term": {
                        "tag": "google"
                    }
                }
            ]
        }
    }
}

Filter items based on owner and logged in user

{
    "filter": {
        "bool": {
            "must": [{
                    "term": {
                        "owner": "{{user.username}}"
                    }
                }
            ]
        }
    }
}

Filter items based on a field exists or not on a item

{
    "filter": {
        "bool": {
            "must": [{
                    "exists": {
                        "field": "attribute._person_number"
                    }
                }
            ]
        }
    }
}