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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.