I am using the REST based API for the TFS 2015 to get list of Service Endpoints (as per the reference). But facing an issue while extracting the information.
We have an on prem instance of TFS 2015 (Version 14.102.25423.0). Below is the URL I am trying to get the list of service endpoints.
Error:
In Browser
{"count":1,"value":{"Message":"An error has occurred."}}
In PowerShell
Invoke-RestMethod : {"count":1,"value":{"Message":"An error has occurred."}} At D:\DevOps\TFS\TFSServiceModule.psm1:75 char:23 + ... $result = Invoke-RestMethod -Method Get -Uri $uri -Credential $Cred ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpW ebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell .Commands.InvokeRestMethodCommand
Could anyone let me know how can I fix this? Or refer me to some additional documentation to go through.