Use IBM Cloud functions and API Gateway to create the following endpoints: http /api/dealership

I am trying to write actions in IBM Cloud functions (Node.js)

and I can't figure out how to get the URL query parameters for the endpoint {/api/dealership?state="CA"} in the actions.

this is example of action

function main(params) { return params }

this action must return the list with all dealers in CA state

I am new in IT and really need help. Any help appreciated!