Hi All,
i need help to create a powershell script using REST API command.
i don’t found a lot of documentation for the specific use of REST API in powershell.
in the community in have found a sample for POST LOGIN
$headers = @{}
$headers.add("Accept", "application/json")
$headers.add("Content-Type","application/json")
$username = "user"
$password = "passwordtoencode"
$encodePassword = convert]::ToBase64String(nText.Encoding]::UTF8.GetBytes($password))
$body = @{username=$username;password=$encodePassword;}
$response = Invoke-RestMethod 'http://hostname/webconsole/api/Login' -Method POST -Headers $headers -Body $($body | ConvertTo-Json )
$response
But somenone have sample for all kind of REST API sample ?
Thank in advance
Christophe