Configuring JSON Provider - An Example

The best way to understand how to configure the JSON Provider and its functions is to configure it.

As an example, we are going to configure JSON provider from National Weather Service to:

The API documentation for the National Weather Service can be found at API Web Service (weather.gov).

Based on the rules provided in the API documentation, we know that there are two steps to obtain a weather forecast:

  1. Determine which forecast station offers forecast data for your area based on latitude and longitude.

  2. Use the provided endpoint to capture the weather forecast.

We can also see in the Authentication section of the API documentation that a specific User Agent header must be present and formatted correctly for a request to be valid.

If this is not provided, the National Weather Service API returns a 401 Not Authorized error.

NOTE: For successful authentication, a User Agent is required to identify your application. This can be any string. The more unique to your application it is, the less likely it will be affected by a security event. If you include contact information (website or email), we can contact you if your string is a ffected by a security event. This will be replaced with an API key in the future. User Agent: (myweatherapp.com, contact@myweatherapp.com)

For more information, see Retrieving Endpoint.