Downloading XML export

Gustavo Miller June 9, 2021

I have successfully extracted a number of documents we have in Jira Work Management and parse the XML and put data into an access database to make some queries and reports.

Now I want to automate the XML download. I have found some VBA code but I cannot authenticate and successfully login.

1 comment

Gustavo Miller June 9, 2021

I am trying now with JSON ], but, I can pull the data on the browser and it returns me the JSON document - so this is fine, but when do it programmatically it tells me I have no permissions.

here is my code:

Set myReq = CreateObject("WinHttp.WinHttpRequest.5.1")
myReq.Open "GET", "https://{my server}/rest/api/2/issue/BI-2393"
myReq.send

Debug.Print myReq.responseText

I get this error:

{"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}

Alfredo Negrete June 9, 2021

I think you'll need some type of authentication on the Jira side to allow the API access your instance.

Gustavo Miller June 9, 2021

Perhaps I should ask these permissions to the managers. Thanks for the tip...

Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 9, 2021

@Gustavo Miller 

For the REST API calls, you need to pass in the authentication details in the payload.

from the code snippet, it is not apparent that you have passed the authentication creds (username, password/API token)

 

The error denotes that you are trying to access the link with anonymous user and this operation is not permitted for non authenticated users.

Gustavo Miller June 11, 2021

Indeed, you are right. I think I am starting in the wrong way. i think I need to read some more about the different services and how things work, before I can jump into developing applications to talk to JIRA.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events