I’m using the Infinity plugin for Grafana the problem is the api I am trying to use first requires me to get a bearer token.
For example using this CLI:
curl --location 'https://serverIpAddress/api/5.0/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "userName",
"password": "passWord"
}' \
--insecure
Then returns :
{"data":{"access_token":"eYtNGVjYS05OD....","refresh_token":"16248292...f"},"metadata":{}}
Only AFTER I get back the access_token can actually make my API call.
I coudn’t find in any of the documentation on how to first ask for the bearer token then submit the quest
I see the option right next to “Bearer token” called “Basic Authentication” have you tried that one?
yes, but I need to first auth to get a bearer token. Im not sure how to do that with basic auth? Or am I not understanding how it works?
From what I can tell, if I do this manually first I make a auth request to get a bearer token. Then i can use that token to execute the api command. But I cant find in the instructions how to chain this together
If you use basic auth you don’t need the bearer token. It’ll just use the username and password.
Have you tried only using the basic auth option with your username and password and see if it works? (without any bearer token configuration)
Simply put your username and password here, save it and give it a try
1 Like
not yet possible but on roadmap
@yesoreyeram is the auth of that amazing datasource
1 Like