I am successfully using PowerShell Invoke-RestMethod to run jql queries, but when i add a fields list, &fields, or &startAt - the ampersand & does not seem to be getting parsed correctly
This works fine:
$Headers = @{ Authorization = $basicAuthValue }
$Body = @{ jql = "status=Closed" }
$Params = @{
Uri = "https://me.com/rest/api/2/search"
Method = "GET"
Headers = $Headers
Body = $Body
}
$response = Invoke-RestMethod @Params
$response | ConvertTo-Json
But if the jql contains a fields list:
$Body = @{ jql = "status=Closed&fields=project" }
The remote server returned an error: (400) Bad Request.
If I capture the error:
{Field 'fields' does not exist or you do not have permission to view it.}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.