Hi there,
I would like to connect with Powershell to our Jira Cloud environment.
Authentication by using a Token instead of username and password.
So thought that shouldn't be difficult
One of the syntax I tried was:
$Headers = @{
Authorization = 'Bearer'
Token = $token
}
Invoke-WebRequest -Uri 'https://transdev-nl.atlassian.net/rest/api/2/search?jql=project = CIT AND issuetype = "JIRA Request" AND (created >= startOfDay(-30d) OR updated >= startOfDay(-30d))' -Headers $Headers
But the system sas no! 
or
Invoke-WebRequest : The remote server returned an error: (400) Bad Request.
At line:7 char:1
+ Invoke-WebRequest -Uri 'https://transdev-nl.atlassian.net/rest/api/2/ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Guys can someone help me with getting the correct syntax to make this work.
Kind regards,
Murat