Use value of QUERY A to build QUERY B

Hi,

i use grafana version 11.2.2

I have a dashboard, in the panel i have a query A to retrieve the username and i need to build a query B with this name to have more information on the user, but i can’t find a way to use the result of QueryA to put on the URL of Query B.

The panel its a repeat option, with multiple value of a global variable that use in query A.

Do you have a solution ?

query A :

Query B :

repeat option :

Thanks for your help

Step-by-Step Solution using GitHub API
Step 1: Fetch GitHub Usernames (Query A)

  1. Go to Grafana → Open your dashboard → Click on “Edit Panel”.
  2. Select Data Source: Infinity.
  3. Set Type: JSON / REST API.
  4. Set Method: GET.
  5. In URL, enter: https://api.github.com/orgs/grafana/members
  6. In Parsing Query, enter: $.login
    (This extracts usernames from the API response.)
  7. Click Run Query → You should see usernames appear.

Step 2: Create a Variable $username

  1. Go to Dashboard Settings → Click on Variables.
  2. Click New → Name it username.
  3. Select Type: Query.
  4. Set Data Source: Infinity.
  5. In Query, enter: $.login
  6. Check Multi-value option.
  7. Click Save.
    Now, $username stores all usernames dynamically.

Step 3: Fetch User Details (Query B)

  1. Add a new panel or edit an existing one.
  2. Select Data Source: Infinity.
  3. Set Type: JSON / REST API.
  4. Set Method: GET.
  5. In URL, enter: https://api.github.com/users/${username}
    (This dynamically fetches details for each username.)
  6. In Parsing Query, extract the fields you need:
    o $.login → Username
    o $.name → Full Name
    o $.public_repos → Repositories
    o $.followers → Followers
    o $.following → Following
  7. Click Run Query → You should see user details appear.

Step 4: Enable Panel Repeat

  1. Go to Panel Settings → Scroll to Repeat Options.
  2. Set Repeat by: $username.
  3. Click Save.
    Now, the panel will repeat for each username, showing different user details dynamically!