radar app logoRadar 

Adding Data

There are two ways you can bring data to Radar.

Using a one-click installer

The most commonly used services are available as one-click installers. The collection of one-click installers is Radar collections. Using this method, you can add data to Radar with a single click. If you are not familiar working with APIs, this is the recommended way.

Go to Radar collections docs section to know how it works.

Manually adding

This way lets you add any API you want. Open Radar, click the + icon in the top-right corner.

The minimum requirement to add an API is Name and URL. You can also add query parameters, body parameters, headers, authentication headers if needed.

For a better understanding, let's display the latest Bitcoin price on Radar. Coincap provides a public API to fetch Bitcoin price. We will use that. You can also watch the process in a 2 min YouTube video.

Loading...

For post requests, select POST from the dropdown and click the Body tab to add body parameters. Following body parameters are supported.

  • Form data.
  • x-www-form-urlencoded.
  • Raw body.
  • GraphQL query and variables.

Radar will let you know if the API returns an error or there's an error in your input format. Fix the issues and click on "Next" to add an API.

Non-JSON API response

If the response of your API is not a JSON, you need to check 'Response is not a JSON' as shown below.

adding a api that doesn't return json

Dynamic variables

Sometimes, you may need to use date/time in a required format to fetch data. Inevitably, that has to be dynamic. To make that happen, Radar makes use of date-fns.

Radar exposes the functions of date-fns in the variable dfns. You can use it in params, headers and body.

For example, you can use something like,

  • dfns.format(dfns.sub(new Date(), { days: 1 }), 'y-MM-dd') - when used, replaced by yesterday's date in YYYY-MM-DD format.
  • dfns.startOfMonth(new Date()) - when used, replaced by the starting date of the current month in YYYY-MM-DD format.

After adding an API, you need to mention which data point you want Radar to display. Check customizing the value to know how.

AboutCollectionsDocumentationChangelogSupportPrivacy