$url = 'https://api.loghive.app/v1/event/add'
$headers = @{
'Content-Type' = 'application/json'
'ApiKey' = 'YourPersonalApiKey'
}
$data = @{
project= 'yourprojectname'
group= 'yourgroupname'
event= 'your-event-name'
description= 'your-description'
notify= false
} | ConvertTo-Json
Invoke-RestMethod -Uri $url -Method Post -Headers $headers -Body $data
$url = 'https://api.loghive.app/v1/insight/add'
$headers = @{
'Content-Type' = 'application/json'
'ApiKey' = 'YourPersonalApiKey'
}
$data = @{
project= 'MySaas'
insight= 'system1-online'
value= 1
} | ConvertTo-Json
Invoke-RestMethod -Uri $url -Method Post -Headers $headers -Body $data