In this article you learn about the way to use PowerShell with the Reseller update API.
# This is the API endpoint
$url3 = "https://dashboard.heimdalsecurity.com/api/heimdalapi/reseller/update";
# These are the authentication settings
$contentType3 = "application/json"
$basicAuth3 = "your_API_key"
$headers3 = @{
"Authorization" = "Bearer $basicAuth3"
"Accept" = "*/*"
"Accept-Encoding" = "gzip, deflate, br"
};
# This is they way the data needs to be relayed
$data = @{
customerId = your_customer_ID;
products = @("TPN", "REP");
};
# Converting data to Json
$json = $data | ConvertTo-Json;
Invoke-RestMethod -Method PUT -Uri $url3 -ContentType $contentType3 -Headers $headers3 -Body $json;