How to set route paramters in API Action?

I’m trying to pass a route parameter value (e.g. uuid) into a URL as part of an API action.
http://localhost:8100/api/v1/contacts/:uuid

In Bubble I would do it by using brackets – this then provided a key value pair. I’m not sure if this can be accomplished in the API action in Wappler.

Here is what I have in the API Action. I’ve tried looking at Dynamic Attributes and Query Parameters, but those do not appear to allow me to dyanmically change the route parameter.

Is this possible or is an enhancement needed?

Hey Keith, I’ve never bothered with api on the front end, but you can use dynamic values in the server side api action, if that would work for you.

Thanks Ken. I’ve already setup the APIs on the server.

Due to using auth0 in my Electron app, I need to pass authentication headers, so the server connect actions are out. Plus, I would prefer to use REST API standards on the client side.

And there is no dynamic attribute for the url?

I’m not seeing it for the route. There is a Dynamic Attribute > URL, but it didn’t seem to work.

Can you share the HTML code of this API action?

<dmx-api-action id="DeleteContact" noload="true" method="delete" data-type="text" url="http://localhost:8100/api/v1/contacts/:uuid"></dmx-api-action>

Can you please try this:

<dmx-api-action id="DeleteContact" noload="true" method="delete" data-type="text" dmx-bind:url="http://localhost:8100/api/v1/contacts/{{varUUID.value}}"></dmx-api-action>

Here varUUID.value can be any dynamic binding you want.