Manage Dashboards

This feature is available only in Enterprise Edition.

Manage Dashboards in script by using the :viewsheet or equivalent :vs command. See Create a New Dashboard for information about Dashboards in the User Portal.

Optional parameters should be provided in a key-value pair with a preceding double-hyphen (--). For example: --organizationid organization0.

List Available Dashboards

The list action lists the available Dashboards. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

organizationid

Organization ID for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)

Examples

// List all Dashboards in environment
:vs list

// List all Dashboards in organization0
:vs list --organizationid organization0

List Open Dashboards

The list-open action lists the currently open Dashboards. Note: You must first connect to a repository. See Connect to a Repository.

Examples

// List all open Dashboards in environment
:vs list-open

Get Dashboard Bookmarks

The bookmarks action lists the bookmarks in the specified Dashboard. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Dashboard ID

Examples

// List bookmarks for Census Dashboard
:vs bookmarks "1^128^__NULL__^Examples/Census^host-org"

Open a Dashboard

The open action opens the specified Dashboard. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Dashboard ID

parameters

Parameter values to pass to Dashboard (optional)

Examples

// Open Census Dashboard
:vs open "1^128^__NULL__^Examples/Census^host-org"

// Open Census Dashboard with specified parameter
:vs open "1^128^__NULL__^Examples/Census^host-org" numberOfDays 10

Get Dashboard

The get action obtains a handle to an open Dashboard. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Runtime Dashboard ID. Obtain this from the list-open action. (See List Open Dashboards.)

Examples

// Get handle to Dashboard 2
:vs get 2

Close Dashboard

The close action closes an open Dashboard. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Runtime Dashboard ID. Obtain this from the list-open action. (See List Open Dashboards.)

Examples

// Close Dashboard 2
:vs close 2

Mail a Dashboard

The mail action sends a Dashboard to a recipient in the specified format. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Runtime Dashboard ID. Obtain this from the list-open action. (See List Open Dashboards.)

format

Format for the Dashboard attachment ('EXCEL', 'PDF', or 'POWERPOINT').

recipients

The email addresses of the recipients. (At least one is required.)

sender

The email address of the sender.

subject

The subject line of the email.

message

The body of the email.

Examples

// Mail Dashboard 2
:vs mail 2 'PDF' 'joe@org1.com' 'me@org2.com' 'very important info' 'This is the Dashboard you requested.'

Export a Dashboard

The export action downloads the Dashboard in the specified format. Note: You must first connect to a repository. See Connect to a Repository. The Dashboard should be open before exporting. (See Open a Dashboard.)

Parameters

id

Runtime Dashboard ID. Obtain this from the list-open action. (See List Open Dashboards.)

format

Format for the Dashboard file ('EXCEL', 'PDF', or 'POWERPOINT').

file

A name for the downloaded file.

bookmarks

Array of bookmarks to include in exported Dashboard. (optional)

Examples

// Export Dashboard 2
def bks = ['bk1','bk2']
:vs open '1^128^__NULL__^Examples/Census^host-org'
:vs export 2 'PDF' 'E:/vs1.pdf' --bookmarks bks

Asynchronously Export a Dashboard

The async-export action downloads the Dashboard in the specified format. The export is non-blocking and the status must be polled to determine when it is complete. (See Get Asynchronous Export Status.) Note: You must first connect to a repository. See Connect to a Repository. The Dashboard should be open before exporting. (See Open a Dashboard.)

Parameters

id

Runtime Dashboard ID. Obtain this from the list-open action. (See List Open Dashboards.)

format

Format for the Dashboard file ('EXCEL', 'PDF', or 'POWERPOINT').

bookmarks

Array of bookmarks to include in exported Dashboard. (optional)

Examples

// Export Dashboard 2
def bks = ['bk1','bk2']
:vs open '1^128^__NULL__^Examples/Census^host-org'
:vs async-export 2 'PDF' --bookmarks bks

Remove an Asynchronous Export Action

The remove-export action removes an existing asynchronous export action, cancelling it if necessary. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Export ID

Examples

// Remove export "vs-export-1"
:vs remove-export "vs-export-1"

Get Asynchronous Export Status

The get-export-status action returns the status of an asynchronous export as true (completed) or false (failed). Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Export ID

Examples

// Get status for export "vs-export-1"
:vs get-export-status "vs-export-1"

Get Asynchronous Export Content

The get-export-content action downloads the content of a completed asynchronous Dashboard export. Note: You must first connect to a repository. See Connect to a Repository. Before using get-export-content, verify that the export action has completed. (See Get Asynchronous Export Status.)

Parameters

id

Export ID

file

Path to the local file that will be written

Examples

// Get content for export 2
:vs get-export-content 2 'E:/vs1.pdf'

Rename a Dashboard

The rename action renames the specified Dashboard. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Dashboard ID

path

Path for renamed Dashboard

global

true for global scope, false for user scope

owner

If global is false, the name of the owner (user)

organizationid

Organization ID for multi-tenant environment. (See Enable Multi-Tenancy.) (optional)

Examples

// Rename Examples/Census to Admin/CensusData
:vs rename "1^128^__NULL__^Examples/Census^host-org" "Admin/CensusData" false --owner user0 --organizationid organization0

Delete a Dashboard

The delete action deletes a Dashboard from the repository. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Runtime Dashboard ID. Obtain this from the list-open action. (See List Open Dashboards.)

Examples

// Delete Examples/Census Dashboard
:vs delete "1^128^__NULL__^Examples/Census^host-org"

Add a Pinned Dashboard

The add-favorite action adds a pinned dashboard to the Portal for the current user. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Runtime Dashboard ID. Obtain this from the list-open action. (See List Open Dashboards.)

Examples

// Pin the Census Dashboard
:vs add-favorite "1^128^__NULL__^Examples/Census^host-org"

Remove a Pinned Dashboard

The remove-favorite action removes the specified pinned dashboard from the Portal for the current user. Note: You must first connect to a repository. See Connect to a Repository.

Parameters

id

Runtime Dashboard ID. Obtain this from the list-open action. (See List Open Dashboards.)

Examples

// Pin the Census Dashboard
:vs remove-favorite "1^128^__NULL__^Examples/Census^host-org"