Custom API Data being modified
Status: Closed · Asked by Real Estate Integrate Inc. St. Hilaire on · 0 views
I'm trying to set up a custom API to perform a PUT request but the data I've entered in is being changed. The data contains URL information and all the slashes '/' are getting an additional '\' slash added before it and it's breaking the proper formatting for the receiving app. I need to stop this from happening. Here are images showing how I've entered the data and how it's being changed when I save, leave, and come back.
Attachments


Hey @andrewstrealtor
I'm trying to set up a custom API to perform a PUT request but the data I've entered in is being changed. The data contains URL information and all the slashes '/' are getting an additional '\' slash added before it and it's breaking the proper formatting for the receiving app. I need to stop this from happening. Here are images showing how I've entered the data and how it's being changed when I save, leave, and come back.
Regarding your concern, you can ignore the auto rendering of the slashes in your API action step while passing the URL. It will work the same as you set it for the first time even if you save it again, it will be send to the destination application as it should be.
I can not ignore the slashes and I need a way to use the API with a POST request that does not alter the data. I've tried using both JSON and TEXT for the Payload Type and both are adding backslashes. The recipient trying to set up to receive the data doesn't want all the backslashes all over the place. How do I send data that looks exactly how it looks to me on the API screen so it doesn't add slashes?
@andrewstrealtor Since, we used the json_encode function at the backend to convert the given request in proper JSON it adds a the backslashes. Those backslashes are escape characters. They are escaping the special characters inside of the string associated with JSON response.
That do not affect the functionality of the API module but, it will be just look like this and it is acceptable to all applications. Please contact the recipient application regarding this.