Only absolute URLs are supported when embedding


I am trying to access a REST API. As I have two instances of Retool (one for staging and other for production), I have to direct each one for the correct API address. In order to do so, one config variable was created and referenced on queries.

We have two queries that are very similar, they access the same config var but have different endings (one is "/component" and other is "/roadmap").

It works completely fine inside retool. It also worked on embedded version when we did not have the config var. We were on staging and it was ok to have the url hard coded, but since we have two instances - one for production and one for staging - we chose to add the URL in config var to change according to the correct environment.

After changing to this new version (with the config vars), as I said, it continues to work on retool, but in the embedded version we have the following issue:

"error": true,
"message": "Only absolute URLs are supported",
"queryExecutionMetadata": {
"estimatedResponseSizeBytes": 59,
"resourceTimeTakenMs": 0,
"isPreview": false,
"resourceType": "restapi",
"lastReceivedFromResourceAt": 1710435902391

I tried to add the whole path as a config variable, the error still showed up.

Looks like this was already addressed internally. However, for anyone following along there is a work around. :+1:

You should be able to get around this by configuring your RESTQuery as a REST API resource instead. If you add the configVars to your REST API resource's Base URL, and then query it from your Embed app, this should work as expected.

1 Like

Great news! This has been fixed and will be coming out in one of the upcoming releases.

1 Like