What are the best practices to avoid hardcoding the URL/endpoint for a REST interface asset?
Hi Justin,
At the moment, the endpoint has to be hardcoded into the .ifd file describing to Composer where the webserice is located.
The only thing you can make dynamic would be the “method” path, where you can use a parameter in the path itself, but it won’t change the server URL.
Hi @mdias,
You can set the host as a parameter in the request itself, using this syntax: {host:www.intuiface.com}
, where
- host is the parameter name
- www.intuiface.com is the default value
Hi @Seb,
sounded to good to be true
Works fine without body parameter, when I try to add body type parameter it has a strange behavior.
Thanks
Mdias!
You should contact our support team to discuss the topic with the team there.
If the API Explorer can’t handle this, yet, and until it’s fixed, you can probably still use the manual way to create your ifd.