📢 New on-demand webinar: Extend AI capabilities in M-Files without coding!  WATCH NOW

📢 New on-demand webinar: Extend AI capabilities in M-Files without coding!  WATCH NOW

Notifications
Clear all

How can I add a path parameter to a request in HTTP Integration?

0
[#164]
Topic starter

When working with Microsoft Business Central API you may want to add a variable to the path in the HTTP request. For instance a request may look like this:

GET businesscentralPrefix/companies({id})/projects({id})

The businesscentralPrefix and the companies ID are typically fixed values in the configuration and can be typed directly into the URL, but the projects ID would be a variable pulled from the trigger source. If the API would accept it as a query parameter it is quite easy to configure.

Can it be done also as path parameter? If yes, how?

I should mention that there in most cases are ways to work around this. You can add a parameter like "$filter" with a value like "number eq '<variable>')" if you have project number as a property value in stead of the ID. The request would then look something like:

GET businesscentralPrefis/compainies({id})/projects?$filter=number eq '<variable>'