Request URL template help

I have to put together some Data Actions for a customer project and I'm planning on using a data table to look up the urls for the customer provided REST APIs. The URL on some of the APIs can look something like url/VariableInput/restOfTheUrl so the row in the data table might look something like:

https://customer.provided.webserviceUrl/api/aa/bb/cccccccc/${input.conversationID}/restOfTheUrl

The conversationID and url would be part of the input contract. Is it possible to set up the requestUrlTemplate to substitute the supplied conversation id into ${input.conversationID} so that resolved url would look like

https://customer.provided.webserviceUrl/api/aa/bb/cccccccc/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/restOfTheUrl

Almost forgot, these are GET methods.

Thanks

Hi scm_pa,

I don't think that I have ever tried anything like that, so I would be really curious to hear if it works for you. My guess is that you would need to split the URL up into "Before the conversation" and "After the conversation" chunks, and then put them together with the conversation in the requestUrlTemplate.

--Jason

Hi Jason. That's plan B :slight_smile: . I wanted to see if it can be done this way first. If it can then I feel this sort of thing will be useful in the future.

Regards.

A solution occurred to me this morning. Try out this action.

UrlHacking-20230308111305.custom.json (953 Bytes)

--Jason

2 Likes

The timing is funny. I came up with pretty much the same solution about an hour ago. :slight_smile:

Thanks.