@Michael51 wrote:
Hello,
I am trying to pull list of users using the Rest API. I had this working last in April, on a different laptop. I have changed laptops and haven’t tried getting this script running since then. It work successfully back in April on the other system.
I run the following, which is just the beginning of the entire script.
$APIKey=“Token token=”
$URI0 = “https://api.pagerduty.com/users?limit=100&offset=0”
Invoke-RestMethod -Method Get -Uri $URI0 -Headers @{“Authorization”=$APIKey}I started getting this error:
Invoke-RestMethod : {“error”:{“message”:“Not Found”,“code”:2100}}I then started removing parts of the url and I finally got some sort of response just using “https://api.pagerduty.com”
Once I add /users onto the end, it fails again. I have no idea what changed from April till now. It doesn’t look like its something with the new system I am on.
Any help is appreciated! I am new to API’s.
Posts: 4
Participants: 2