Hi
I have a working solution for GET using PowerShell. Can anyone help me to convert this to POST or share their working solution please?
i'd like to POST values from a CSV into a reference set.
if ("TrustAllCertsPolicy" -as [type]) {} else {
Add-Type "using System.Net;using System.Security.Cryptography.X509Certificates;public class TrustAllCertsPolicy : ICertificatePolicy {public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) {return true;}}"
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
}
$headers = @{}
$headers.add("Version","10.1")
$headers.add("Content-Type","application/JSON")
$Headers.add("SEC","token")
$url = "https://consoleip/api/reference_data/sets"
$ListAllSets = Invoke-RestMethod -Method GET -Headers $headers -Uri $url
------------------------------
Q SIEM
------------------------------