Using a constant for a REST URL (as per the Importing and Exporting Your Data course)

0
Hi, following the course Importing and Exporting Your Data, section 5.3.4 suggests using a constant to define the URL for a REST connection to avoid having to rebuild the app if the address needs to be changed. The constant is then used in a Microflow that creates the REST connection. As per the instructions, my constant is named CONST_RESTProductURL and has the URL http://localhost:8079/rest/restproducts/v1/product. I have tested the URL and authentication and they work fine, I can get the microflow to work and import the data via the REST connection if, in the location, I enter the URL e.g.     However, when I enter the constant name as below, the application throws an error when trying to use the REST connection. Studio Pro logs the error and gives a lot of information summarised as ‘An error has occurred while handling the request. [User 'MxStoreAdmin' with session id '6541eb1a-XXXX-XXXX-XXXX-XXXXXXXX71e0' and roles 'Administrator']’ I’m guessing that I am not using the constant correctly in the Microflow as the REST import works fine when I by-pass the constant.    Any ideas?      
asked
2 answers
0

Click on the “Edit…” button, then set your Template to be {1}. You can then add a “New” parameter and set your constant in there. 

Hope this helps

answered
0

This is my understanding of the instructions but it seems there is an error in the expression

 

answered