Optional Parameters in a REST API


How do you use multiple optional parameters in a restful API?

The documentation for creating an API and the URL to call it are pretty clear.

type Milkmaid {

  cowMilk: function(fat: !string)

  goatMilk: function()

Associated URL: /api/1/milk/cow/skim

What would need to be done if you wanted to replace the required parameter with multiple optional parameters?

What would the URL look like to call the API?


I believe you would just call the API with query params.


type Milkmaid {
  cowMilk: function(fat: string, numContainers: int)

HTTP requests: