How to retrieve JSON from HTTP connector into custom widget?

I’m working on a task to create a HTTP connector & create JSON as an output. I want to use the output of connector into custom widget & retrieve the JSON to create a chart.

Can anyone tell me how can I use the output data from a HTTP connector & generate a graph based on the data?

So do I understand right and you want the JASON to be the output and not only the values extracted?

Then:

simply make sure, your API delivers JSON, but set the Response type in TULIP to Text:

I put the result in an object. This is not needed, but you can directly take the text then. Without the Object guess you have one more { }

Just experiment with this :wink:

Otherwise I suggest to read the Knowledge base about the HTTP Connector first :slight_smile:


I have already created a connector & the received the output.

What i want is to get the output from connector into custom widget environment & fetch the data there.

What i understand from the community, there are 2 ways to use output of connector into custom widget: -

  1. Create an application & use trigger to store data in a variable. Import widget into application & Use props to share data from variable to custom widget environment.
  2. Call the connector function directly using JavaScript.

Can you help me on which method i use & how to use it?

This totaly depends on your actual goal and your data.

You could make a trigger running the connector function in the app. This forces you to create a variable. Use the same Variable structure in the widget props…

To use Connector Outputs in the App:
Using HTTP Connectors in Apps (tulip.co)

To get the values in the widget read the Knowledge Base on Custom Widgets:
Custom Widgets Overview (tulip.co)

To Call an API in the custom Widget itself, you need to learn how to call an API and handle the result in Javascript.

I stored the data from connector in a variable & then Use the same Variable structure in the widget prop but data is not showing in Console log in custom widget.

Hi @rahul.singh,

you need to write Javascript, to get the values, use the values and output any values.

Please read the second link I sent you.

What is the target of your widget? Only getting Connector Outputs and then put them out without any processing makes no sense.