[Res]duplicate properties in REST request
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[Res]duplicate properties in REST request
How to I configure a REST method/request to have duplicate properties, e.g.,
GET /dev/api/calendar/locations?locationIds=96&locationIds=33&startDate=01-Feb-2014&endDate=28-Feb-2014
As you can see, property "locationIds" is included twice.
If the REST method/request cannot be configured to support this, can I build the GET command programmatically? I have tried to 'cheat' by setting the value of locationIds to "96&locationIds=33" but the ampersand and the equals symbols are replaced by their code (even though I tried to entitize them).
So, is this possible to do, and if so, how?
Sincerely,
Séverin B.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a "Multi-Value Delimiter" property for the REST request in the bottom left table of properties, set this to the regular expression that should be used to separate the values, for example "\|" for pipe. Once you do that you will locationids=1&locationids=2&locationids=3. This should work.
Thanks,
Jeshtha
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To summarize:
- in Resource or in Method, add parameter (use style = QUERY)
- select parameter and enable "Disable Encoding" at bottom of page
- in Request, select parameter and set Multi-Value Delimiter to \| in bottom-left properties section
- set a value of, e.g., 1|2|3 for the parameter (can use DataGen)
- request will be sent out with, e.g., parameter=1¶meter=2¶meter=3
SB
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should have mentioned it earlier, but now you have the summary!
Thanks,
Jeshtha
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I attempted to follow the above solution provided in portions by Jeshtha and summarized by sbeauvais and got stuck after being able create the second duplicate parameter I needed. Basically, I created the non-entitized parameter that is to be entitized and created duplicate parameter 2 as entitized with "disable encoding" enabled, but creating a third duplicate parameter or more is failing due to SoapUI's insistance of unique paramater names.
Can someone help? Am I missing something in sbeauvais's summary of steps? For instance, do I need to create a data generator after the entitized and non-entitized options are exhausted?
FYI. I know this is a 5 year old post, but I thought it best to reply with my question here instead creating a new post. If a new post needs to be create, please let me know and I shall.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @socaltester,
I would suggest that you create a new topic anyway with the detailed information on the behavior to start a brand new investigation.
Olga Terentieva
SmartBear Assistant Community Manager

- « Previous
-
- 1
- 2
- Next »
- « Previous
-
- 1
- 2
- Next »