< Back

Invoke-AMRestMethod

Sat Jan 11, 2020 2:48 am

NAME Invoke-AMRestMethod



SYNOPSIS

Invokes a command against the AutoMate Enterprise management API.





SYNTAX

Invoke-AMRestMethod -Resource <String> [-RestMethod <String>] [-Body <String>] [-FilterScript <ScriptBlock>]

[<CommonParameters>]



Invoke-AMRestMethod -Resource <String> [-RestMethod <String>] [-Body <String>] [-FilterScript <ScriptBlock>]

[-Connection <Object>] [<CommonParameters>]





DESCRIPTION

Invoke-AMRestMethod makes calls against the REST API and returns results.





PARAMETERS

-Resource <String>

The REST resource to call.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RestMethod <String>

The REST method to use.



Required? false

Position? named

Default value Get

Accept pipeline input? false

Accept wildcard characters? false



-Body <String>

When using the POST method, the body to send to the API.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-FilterScript <ScriptBlock>

Applies the specified filter to the results from the API prior to property addition and date conversion to

improve performance. When passing dates in the filter, they must be in UTC.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Connection <Object>

The AutoMate Enterprise management server.



Required? false

Position? named

Default value

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



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Call the API to get server information



Invoke-AMRestMethod -Resource "info/get" -RestMethod Get











RELATED LINKS

http://cloud.networkautomation.com/inst ... l_API.html