Hi, we have a legacy system where we need a VBScript to create JIRA tickets. Does anyone have any suggestions/info/links to show me how I can make JIRA API work with that? Thanks.
Community moderators have prevented the ability to post new answers.
I successfully connected to the JIRA API using this VBScript:
Dim restReq, url, auth Set restReq = CreateObject("Msxml2.ServerXMLHTTP.6.0") url = "http://my.jira.instance/rest/api/2/application-properties" 'the following base64 authentication string was created at any base64 conversion site by using the "username:password" format auth = "(my_base64_username:password)" restReq.open "GET", url, false restReq.SetRequestHeader "Authorization", "Basic " & auth restReq.send WScript.echo restReq.responseText
Hello Paul,
Thank you for your question.
You could be run something like:
Option Explicit Dim restReq, url, uname, passw Set restReq = CreateObject("Microsoft.XMLHTTP") ' https://docs.atlassian.com/jira/REST/latest/#d2e1496 ' Returns an application property. url = "http://jira.domain/rest/api/2/application-properties" ' <your-username>, i.e.: myuser ' <your-password>, i.e.: mypasswordABC uname = "<your-username>" passw = "<your-password>" restReq.open "GET", url, false, uname, passw restReq.send WScript.echo restReq.responseText
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What would creating an actual ticket look like? Eg: How to specify a summary and description?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
below is the way to create a ticket in jira.. -
Dim restReq , url, auth
strJSONToSend = "{""fields"":{""project"":{""key"":""Project""},""summary"":""Test Hello"",""issuetype"":{""name"":""Defect""}}}"
Set restReq = CreateObject("Msxml2.ServerXMLHTTP")
URL= "http://onejira-testyourJiraURL/api/2/issue"
'the following base64 authentication string was created at any base64 conversion site by using the "username:password" format
auth = "(YourAuthCode)"
restReq.open "POST",url, false
restReq.SetRequestHeader "Authorization", "Basic " & auth
restReq.setRequestHeader "Content-Type", "application/json"
restReq.send strJSONToSend
WScript.echo restReq.responseText
set objJSONDoc = nothing
set objResult = nothing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.