Environmental Variables for URL in API Data Source


I am currently trying to set up a dynamic URL using environmental variables in an API Data source.
I have set up an $_ENV variable named API_URL for my development target following the tutorial here and I am trying to access it for my API Data source using the Dynamic Attribute field. I’ve input '{{$_ENV.API_URL}}/packages?depth=0' in the Code field of the Dynamic Attribute for Url.

However, rather than performing the correct API call, the Request URL seems to be http://localhost:3000/'/packages?depth=0%27&. It works if I replace the environmental variable with a static value, so I’m guessing my approach to using the env variable is wrong. What am I missing?

Community Page
Last updated: