FabricTools v0.33.0 Public Preview

Get-FabricUsageMetricsQuery

Retrieves usage metrics for a specific dataset.

Syntax

Get-FabricUsageMetricsQuery [-DatasetID] <guid> [-groupId] <guid> [-reportName] <Object>
 [[-ImpersonatedUser] <string>] [<CommonParameters>]

Description

The Get-FabricUsageMetricsQuery function retrieves usage metrics for a specific dataset. It supports multiple aliases for flexibility.

Examples

Example 1

Get-FabricUsageMetricsQuery -DatasetID "your-dataset-id" -groupId "your-group-id" -reportname "your-report-name" -token "your-token"

This example retrieves the usage metrics for a specific dataset given the dataset ID, group ID, report name, and token.

Parameters

NameTypeReq.Pos.PipelineDescription
-DatasetID guid ✓Required 0 –

The ID of the dataset. This is a mandatory parameter.

-groupId guid ✓Required 1 –

The ID of the group. This is a mandatory parameter.

-reportName object ✓Required 2 –

The name of the report. This is a mandatory parameter.

-ImpersonatedUser string 3 –

The name of the impersonated user. This is an optional parameter.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

The function defines the headers and body for a POST request to the PowerBI API to retrieve the usage metrics for the specified dataset. It then makes the POST request and returns the response.

Author: Ioana Bouariu