Flow Action with Rest step causing ? to %3F in URL when using a Mid Server.


Description

When using Flow Designer and creating a Flow Action with a REST step, the REST form has a Base URL field + Resource Path field that is used to point to an endpoint. 

It's not explicitly clear if there is a "?" anywhere in the Base URL, Resource Path it will get converted to a %3F in the final URL path that is sent to the endpoint. 

This only applies when the MID server is being used in the REST step. This can cause 400 errors when ? is converted and hard to figure out due to the lack of verification of the final URL. 

NOTE: Outbound REST logs don't log this if the MID server is being used. 

Cause

When using the MID Server as part of the REST step, any ? included in the Base URL or Resource Path will be converted to a %3F. This can cause ERROR 400 due to being a bad request from the unintentional conversion happening to the URL the user provides. This is not the case when using Workflow when the same steps are used. 

Resolution

Using the query parameters Name and Value, one can build the complete URL path without the conversion happening.

For example: 

https://example.com/wapi/v2.7/network/ZG5zLm5ldHdvcmsk:10.10.12.0/24/default?_function=next_available_ip

This is the incorrect one being sent:

https://example.com/wapi/v2.7/network/ZG5zLm5ldHdvcmsk:10.10.12.0/24/default?_function=next_available_ip=

Note: When placing the rest of the Path only into the Name field, a '=' sign will be appended to the end of the URL.

The format is to input _function as the "Name" and then "Value" next_available_ip