I had been trying to build a GroupShareKit application to manage/manipulate projects through a workflow. Unfortunately, my app would not return any projects when access the REST API, see question titled "Can not query projects using GroupShareKit".
Thinking to debug the problem down a different path, I wrote several PowerShell scripts using Invoke-RestMethod to test the REST API directly. I have achieved the same results using this model and I am trying to figure out if there is something special I need to do on the server to enable this API?
I can login and get a bearer access token. I can use that token to make other REST requests successfully, but when I try to query a list of projects, I "Successfully" get no results, where "successfully" means the Invoke-RestMethod call did not return any 3xx, 4xx or 5xx error code.
Working requests:
Invoke-RestMethod -Method Post -uri myserver/.../login -Body (ConvertTo-Json $Body) -Header @{"Authorization"="Basic c2E6c2E="} -ContentType "application/json"
Invoke-RestMethod -Method Get -uri myserver/.../Users -Header @{"Authorization"="Bearer $token"}
Project Request whichreturns no data:
Invoke-RestMethod -Method Get -uri myserver/.../Projects @{"Authorization"="Bearer $token"}