'Pass array as query parameter in Postman
I am trying to pass an array as query parameter in Postman.
I am calling DELETE method to delete a user from list of databases. It is expecting list of database names as array in the query parameter. When I pass as given below, I am getting error.
{"code":2,"message":"data_services must be an array and not empty"}
Please let me know, how can I pass an array as query parameter in Postman.
Solution 1:[1]
You can specify the parameter key multiple times with different values.
Don't use square brackets or numbers like an array in code.
This will result in a query string like so:
?data_services=somename&data_services=anothername
Solution 2:[2]
Solution 3:[3]
can you check below link it is useful for you
https://medium.com/@darilldrems/how-to-send-arrays-with-get-or-post-request-in-postman-f87ca70b154e
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Craig H |
| Solution 2 | ilgam |
| Solution 3 | Rameshkumar |





