Invoke API Request
Generated Cmdlet Help
This page has been generated from the NinjaOne PowerShell module source. To make changes please edit the appropriate PowerShell source file.
SYNOPSIS
Sends a request to the NinjaOne API.
SYNTAX
Invoke-NinjaOneRequest [-Method] <String> [-Uri] <String> [[-Body] <String>] [-Raw]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Wrapper function to send web requests to the NinjaOne API.
EXAMPLES
EXAMPLE 1
Invoke-NinjaOneRequest -Method 'GET' -Uri 'https://eu.ninjarmm.com/v2/activities'
Make a GET request to the activities resource.
PARAMETERS
-Method
HTTP method to use.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Uri
The URI to send the request to.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-Body
The body of the request.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Raw
Return the raw response - don't convert from JSON.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
Outputs an object containing the response from the web request.
NOTES
RELATED LINKS
https://docs.homotechsual.dev/modules/ninjaone/commandlets/Invoke/apirequest