LePy
LePy

Reputation: 133

Query Params - API Rest

Is it possible to include more than one parameter in a API?

Ex.: GET url/Proposal/Consult?strSituation=17

I need to get strSituation 17, 18 and 05.

Upvotes: 0

Views: 36

Answers (1)

Michael Macnair
Michael Macnair

Reputation: 51

As an API implementer you have a couple of options here:

  • you can make a request like ?strSituation=17,18,05 and ensure that your backend handles comma-separated values
  • or you can repeat the parameter, as in ?strSituation=17&strSituation=18&strSituation=05

If this is not your API, then you'll need to consult the docs to learn how this particular API handles it.

Upvotes: 1

Related Questions