Skip to content

Commit

Permalink
Update Get-AuditLogByTimeRange.ps1
Browse files Browse the repository at this point in the history
Change URL to prod vs dev.
  • Loading branch information
TKoziana authored Dec 8, 2024
1 parent 21dd8d6 commit ace82ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Segment/Trust Server/Get-AuditLogByTimeRange.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $endtime = [DateTimeOffset]::Parse($humanendtime).ToUnixTimeMilliseconds()
$myhome = [Environment]::GetFolderPath('UserProfile')
$CsvPath = Join-Path $myhome ("Audit Log-" + $humanstarttime + "-to-" + $humanendtime + ".csv")

$uri = "https://portal-dev.zeronetworks.com/api/v1/audit?_limit=400&_cursor=&_search=&from=" + $starttime + "&to=" + $endtime + "&_filters=&order=desc"
$uri = "https://portal.zeronetworks.com/api/v1/audit?_limit=400&_cursor=&_search=&from=" + $starttime + "&to=" + $endtime + "&_filters=&order=desc"

#Get the first 400 audit logs

Expand All @@ -33,7 +33,7 @@ write-output $s.scrollCursor
#Get the remaining audit logs in 400 count batches.

while ($s.items.count -ne "0"){
$uri = "https://portal-dev.zeronetworks.com/api/v1/audit?_limit=400&from=" + $starttime + "&to=" + $endtime + "&_cursor=" + $s.scrollCursor + "&_search=&_filters=&order=desc"
$uri = "https://portal.zeronetworks.com/api/v1/audit?_limit=400&from=" + $starttime + "&to=" + $endtime + "&_cursor=" + $s.scrollCursor + "&_search=&_filters=&order=desc"
$s = Invoke-RestMethod -Uri $uri -Method Get -Headers $znHeaders
$t += $s.items
write-output $s.scrollCursor
Expand Down

0 comments on commit ace82ce

Please sign in to comment.