0

I need to get back a list of all projects from JIRA. I am using the rest api to retrieve back the results /rest/api/2/search?jql=project in("Project Mango") .

In the browser it works. When I try to retrieve the data using VBA I am getting the following error :{"errorMessages":["The value 'Project Mango' does not exist for the field 'project'."],"errors":{}}

The reason "Project Mango" is in quotes it is because it contains a space i guess. Other projects that are not surronded in quotes works fine. I am using winhttp 5.1 to send and retrieve the text (vba). So I do not believe that is an issue but more of , the quotes?. I have tried """" or single quotes but same error. I have even tried to save the filter in jira and then call it but same issue. What else could I try?

Rory Lester
  • 2,858
  • 11
  • 49
  • 66
  • Typically when passing in parameters via the URL querystring you should *URLencode* them - see e.g. http://stackoverflow.com/questions/6312780/sending-data-from-excel-to-server-using-http-post/6313147#6313147 (has a link to a function you can use to encode your parameters) – Tim Williams Aug 09 '15 at 17:59
  • I do not believe I need to encode it. I am using winhttp and i have a GET method. if it was a post method then i would understood .. unless i am missing something? – Rory Lester Aug 09 '15 at 18:22
  • Don't know much about VBA but you could just use the Project Key instead of the Project Name to avoid needing quotes and spaces. – Welsh Aug 09 '15 at 20:51
  • i thought of that too, i have done in which case it does not use quotes anymore and same issue occurs. have no idea why it would happen ... guess it is not the quotes that is the issue – Rory Lester Aug 09 '15 at 21:49
  • @RoryLester - why do you think you don't need to url-encode your querystring parameters ? There's a reason it's called *URL* encoding... GET specifically needs to be encoded if you're trying to send characters which are not supported by the spec. – Tim Williams Aug 10 '15 at 02:16
  • I have tried that too Tim and it does not work. It does not make sense that I can access one project but not another but I am out of ideas. I thought it may be permission issues but I made myself admin on both the jira project – Rory Lester Aug 10 '15 at 20:11

1 Answers1

0

It's an obfuscated .. "the user does not have permissions to access this information" message. Make sure you're not logged in as an anonymous user and/or the user you're logged in as has permissions to do whatever it is you're doing.

demented hedgehog
  • 7,007
  • 4
  • 42
  • 49