Passing two Collect parameters using the same name in a REST collector using a Get collect method?
Has anyone tried to pass two Collect parameters using the same name in a REST collector using a Get collect method? When I try this, only the 1st parameter is included in the URL passed to the API. The API I'm using only allows you to pass date parameters using one parameter called "f" and only supports "LT" and "GT". In order to limit the API to return results from yesterday, I need the URL to include "f=http://date.gt:2023-01-06&f=date.lt:2023-01-07|date.gt:2023-01-06&f=date.lt:2023-01-07". When I put in both collect parameters, only the 1st "f" parameter is included in the URL. If I try to craft both the LT and GT in one parameter by setting the parameter value to 'http://date.gt:2023-01-06&f=date.lt:2023-01-07|date.gt:2023-01-06&f=date.lt:2023-01-07', the included "f=" is encoded to "f%3D" in the URL and the API does not recognize it as a parameter.
Answers
-
This is a limitation of the collect parameters section. We'll overwrite the first definition of the name with the second definition. You'll need to define this in the Collect URL box like so: ````http://server/?f=date.gt:${C.Time.strftime(earliest, "%Y-%m-%d")}&f=http://date.lt:${C.Time.strftime|date.lt:${C.Time.strftime(latest, "%Y-%m-%d")}````
0 -
Thank you. I never thought of just putting the parameters in the Colect URL box.
0