-
I am currently trying to configure a JSON API datasource in my local installation of Grafana. I need it to be able to query the REST URL for my team's Jira server. Authentication on our Jira server is done through Keycloak. I am able to put the Jira REST location in my browser and get the complete JSON response at "https:///rest/api/latest/search?". I am using that as the URL in the data source configuration panel. The only way I am currently able to successfully Save & Test the data source is by not selecting any authorization or having anything entered for Custom HTTP headers. When I create a new panel on my dashboard and attempt to define a Field query, I instantly get an empty set for the Jira issues, as shown in the attached image. When I play around with the URL and focus on a specific issue, I get "Not authorized" errors. I have tried generating an API token and using that in the data source settings, as seen suggested in other discussions, but to no avail. I am also getting the same empty results when opening Terminal and attempting to connect through cURL. I'm not sure what I am doing incorrectly, and would appreciate any assistance. I can provide more details as needed. I didn't want to unnecessarily overload anyone with a data dump and make this a "read-it-and-leave-it" post. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found the cause of the problem. I was attempting to use the Basic method in my Authorization header, when I needed to use the Bearer method (-H Authorization: Bearer <access/API token>). Everything is showing properly after that change. |
Beta Was this translation helpful? Give feedback.
I found the cause of the problem. I was attempting to use the Basic method in my Authorization header, when I needed to use the Bearer method (-H Authorization: Bearer <access/API token>). Everything is showing properly after that change.