Configuring Infinity data source plugin
After the plugin is installed, you need to create an instance of the data source:
- Go to
http://localhost:3000/datasources
and select Add data source - Search for the Infinity plugin
- Give a name to your datasource
- Save.
This data source can work out of the box without any additional configuration. If you need the URL to be authenticated or pass additional headers/query/tls/timeout settings, configure the corresponding section.
Configuration will be applied to all the queries. If you need different configuration for different queries, create separate instances of the data source.
If you configure the URL in the settings, the same will be prefixed along with all your queries.
If you specify the URL as
https://example.com/path
in your datasource config and/my-endpoint
as your url in the query, then the final URL will behttps://example.com/path/my-endpoint
.
For more information, refer to Configuring URL.
Health check
The settings for the Infinity data source on the configuration page don’t automatically validate the URL. To ensure that your settings, including authentication and API keys, are valid, you need to enable the custom health check in the Health check section of the Configuration page.
Note
The custom health check supports only HTTP GET methods. It verifies the response status code, specifically looking for an HTTP 200 status, but doesn’t check the content of the response.
Troubleshooting
If you receive a Health check failed
message after you click Save & Test, check the URL to ensure it’s valid and you entered it correctly.
Proxy outgoing requests
If you want your data source to connect via proxy, set the environment appropriate environment variables. HTTP_PROXY, HTTPS_PROXY and NO_PROXY. HTTPS_PROXY takes precedence over HTTP_PROXY for https requests.
proxy support is available from v0.7.10
If you want to setup specific proxy URL for the datasource, you can configure in the datasource config network section.
Proxy URL specification in data source config is available from v2.2.0
Allowing dangerous HTTP methods
By default infinity only allow GET and POST HTTP methods to reduce the risk of destructive payloads. But through configuration, you can allow other methods such as PATCH
,POST
and DELETE
for any unconventional use cases. If you need to make use of this feature, Enable the Allow dangerous HTTP methods
setting under URL section of the datasource config
This feature is only available from infinity plugin version v3.0.0
Warning
Infinity doesn’t validate any permissions against the underlying API. Enable this setting with caution as this can potentially perform any destructive action in the underlying API.