< Back
Invoke-PowerBIRestMethod
Post
NAME Invoke-PowerBIRestMethod
SYNOPSIS
Executes a REST call to the Power BI service, with the specified URL and body.
SYNTAX
Invoke-PowerBIRestMethod [-Body <String>] [-ContentType <String>] [-Headers <Hashtable>] -Method {Get | Post |
Delete | Put | Patch | Options} [-Organization <String>] [-OutFile <String>] -Url <String> [-Version <String>]
[<CommonParameters>]
DESCRIPTION
Invokes a REST request against the Power BI service using the profile you're logged in with. The REST verb can be
specified using the -Method parameter. The -Body parameter is required for the verbs POST, PUT, and PATCH. Before
you run this command, make sure you log in using Connect-PowerBIServiceAccount.
PARAMETERS
-Body <String>
Body of the request, also known as content . This is optional unless the request method is POST, PUT, or PATCH.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ContentType <String>
Content type to specify inside the header for the request. Default is 'application/json'.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Headers <Hashtable>
Optional headers to include with the request.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Method <PowerBIWebRequestMethod>
Type of HTTP request method\\verb to make with the call.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Organization <String>
Organization name or tenant GUID to include in the URL. Default is 'myorg'.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-OutFile <String>
Output file for writing the response content to. File path specified must not exist.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Url <String>
Relative or absolute URL of the Power BI entity you want to access. For example, if you want to access
https://api.powerbi.com/v1.0/myorg/groups, then specify 'groups', or pass in the entire URL.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Version <String>
Version of the API to include in the URL. Default is 'v1.0'. Ignored if -Url is an absolute URL.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> Invoke-PowerBIRestMethod -Url 'groups' -Method Get
Invokes the URL https://api.powerbi.com/v1.0/myorg/groups with the GET method\\verb.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... werbirestm
ethod?view=powerbi-ps
SYNOPSIS
Executes a REST call to the Power BI service, with the specified URL and body.
SYNTAX
Invoke-PowerBIRestMethod [-Body <String>] [-ContentType <String>] [-Headers <Hashtable>] -Method {Get | Post |
Delete | Put | Patch | Options} [-Organization <String>] [-OutFile <String>] -Url <String> [-Version <String>]
[<CommonParameters>]
DESCRIPTION
Invokes a REST request against the Power BI service using the profile you're logged in with. The REST verb can be
specified using the -Method parameter. The -Body parameter is required for the verbs POST, PUT, and PATCH. Before
you run this command, make sure you log in using Connect-PowerBIServiceAccount.
PARAMETERS
-Body <String>
Body of the request, also known as content . This is optional unless the request method is POST, PUT, or PATCH.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ContentType <String>
Content type to specify inside the header for the request. Default is 'application/json'.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Headers <Hashtable>
Optional headers to include with the request.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Method <PowerBIWebRequestMethod>
Type of HTTP request method\\verb to make with the call.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Organization <String>
Organization name or tenant GUID to include in the URL. Default is 'myorg'.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-OutFile <String>
Output file for writing the response content to. File path specified must not exist.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Url <String>
Relative or absolute URL of the Power BI entity you want to access. For example, if you want to access
https://api.powerbi.com/v1.0/myorg/groups, then specify 'groups', or pass in the entire URL.
Required? true
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Version <String>
Version of the API to include in the URL. Default is 'v1.0'. Ignored if -Url is an absolute URL.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\\> Invoke-PowerBIRestMethod -Url 'groups' -Method Get
Invokes the URL https://api.powerbi.com/v1.0/myorg/groups with the GET method\\verb.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... werbirestm
ethod?view=powerbi-ps