# How to pass URL Dynamically in Grafana using Infinity Plugin

**URL:** <https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989>\
**Category:** Grafana\
**Tags:** api\
**Created:** [May 4, 2021, 7:58am UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989 "2021-05-04T07:58:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinayvadlamudi](https://avatars.discourse-cdn.com/v4/letter/v/59ef9b/32.png) [@vinayvadlamudi](https://community.grafana.com/u/vinayvadlamudi)\
**Post date:** [May 4, 2021, 7:58am UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/1 "2021-05-04T07:58:11Z")

</div>

Hii, I am Vinay  
Can you please suggest me how to pass URL Dynamically in Grafana using Infinity Plugin.  
[http://127.0.0.1:1880/api\_output?device=123](http://127.0.0.1:1880/api_output?device=123)  
The above url is my nodered url.

---

<div class="post-metadata">

**Author:** ![anon70503803](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@anon70503803](https://community.grafana.com/u/anon70503803)\
**Post date:** [May 12, 2021, 9:55pm UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/2 "2021-05-12T21:55:11Z")

</div>

Hi @vinayvadlamudi,

Can you elaborate? What are you trying to do, and what is going wrong when you try to do it? Screenshots? 👍

thanks!

---

<div class="post-metadata">

**Author:** ![vinayvadlamudi](https://avatars.discourse-cdn.com/v4/letter/v/59ef9b/32.png) [@vinayvadlamudi](https://community.grafana.com/u/vinayvadlamudi)\
**Post date:** [May 18, 2021, 1:58pm UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/3 "2021-05-18T13:58:27Z")

</div>

Hi @anon70503803  
Here I am using html form

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/d/6/d615e107df87ad5ffa65f9b48da5d5ae1034ddda.png)  
when i submit this form. I am getting Json Output in Url.  
I have to pass this url dynamically to Grafana using Infinity data Source.  
Based On this this data the grafana should display their graphs.

I tried But I am not getting that how to pass url dynamically to grafana

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/8/5/85c68c25cf6b5409a87ceb75fc8ec71621d34974.png)

---

<div class="post-metadata">

**Author:** ![yesoreyeram](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yesoreyeram/32/52152_2.png) [@yesoreyeram](https://community.grafana.com/u/yesoreyeram)\
**Post date:** [May 20, 2021, 6:51am UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/4 "2021-05-20T06:51:29Z")

</div>

@vinayvadlamudi - can you post the full url that includes timestamp ? ( Masking sensitive data ). Btw, this should be straight forward as any other plugin. You can use grafana variables and grafana time macros in the url.

---

<div class="post-metadata">

**Author:** ![vinayvadlamudi](https://avatars.discourse-cdn.com/v4/letter/v/59ef9b/32.png) [@vinayvadlamudi](https://community.grafana.com/u/vinayvadlamudi)\
**Post date:** [May 20, 2021, 8:21am UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/5 "2021-05-20T08:21:51Z")

</div>

Hi@yesoreyeram

[http://127.0.0.1:1880/api-out?device=1001&StartDate=2021-01-01&EndDate=2021-12-30](http://127.0.0.1:1880/api-out?device=1001&StartDate=2021-01-01&EndDate=2021-12-30)

The sample url is above,

the url parameter values will be changing frequently. Is there any way to include paramters dynamically in grafana using Infinity dataplugin.

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/5/4/5489226da5675983aa992c46ed259f109e704db6.png)

---

<div class="post-metadata">

**Author:** ![yesoreyeram](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yesoreyeram/32/52152_2.png) [@yesoreyeram](https://community.grafana.com/u/yesoreyeram)\
**Post date:** [May 22, 2021, 11:50pm UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/6 "2021-05-22T23:50:17Z")

</div>

> [@vinayvadlamudi](#):
>
> [http://127.0.0.1:1880/api-out?device=1001&StartDate=2021-01-01&EndDate=2021-12-30](http://127.0.0.1:1880/api-out?device=1001&StartDate=2021-01-01&EndDate=2021-12-30)

Probably what you need is

`http://127.0.0.1:1880/api-out?device=${deviceID}&StartDate={ __from:date:YYYY-MM-DD}&EndDate={__ to:date:YYYY-MM-DD}` as your URL.

Where `${deviceID}` is variable you need to create using dashboard template variable

and `{ __from:date:YYYY-MM-DD}` and `{__ to:date:YYYY-MM-DD}` will be coming from dashboard’s time range.

Read more about time variables here [Add and manage variables | Grafana documentation](https://grafana.com/docs/grafana/latest/variables/variable-types/global-variables/)

and here [Add and manage variables | Grafana documentation](https://grafana.com/docs/grafana/latest/variables/variable-types/)

---

<div class="post-metadata">

**Author:** ![charishmavinny](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@charishmavinny](https://community.grafana.com/u/charishmavinny)\
**Post date:** [August 26, 2021, 3:04pm UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/7 "2021-08-26T15:04:42Z")

</div>

Hi @yesoreyeram,  
I am using Infinity Plugin in grafana to fetch data from rest api.I am using multiple value variables in the queries of the panel.  
But when i am using multi value variable in the query of the panel,the panel is populated with the data of single value of the variable,when i select multiple values ,am not getting any data  
I have tried enabling panel repetition option,then am getting data for multiple vaules of the variable in multiple panels.  
I want the combined data for all the values of the variable.  
Any suggestions would be greatly helpful

---

<div class="post-metadata">

**Author:** ![yesoreyeram](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/yesoreyeram/32/52152_2.png) [@yesoreyeram](https://community.grafana.com/u/yesoreyeram)\
**Post date:** [August 26, 2021, 4:51pm UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/8 "2021-08-26T16:51:55Z")

</div>

@charishmavinny - I would suggest to create a thread in [https://github.com/yesoreyeram/grafana-infinity-datasource/discussions/new?category=q-a](https://github.com/yesoreyeram/grafana-infinity-datasource/discussions/new?category=q-a) for infinity plugin related questions. If possible include steps to reproduce, screenshots.

---

<div class="post-metadata">

**Author:** ![charishmavinny](https://avatars.discourse-cdn.com/v4/letter/c/85f322/32.png) [@charishmavinny](https://community.grafana.com/u/charishmavinny)\
**Post date:** [August 27, 2021, 5:23am UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/9 "2021-08-27T05:23:26Z")

</div>

Hi @yesoreyeram ,Thank you for the reply.  
I have created a thread on infinity plugin github page with my data.Please check it when you have some time

> **[How to repeat queries for multiple values of a dynamic variable in a single...](https://github.com/yesoreyeram/grafana-infinity-datasource/discussions/139)**
>
> Hi, I recently started using grafana and working on fetching data from REST API to grafana. I am using infinity plugin in grafana to connect to restapi where i am using multi value variables in the...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [May 4, 2022, 7:58am UTC](https://community.grafana.com/t/how-to-pass-url-dynamically-in-grafana-using-infinity-plugin/46989/10 "2022-05-04T07:58:39Z")

</div>

Closed on May 4, 2022, 7:58am UTC

This topic was automatically closed after 365 days. New replies are no longer allowed.
