question

SaiB-9256 avatar image
0 Votes"
SaiB-9256 asked MayankBargali-MSFT answered

Optional parameters in relativepath of Logic APP HTTP GET

How do I create a HTTP Request Logic APP that can receive calls http://logicapp.com/relativepath1/relativepath2 as well as http://logicapp.com/relativepath1



I want to serve calls with say http://logicapp.com/cities as well as http://logicapp.com/cities/houston using same logic app.

I wish to return all city names as response to first request and then Houston weather for 2nd request.

{ "error": { "code": "TriggerRelativePathNotValid", "message": "The relative path for this request is not valid: expected '/{region}' and actual 'cities/Houston'." } }

if I put GET relative path as "/{region}/{cityname}"
then it works for houston call, but fails for cities call

I mean if I call http://logicapp.com/cities
error says as below:

{ "error": { "code": "TriggerRelativePathNotValid", "message": "The relative path for this request is not valid: expected '/{region}/{cityname}' and actual '/cities'." } }

azure-logic-apps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered

@SaiB-9256 This is not supported if you are defining the relative path on your HTTP logic app endpoint. In the Relative path property you specify the relative path for the parameter in your JSON schema that you want your URL to accept, for example, /city/{cityname} so the URL should have the /city/houston. It follows the same path that you have define. You cannot use the /city to call the logic app HTTP get which accepts the path as /city/{cityname}. In case you pass it without city then you will recive the same eror that the you have observed The relative path for this request is not valid

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.