Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch JIRA Custom Fields via REST API URI call

Balu All November 14, 2019

Hello, I would like someone to help me fetch the custom field "Epic Link" using a REST API call. I have written a piece of VB macro that connects to the cloud instance and fetches the JSON. Sadly, the JSON is not including the custom field.

 

This is my URI

sJQL = "https://somewebsite.com/issues2/rest/api/latest/search?jql=project%20%3D%20SISBTXTRPR%20AND%20issuetype%20%3D%20Story%20ORDER%20BY%20key%20ASC"

 

This is how I am connecting to JIRA

Public Function ConnectToJIRA(strJQL As String) As Object
With JiraService
.Open "GET", strJQL, False
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Authorization", "Basic " & UserPassBase64
.Send ""

If .Status = "401" Then
MsgBox "Not authorized or invalid username/password"
Else
End If

JSONFile.WriteLine JiraService.ResponseText
Set JSONObj = JsonConverter.ParseJson(JiraService.ResponseText)
Set ConnectToJIRA = JSONObj
End With

End Function

 

The JsonConverter.ParseJson is a free source code that parses the JSON response into an object.

Sadly, the Atlassian article shows how to to make a REST API call via cURL. I do not know how to use cURL in a VB macro. Thanks in advance.

1 answer

0 votes
Balu All November 15, 2019

Bumping thread. Can someone please help?

Suggest an answer

Log in or Sign up to answer