PowerbiClient
Attributes
TRIGGER_OPERATIONS
module-attribute
TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'GoalsAssignedTrigger': {'operation_id': 'GoalsAssignedTrigger', 'path': '/{connectionId}/internalFlowTriggerGoalChange/v1.0/myOrg/groups/{groupid}/internalScorecards({scorecardId})/goals', 'method': 'get', 'required_parameters': ['groupid', 'scorecardId', 'pollingInterval'], 'callback_payload_type': 'GoalsAssigned'}, 'GoalChangeTrigger': {'operation_id': 'GoalChangeTrigger', 'path': '/{connectionId}/internalFlowTriggerGoalChange/v1.0/myOrg/groups/{groupid}/internalScorecards({scorecardId})/goals({goalId})', 'method': 'get', 'required_parameters': ['groupid', 'scorecardId', 'goalId', 'pollingInterval'], 'callback_payload_type': 'GoalChanged'}, 'GoalStatusChangeTrigger': {'operation_id': 'GoalStatusChangeTrigger', 'path': '/{connectionId}/internalFlowTriggerGoalChange/v1.0/myOrg/groups/{groupid}/internalScorecards({scorecardId})/goals({goalId})/GetFlowTriggerStatus', 'method': 'get', 'required_parameters': ['groupid', 'scorecardId', 'goalId', 'pollingInterval'], 'callback_payload_type': 'GoalStatusChanged'}, 'GoalValueChangeTrigger': {'operation_id': 'GoalValueChangeTrigger', 'path': '/{connectionId}/internalFlowTriggerGoalChange/v1.0/myOrg/groups/{groupid}/internalScorecards({scorecardId})/goals({goalId})/GetFlowTriggerValue', 'method': 'get', 'required_parameters': ['groupid', 'scorecardId', 'goalId', 'pollingInterval'], 'callback_payload_type': 'GoalValueChanged'}, 'GoalRefreshFailedTrigger': {'operation_id': 'GoalRefreshFailedTrigger', 'path': '/{connectionId}/internalFlowTriggerGoalChange/v1.0/myOrg/groups/{groupid}/internalScorecards({scorecardId})/goals({goalId})/GetRefreshHistory', 'method': 'get', 'required_parameters': ['groupid', 'scorecardId', 'goalId', 'trackTargetSource', 'trackValueSource', 'pollingInterval'], 'callback_payload_type': 'GoalRefreshIssues'}, 'GoalValueOrNoteUpsertTrigger': {'operation_id': 'GoalValueOrNoteUpsertTrigger', 'path': '/{connectionId}/internalFlowTriggerGoalChange/v1.0/myOrg/groups/{groupid}/internalScorecards({scorecardId})/goals({goalId})/goalValues', 'method': 'get', 'required_parameters': ['groupid', 'scorecardId', 'goalId', 'pollingInterval'], 'callback_payload_type': 'GoalValueOrNoteUpserted'}, 'CheckAlertStatus': {'operation_id': 'CheckAlertStatus', 'path': '/{connectionId}/metadata/v201606/alerts/{alertId}/status', 'method': 'get', 'required_parameters': ['alertId'], 'callback_payload_type': 'EvaluatedAlert'}}
Classes
ListedScorecards
dataclass
CreatedScorecard
dataclass
FetchedGoals
dataclass
CreateGoalResponse
dataclass
FetchedGoal
dataclass
FetchedGoal(id: Optional[str] = None, name: Optional[str] = None, owner: Optional[str] = None, start_date: Optional[str] = None, completion_date: Optional[str] = None, parent_id: Optional[str] = None, current_value: Optional[float] = None, current_value_timestamp: Optional[str] = None, target_value: Optional[float] = None, target_value_timestamp: Optional[str] = None, status: Optional[str] = None, status_timestamp: Optional[str] = None, cycle: Optional[str] = None, cycle_period: Optional[str] = None)
Response for Get a goal
Attributes
owner
class-attribute
instance-attribute
The email address of the goal's owner.
start_date
class-attribute
instance-attribute
The start date for the goal. Example: 2021-07-15.
completion_date
class-attribute
instance-attribute
The due date for the goal to be completed by. Example: 2021-07-29.
parent_id
class-attribute
instance-attribute
If this goal is a subgoal, the unique id of its parent goal.
current_value
class-attribute
instance-attribute
The current value of the goal being tracked.
current_value_timestamp
class-attribute
instance-attribute
current_value_timestamp: Optional[str] = field(default=None, metadata={'wire_name': 'currentValueTimestamp'})
The timestamp when the current value of the goal was set.
target_value
class-attribute
instance-attribute
The target value of the goal.
target_value_timestamp
class-attribute
instance-attribute
target_value_timestamp: Optional[str] = field(default=None, metadata={'wire_name': 'targetValueTimestamp'})
The timestamp when the target value of the goal was set.
status_timestamp
class-attribute
instance-attribute
The timestamp when the status of the goal was set.
cycle
class-attribute
instance-attribute
Tracking cycle frequency interval shown on this goal's visuals.
GoalsAssigned
dataclass
GoalChanged
dataclass
GoalChanged(id: Optional[str] = None, old_name: Optional[str] = None, old_owner: Optional[str] = None, old_start_date: Optional[str] = None, old_completion_date: Optional[str] = None, old_parent_id: Optional[str] = None, old_current_value: Optional[float] = None, old_target_value: Optional[float] = None, old_status: Optional[str] = None, old_cycle: Optional[str] = None, old_cycle_period: Optional[str] = None, new_name: Optional[str] = None, new_owner: Optional[str] = None, new_start_date: Optional[str] = None, new_completion_date: Optional[str] = None, new_parent_id: Optional[str] = None, new_current_value: Optional[float] = None, new_target_value: Optional[float] = None, new_status: Optional[str] = None, new_cycle: Optional[str] = None, new_cycle_period: Optional[str] = None, change_list: Optional[str] = None)
Response for When a goal changes
Attributes
old_name
class-attribute
instance-attribute
The name of the goal.
old_owner
class-attribute
instance-attribute
The email address of the goal's owner.
old_start_date
class-attribute
instance-attribute
The start date for the goal. Example: 2021-07-15.
old_completion_date
class-attribute
instance-attribute
old_completion_date: Optional[str] = field(default=None, metadata={'wire_name': 'oldCompletionDate'})
The due date for the goal to be completed by. Example: 2021-07-29.
old_parent_id
class-attribute
instance-attribute
If this goal is a subgoal, the unique id of its parent goal.
old_current_value
class-attribute
instance-attribute
The current value of the goal being tracked.
old_target_value
class-attribute
instance-attribute
The target value of the goal.
old_status
class-attribute
instance-attribute
The status of the goal.
old_cycle
class-attribute
instance-attribute
Old tracking cycle frequency interval shown on this goal's visuals.
old_cycle_period
class-attribute
instance-attribute
Old date to find out extra properties of tracking cycle.
new_name
class-attribute
instance-attribute
The name of the goal.
new_owner
class-attribute
instance-attribute
The email address of the goal's owner.
new_start_date
class-attribute
instance-attribute
The start date for the goal.
new_completion_date
class-attribute
instance-attribute
new_completion_date: Optional[str] = field(default=None, metadata={'wire_name': 'newCompletionDate'})
The due date for the goal to be completed by.
new_parent_id
class-attribute
instance-attribute
If this goal is a subgoal, the unique id of its parent goal.
new_current_value
class-attribute
instance-attribute
The current value of the goal being tracked.
new_target_value
class-attribute
instance-attribute
The target value of the goal.
new_status
class-attribute
instance-attribute
The status of the goal.
new_cycle
class-attribute
instance-attribute
New tracking cycle interval shown on this goal's visuals.
new_cycle_period
class-attribute
instance-attribute
New date to find out extra properties of tracking cycle.
GoalStatusChanged
dataclass
GoalStatusChanged(id: Optional[str] = None, old_status: Optional[str] = None, new_status: Optional[str] = None)
Response for When status of a goal changes
Attributes
old_status
class-attribute
instance-attribute
The status of the goal.
GoalValueChanged
dataclass
GoalValueChanged(id: Optional[str] = None, old_current_value: Optional[float] = None, new_current_value: Optional[float] = None)
Response for When current value of a goal changes
Attributes
old_current_value
class-attribute
instance-attribute
The current value of the goal being tracked.
GoalRefreshIssues
dataclass
GoalValueOrNoteUpserted
dataclass
EvaluatedAlert
dataclass
EvaluatedAlert(alert_title: Optional[str] = None, alert_threshold: Optional[float] = None, is_alert_triggered: Optional[bool] = None, tile_url: Optional[str] = None, tile_value: Optional[Any] = None)
Response for When a data driven alert is triggered
Attributes
alert_title
class-attribute
instance-attribute
The title of the alert.
alert_threshold
class-attribute
instance-attribute
The threshold at which the alert is triggered.
is_alert_triggered
class-attribute
instance-attribute
is_alert_triggered: Optional[bool] = field(default=None, metadata={'wire_name': 'isAlertTriggered'})
A boolean value (true, false) determining Whether or not the alert was triggered.
tile_url
class-attribute
instance-attribute
URL linking to the dashboard tile where the alert is set up.
QueryExecutionResults
dataclass
ExecuteDatasetQueriesJsonInput
dataclass
ExecuteDatasetQueriesJsonResponse
dataclass
GetGoalCheckinsResponse
dataclass
GetGoalCheckinResponse
dataclass
GetGoalCheckinResponse(timestamp: Optional[str] = None, value: Optional[float] = None, status: Optional[str] = None, notes: Optional[GoalNotes] = None)
Response for Get a goal check-in
Attributes
timestamp
class-attribute
instance-attribute
The date that the check-in was made.
value
class-attribute
instance-attribute
The value at the time of check in, if set.
Alert
dataclass
Alert(alert_id: Optional[str] = None, alert_title: Optional[str] = None, group_id: Optional[str] = None)
Response for Get alerts from Power BI
Attributes
alert_id
class-attribute
instance-attribute
The ID of the alert.
alert_title
class-attribute
instance-attribute
The title of the alert.
Reports
dataclass
QuerySpecification
dataclass
QuerySpecification(query: Optional[str] = None, serializer_settings: Optional[Dict[str, Any]] = None, impersonated_user_name: Optional[str] = None)
Definition: QuerySpecification
Attributes
query
class-attribute
instance-attribute
The text of the query. Can be multiline text.
CreateScorecardRequest
dataclass
ListedScorecard
dataclass
ListedScorecard(id: Optional[str] = None, name: Optional[str] = None, contact: Optional[str] = None)
Definition: ListedScorecard
Attributes
id
class-attribute
instance-attribute
The unique identifier of the scorecard.
CreateGoalRequest
dataclass
CreateGoalRequest(name: Optional[str] = None, owner: Optional[str] = None, value: Optional[str] = None, target: Optional[str] = None, status: Optional[str] = None, start_date: Optional[str] = None, completion_date: Optional[str] = None, note: Optional[str] = None, parent_id: Optional[str] = None)
Definition: CreateGoalRequest
Attributes
owner
class-attribute
instance-attribute
The email address of the goal's owner. Example: foo@bar.com
value
class-attribute
instance-attribute
The current value of the goal being tracked.
target
class-attribute
instance-attribute
The target value of the goal.
start_date
class-attribute
instance-attribute
The start date for the goal. Example: 2021-07-15.
completion_date
class-attribute
instance-attribute
The date for the goal to be completed by. Example: 2021-07-29.
note
class-attribute
instance-attribute
Note to attach to the initial check-in on goal creation. Can be multiline text
UpdateGoalRequest
dataclass
UpdateGoalRequest(name: Optional[str] = None, owner: Optional[str] = None, value: Optional[float] = None, target: Optional[float] = None, status: Optional[str] = None, start_date: Optional[str] = None, completion_date: Optional[str] = None)
Definition: UpdateGoalRequest
Attributes
name
class-attribute
instance-attribute
If provided, the new name of the goal.
owner
class-attribute
instance-attribute
If provided, the email address of the new goal owner.
value
class-attribute
instance-attribute
If provided, sets the new value of the goal.
target
class-attribute
instance-attribute
If provided, sets the new goal target.
status
class-attribute
instance-attribute
If provided, sets the new status of the goal.
start_date
class-attribute
instance-attribute
If provided, the new start date for the goal. Example: 2021-07-15.
GoalRefreshIssue
dataclass
GoalRefreshIssue(connection_type: Optional[str] = None, timestamp: Optional[str] = None, message: Optional[str] = None)
Definition: GoalRefreshIssue
Attributes
connection_type
class-attribute
instance-attribute
The connection type, either Current or Target.
timestamp
class-attribute
instance-attribute
The timestamp of when the failed refresh happened.
GoalValueCheckinRequest
dataclass
GoalValueCheckinRequest(timestamp: Optional[str] = None, value: Optional[float] = None, status: Optional[str] = None, note: Optional[str] = None)
Definition: GoalValueCheckinRequest
Attributes
timestamp
class-attribute
instance-attribute
Check-in date. Example: 2021-07-21
GoalValueCheckinUpdateRequest
dataclass
Payload
dataclass
ExportPayloadPowerBIReport
dataclass
ExportPayloadPowerBIReport(format: Optional[str] = None, power_b_i_report_export_configuration: Optional[Dict[str, Any]] = None)
Definition: ExportPayloadPowerBIReport
Attributes
format
class-attribute
instance-attribute
The export format for the Power BI report. The supported formats are: PPTX (PowerPoint), PDF, and PNG
ExportPayloadPaginatedReport
dataclass
ExportPayloadPaginatedReport(format: Optional[str] = None, paginated_report_configuration: Optional[Dict[str, Any]] = None)
Definition: ExportPayloadPaginatedReport
Attributes
format
class-attribute
instance-attribute
The export format for the paginated report. The supported formats are: PPTX (PowerPoint), PDF, ACCESSIBLEPDF (Accessible PDF), XLSX (Excel), DOCX (Word), CSV, XML, MHTML, and Image (BMP, EMF, GIF, JPEG, PNG, or TIFF).
ExportReportSettings
dataclass
Definition: ExportReportSettings
Attributes
include_hidden_pages
class-attribute
instance-attribute
include_hidden_pages: Optional[bool] = field(default=None, metadata={'wire_name': 'includeHiddenPages'})
A flag indicating whether to include hidden pages when exporting the entire report (when passing specific pages this property will be ignored). If not provided, the default behavior is to exclude hidden pages
PageBookmark
dataclass
ExportFilter
dataclass
ExportReportPage
dataclass
ExportReportPage(page_name: Optional[str] = None, visual_name: Optional[str] = None, bookmark: Optional[PageBookmark] = None)
Definition: ExportReportPage
Attributes
page_name
class-attribute
instance-attribute
The page name
visual_name
class-attribute
instance-attribute
(Optional) Visual name to be exported
EffectiveIdentity
dataclass
EffectiveIdentity(username: Optional[str] = None, datasets: Optional[List[str]] = None, roles: Optional[List[str]] = None, custom_data: Optional[str] = None, identity_blob: Optional[IdentityBlob] = None, reports: Optional[List[str]] = None)
Definition: EffectiveIdentity
Attributes
username
class-attribute
instance-attribute
The effective username reflected by a token for applying RLS rules (For OnPrem model, username can be composed of alpha-numerical characters or any of the following characters '.', '-', '_', '!', '#', '^', '~', '\', '@', also username cannot contain spaces. For Cloud model, username can be composed of all ASCII characters. username must be up to 256 characters)
datasets
class-attribute
instance-attribute
An array of datasets for which this identity applies
roles
class-attribute
instance-attribute
An array of RLS roles reflected by a token when applying RLS rules (identity can contain up to 50 roles, role can be composed of any character besides ',' and must be up to 50 characters)
custom_data
class-attribute
instance-attribute
The value of customdata to be used for applying RLS rules. Only supported for live connections to Azure Analysis Services.
identity_blob
class-attribute
instance-attribute
A blob for specifying the identity. Only supported for datasets with Direct Query connection to SQL Azure
IdentityBlob
dataclass
DynamicPowerBiButtonClickedTriggerResult
dataclass
PowerBiButtonClickedOutputs
dataclass
Definition: PowerBiButtonClickedOutputs
PowerbiClient
PowerbiClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)
Bases: ConnectorClientBase
Typed client for powerbi connector.
Initialize a PowerbiClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
token_provider
|
Optional[TokenProvider]
|
Optional token provider. Defaults to ManagedIdentityTokenProvider. |
None
|
options
|
Optional[ConnectorClientOptions]
|
Optional connector client options. |
None
|
Methods:
get_scorecards_async
async
Get scorecards
Gets a list of Power BI scorecards in the specified workspace.
create_scorecard_async
async
Create a scorecard
Creates a scorecard for Power BI goals.
get_multiple_goals_async
async
Get multiple goals
Get a list of Power BI goals in the specified scorecard.
create_goal_async
async
create_goal_async(input: CreateGoalRequest, groupid: str, scorecard_id: str) -> dict[str, Any] | None
Create a goal
Creates a Power BI goal on the specified scorecard.
get_goal_async
async
Get a goal
Gets the specified Power BI goal on a scorecard.
update_goal_async
async
Update a goal
Updates the Power BI goal's state.
execute_dataset_query_async
async
execute_dataset_query_async(input: QuerySpecification, groupid: str, datasetid: str) -> dict[str, Any] | None
Run a query against a dataset
Use the Power BI REST API to run a query.
execute_dataset_queries_json_async
async
execute_dataset_queries_json_async(input: ExecuteDatasetQueriesJsonInput, groupid: str, datasetid: str) -> dict[str, Any] | None
Run a json query against a dataset
Use the Power BI REST API to run a query in json format.
add_rows_async
async
Add rows to a dataset
Use Power BI REST API to add rows to a dataset.
goal_value_checkin_note_async
async
goal_value_checkin_note_async(input: GoalValueCheckinNoteInput, groupid: str, scorecard_id: str, goal_id: str, goal_checkin: str) -> None
Add a note to a check-in
Appends a new note to a check-in of a Power BI goal.
goal_value_checkin_async
async
goal_value_checkin_async(input: GoalValueCheckinRequest, groupid: str, scorecard_id: str, goal_id: str) -> None
Create a check-in
Creates a Power BI goal check-in.
get_goal_checkins_async
async
Get goal check-ins
Get all check-ins on a Power BI goal.
update_goal_checkin_async
async
update_goal_checkin_async(input: GoalValueCheckinUpdateRequest, groupid: str, scorecard_id: str, goal_id: str, goal_checkin: str) -> None
Update a check-in
Updates a Power BI goal check-in.
get_goal_checkin_async
async
get_goal_checkin_async(groupid: str, scorecard_id: str, goal_id: str, goal_checkin: str) -> dict[str, Any] | None
Get a goal check-in
Get a check-in on a Power BI goal.
refresh_dataset_async
async
Refresh a dataset
Use Power BI REST API to refresh a powerbi dataset.
initiate_export_to_file_for_pbi_reports_async
async
initiate_export_to_file_for_pbi_reports_async(input: ExportPayloadPowerBIReport, groupid: str, reportid: str) -> bytes
Export To File for Power BI Reports
Use Power BI Rest API to inititate export for Power BI reports
initiate_export_to_file_for_paginated_reports_async
async
initiate_export_to_file_for_paginated_reports_async(input: ExportPayloadPaginatedReport, groupid: str, reportid: str) -> bytes
Export To File for Paginated Reports
Use Power BI Rest API to inititate export for paginated reports
list_groups_async
async
ListGroups
Get Groups for Power BI.
get_alerts_async
async
Get alerts from Power BI
Return a list of alerts for a signed in user.
list_datasets_async
async
ListDatasets
Get datasets for Power BI group.
list_tables_async
async
ListTables
Get tables for Power BI dataset.
get_reports_in_group_async
async
Get Reports in Group
Returns a list of reports from the specified workspace.