URI on API Requests

Is there any info (http header, cookie, etc) included in API requests to resources so we can determine which app is making a call? I thought I saw a "requestUri" cookie at some point by am not funding that now.

Background: we occasionally get error messages in our server logs resulting from calls like "/contacts/null" or "/contacts/undefined" instead of with an id and it's difficult to determine which Retool app is doing this.

Are you talking about the REST API requests?

Are you using the Query Library or just the Resources? The query library lets you build on the basic framework you can define in Resources. At least, that's what I made out of it.

In the Query Library, you can select the resource you want to build on, and fill in headers, parameters, body and cookies as well as choose which type of REST API to make the request.

You could perhaps define a different Query for each App, and set a unique header or parameter in each Query. Then, you may be able track down which one is sending the null contacts.

1 Like

Hey there!

As of version 2.113 you should also be able to access the retoolContext object in your resource settings page:

Screenshot 2023-02-24 at 5 01 43 PM

We're self hosted so I'll keep an eye out for 2.113

The appUuid and appName appear to work fine. But the inEditorMode doesn't process the script:

From the PR:

    - - RetoolAppUuid
      - '{{ retoolContext.appUuid }}'
    - - RetoolInEditor
      - '{{ retoolContext.inEditorMode }}'

End result in our logs:
image

Hey @andy.barilla!

Thanks for surfacing this, it looks like this is a bug on our end. I'll surface it with the dev team and report back here when it has been fixed!