diff --git a/Segment/API/sample.ps1 b/Segment/API/sample.ps1 new file mode 100644 index 0000000..a5ebce5 --- /dev/null +++ b/Segment/API/sample.ps1 @@ -0,0 +1,14 @@ +$APIKey = '' + +#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