Endpoint route with 2 or more URL parameters


#1

What are the mechanics/syntax of creating a endpoint route with 2 or more parameters? Ex: http:// a/b/c?d=foo&e=bar

I desire to invoke a dashboard page which requires two context variables, and want to express those in the URL as parameters. Not clear from the documentation.

I appear able to do the following … /devices/{devId}/{devName}

But error when I try … /devices?Id={devId}&name={devName}


#2

Hi,

If you wanted to create the Experience Endpoint /a/b/c?d=foo&e=bar then your route would be /a/b/c and then when you invoke the URL using a browser, postman, curl etc. you can add those query parameters on to your route, and the keys and values will appear in the workflow payload at data.query. Those query parameters are considered optional. This route /devices/{devId}/{devName} is requiring that the devId and devName are given as parameters, and if they are not this endpoint will not fire its workflow. However, if you decide you want those parameters to be required, then these will show up on your payload at the path data.params e.g. data.params.devId.

Hope this helps,
Erin