Power BI command line tool for managing Power BI Embedded workspace collections
Перейти к файлу
ali-hamud abaac4fe8b Merge pull request #67 from Microsoft/alihamud-Deprecation
Add a Deprecation notice
2017-10-08 09:48:58 +03:00
.vscode merge master from dev (#47) 2017-02-12 11:30:52 +02:00
bin merge master from dev (#47) 2017-02-12 11:30:52 +02:00
lib Merge pull request #54 from kmorihiro/feature/expiration 2017-04-09 15:46:56 +03:00
.gitattributes Added git attributes to set line endings 2016-05-04 12:38:44 -07:00
.gitignore Added typescript definition file to .gitignore 2016-04-22 12:36:03 -07:00
.npmignore Added npm ignore files 2016-04-29 16:32:33 -07:00
.travis.yml Added travis CI configuration (#19) 2016-07-18 07:56:44 -07:00
CONTRIBUTING.md merge master from dev (#47) 2017-02-12 11:30:52 +02:00
LICENSE Added MIT license file 2016-04-25 07:36:29 -07:00
README.md Add a Deprecation notice 2017-08-06 17:01:02 +03:00
index.ts Added start of cli project 2016-04-20 15:56:58 -07:00
package.json Merge pull request #57 from lipp/install-subcommands 2017-04-16 11:30:47 +03:00
tsconfig.json Upgraded to support typings v1 and cleaned up unused imports (#12) 2016-06-10 09:24:14 -07:00
typings.json Merged PR 19699: Updated package.json 2017-04-12 16:07:23 +00:00

README.md

Deprecation notice

Power BI Cli is deprecated and is no longer supported.

powerbi-cli

Power BI command line interface for managing Power BI Embedded workspace collections

Build Status NPM Version NPM Total Downloads NPM Monthly Downloads

Installation

Install from npm

npm install powerbi-cli -g

global flags

The following global flags are available to all commands. These can be stored with the config command

-c --collection

The Power BI workspace collection name

-w --workspace

The Power BI workspace

-k --accessKey

The Power BI access key. This key can be acquired from your Power BI workspace collection within your azure subscription

-b --baseUri

The base URI that will be used to call the Power BI REST apis. The default value is https://api.powerbi.com.

-r --reportId

The Power BI report id

-h --help

Displays command line help

Help

Display root level help

powerbi -h

Display command specific help

powerbi <command> -h

Commands

config

Gets and sets configuration values that are reused in commands. Config values are stored within a .powerbirc file. If you store access keys please ensure that you do not commit these values to any public source control. If your access keys are compromised a user can take full control over your Power BI workspace collection. If you feel your account was compromised you can regenerate your access keys in the azure portal.

Setting new configuration values

powerbi config -c <collection> -k <accessKey>

Getting a list of all configured values

powerbi config

get-workspaces

Gets a list of all workspaces within a workspace collection

powerbi get-workspaces -c <collection> -k <accessKey>

create-workspaces

Creates a new workspaced within a workspace collection

powerbi create-workspace -c <collection> -k <accessKey>

get-datasets

Gets a list of all datasets within a workspace

powerbi get-datasets -c <collection> -w <workspaceId> -k <accessKey>

delete-dataset

Deletes a dataset and any underlying linked reports

powerbi delete-dataset -c <collection> -w <workspaceId> -k <accessKey> -d <datasetId>

get-reports

Gets a list of all reports within a workspace

powerbi get-reports -c <collection> -w <workspaceId> -k <accessKey>

import

Imports a PBIX file into a

powerbi import -c <collection> -w <workspaceId> -k <accessKey> -f <file> -n [name] -o [overwrite]

update-connection

Updates connection strings and/or credentials for an existing dataset

powerbi update-connection -c <collection> -w <workspaceId> -k <accessKey> -d <datasetId> -s [connectionString] -u [username] -p [password]

create-embed-token

Creates a Power BI embed token.

powerbi create-embed-token -c <collection> -k <accessKey> -w <workspaceId> -r <reportId> -u [username] --roles [roles1,roles2,...] -s [scope1 scope2 ...] -e <expiration>

powerbi create-embed-token -c <collection> -k <accessKey> -w <workspaceId> -d <datasetId> -u [username] --roles [roles1,roles2,...] -s [scope1 scope2 ...] -e <expiration>

Examples

To create a Power BI embed token with specific user and one role:

powerbi create-embed-token -c <collection> -k <key>...key -w 06640...744d8f10 -r 07842...e30 -u "Ali Hamud" --roles "Developer" -e "03-02-2018 15:03:54 UTC"

To create a Power BI embed token with specific user and multiple roles:

powerbi create-embed-token -c <collection> -k <key> -w 06640...744d8f10 -r 07842...e30 -u "Ali Hamud" --roles "Developer,Manager"

To create Power BI embed token to create a report using dataset

powerbi create-embed-token -c <collection> -k <key> -w 06640...744d8f10 -d 12532...b13 -u "Ali Hamud" --roles "Developer,Manager" -s "Dataset.Read Workspace.Report.Create"