I am trying to intergrate database (MS-Sql) and jira to raise a issue on jira using JiraPS but I don't know where to start. Any solution for this.
Hello @Praveen K L
Welcome to the Atlassian community.
Can you describe your scenario in more detail? How are you trying to integrate your database and Jira? What is the flow of events that would lead to an issue being created in Jira?
Thanks @Trudy P Claspill Yeah sure.
I have created a database with field inputs like Plugin I'd, Plugin family and few more columns. Now we have to create an issue with these field inputs to be inserted in Jira issue while creating issue.
What is your level of experience with Powershell?
Are you trying to figure out how to get the data from your database?
Are you trying to figure out how to use the JiraPS module itself just to interact with Jira?
Hi @Trudy P Claspill
Without JiraPS, I have tried to create issue using the rest api but that gives a 400 bad gateway error.
Code for you reference,
$JiraUrl = "https://my jiraurl/rest/api/2/issue"$ApiToken = " apitoken"$Base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(maild:$ApiToken))
$IssueData = @{"fields" = @{"project" = @{"key" = "TEST"}"summary" = "This is issue summary""description" = "This is the issue description""issuetype" = @{"name" = "Incident"}}}
$RequestBody = $IssueData | ConvertTo-Json
$Response = Invoke-RestMethod -Uri $JiraUrl -Headers @{Authorization = "BASIC" + $Base64AuthInfo} -Method Post -ContentType "application/json" -Body $RequestBody
* I am new to both the technology, trying to learn new things. I was unable to figure out the exact reason for 400 bad gateway error. So if the rest api code works fine we can use Rest api for database integration.
Note: JiraPS code is working fine for me.
It looks like you're new here. Sign in or register to get started.