Hello,
We have a Jira Server On-Premise with a Tempo Account for Jira integration.
I would like to manage both of them with API Request made from Powershell.
I created a Personnal Access Token (PAT) on Jira server and all of the Jira Server Requests are Fine :
$JiraOnPremHeaders = @{
Authorization = "Bearer $JiraOnPremToken"
Accept = "application/json"
}
Invoke-RestMEthod -Method Get -Uri "$($JiraOnPremServer)/rest/api/2/project" -Headers $JiraOnPremHeaders
$JiraTempoCredentials = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$($JiraOnPremUser):$($JiraOnPremToken)"))
$JiraTempoHeaders = @{
Authorization = "Basic $JiraTempoCredentials"
Accept = "application/json"
}
Invoke-RestMEthod -Method Get -Uri "$($JiraOnPremServer)/rest/tempo-accounts/1/account" -Headers $JiraTempoHeaders
Finally it's working this way :
$JiraOnPremHeaders = @{
Authorization = "Bearer $JiraOnPremToken"
Accept = "application/json"
}
$JiraAccounts = Invoke-RestMEthod -Method Get -Uri "$($JiraOnPremServer)/rest/tempo-accounts/1/account" -Headers $JiraOnPremHeaders
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.