From 543d5700248c79119d03881ce562cbe446119f2f Mon Sep 17 00:00:00 2001 From: eeckert Date: Wed, 9 Aug 2023 08:19:49 -0600 Subject: [PATCH] first commit --- snapper-APITest.ps1 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 snapper-APITest.ps1 diff --git a/snapper-APITest.ps1 b/snapper-APITest.ps1 new file mode 100644 index 0000000..e5c627e --- /dev/null +++ b/snapper-APITest.ps1 @@ -0,0 +1,17 @@ +$APIToken = 'szjxBgQNQSW1xq2ByjKB' +$APIUrl = 'https://app3.archisnapper.com/api/public/v1/' + +$url_APIToken = '?auth_token='+$APIToken + +$header = @{ + auth_token = $APIToken +} | ConvertTo-Json + +# get list of projects +$URI = $APIUrl+'sites.json'+$url_APIToken +$response = Invoke-WebRequest -Uri $URI -Method Get + + +$ProjectList = $response.Content | convertfrom-json + +