Skip to content

Latest commit

 

History

History
183 lines (141 loc) · 3.84 KB

File metadata and controls

183 lines (141 loc) · 3.84 KB
document type cmdlet
external help file FabricTools-Help.xml
HelpUri
Locale en-US
Module Name FabricTools
ms.date 03/31/2026
PlatyPS schema version 2024-05-01
title Invoke-FabricAPIRequest_duplicate

Invoke-FabricAPIRequest_duplicate

SYNOPSIS

Sends an HTTP request to a Fabric API endpoint and retrieves the response. Takes care of: authentication, 429 throttling, Long-Running-Operation (LRO) response

SYNTAX

__AllParameterSets

Invoke-FabricAPIRequest_duplicate [-Headers] <hashtable> [-BaseURI] <string> [-Method] <string>
 [[-Body] <string>] [[-ContentType] <string>] [<CommonParameters>]

ALIASES

DESCRIPTION

The Invoke-RestMethod function is used to send an HTTP request to a Fabric API endpoint and retrieve the response. It handles various aspects such as authentication, 429 throttling, and Long-Running-Operation (LRO) response.

EXAMPLES

EXAMPLE 1

This example sends a GET request to the "/api/resource" endpoint of the Fabric API. powershell

Invoke-FabricAPIRequest_duplicate -uri "/api/resource" -method "Get"

EXAMPLE 2

This example sends a POST request to the "/api/resource" endpoint of the Fabric API with a request body. powershell

Invoke-FabricAPIRequest_duplicate -authToken "abc123" -uri "/api/resource" -method "Post" -body $requestBody

PARAMETERS

-BaseURI

{{ Fill BaseURI Description }}

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Body

The body of the request, if applicable.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 3
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ContentType

The content type of the request. The default value is 'application/json; charset=utf-8'.

Type: System.String
DefaultValue: application/json; charset=utf-8
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 4
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Headers

{{ Fill Headers Description }}

Type: System.Collections.Hashtable
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Method

The HTTP method to be used for the request. Valid values are 'Get', 'Post', 'Delete', 'Put', and 'Patch'. The default value is 'Get'.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

This function requires the Get-FabricAuthToken function to be defined in the same script or module.

Author: Rui Romano.

RELATED LINKS

{{ Fill in the related links here }}