Skip to content

Commit

Permalink
Create sample.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
kenrward authored Dec 6, 2023
1 parent 8ff4ab5 commit 05be599
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Segment/API/sample.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$APIKey = '<INSERT_KEY>'

#Headers
$znHeaders = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$znHeaders.Add("Authorization",$APIKey)
$znHeaders.Add("content-type","application/json")

$uri = "https://portal.zeronetworks.com/api/v1"


#Get the total number of assets
$allAssets = Invoke-RestMethod -Uri "$uri/assets?_limit=1&_offset=0&_filters=&with_count=true&order=asc&orderColumns[]=name" -Method Get -Headers $znHeaders

$allAssets

0 comments on commit 05be599

Please sign in to comment.