I followed this guide:
https://developer.atlassian.com/server/jira/platform/basic-authentication/
I entered the line into command prompt:
"curl -H "Authorization: Basic MYBASE64STRING" -X GET -H "Content-Type: application/json" http://MYSERVERSITE/jira/rest/api/latest/issue/BIT-1234?MYJQLSEARCH"
Then in the command prompt it gives me the JSON data. My question is what do I do from here? Because when I use excel VBA to grab the JSON data it says "You do not have permission to see the specified issue. Login-required."
Anyone know what's wrong?
Hi Marcus,
It sounds like curl is working as expected (you get JSON back with information about the issue) and the issue is with using the same API call with VBA in Excel. Is that right?
In looking through another Community thread, it seems that a common problem is not including the right headers. Without seeing your VBA code, I might suggest checking all the headers you have set against those listed in various answers on that thread.
I'm no VBA expert, but I was able to find a tutorial with code examples that might also be helpful:
This should provide some boilerplate code to start with for you to swap in your credentials and Jira Server URL.
Cheers,
Daniel
Hi Daniel,
Thanks for the reply. Yes that is the issue. I made a button and made a module and the code is excel code right now is:
Sub Hello()
Set MyRequest = CreateObject("WinHttp.WinHttpRequest.5.1")
MyRequest.Open "Get", "MYLINK"
MyRequest.Send
MsgBox MyRequest.ResponseText
End Sub
The link to the other community thread you provided is actually exactly what I want to do, but right now I'm just trying to get the JSON data to appear in a message box to make sure the API call is actually working. Can you please let me know the error in my code? Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.