How can we improve Microsoft Azure Functions?

Function inputs with query or path support should be able to make use of query/body parameters

The documentation for SqlQuery inputs mentions that this capability is not *yet* supported, and points to a GH comment, but I saw no actual feature request so here it is.

https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb-v2#http-trigger-look-up-id-from-route-data-using-sqlquery-c

"You can pass route data to the SqlQuery parameter as shown, but currently you can't pass query string values." (link to comment https://github.com/Azure/azure-functions-host/issues/2554#issuecomment-392084583)

Is there any sort of timeline that users can expect this?

Also, I think the documentation could be improved to explain that the Route Templates are based on ASP.NET routing, which is where the limitation stems from (because route templates in ASP.NET do not encompass query parameters since they're not technically part of the route/path). It took a long time for me to track down the *why*, and I think including that in the documentation would help others in my situation understand what the limitations are (and therefore that they need to work around them).

A little background for how I got here. I wanted to include two parameters in the path so that I could use them in the SqlQuery for the Cosmos DB input, so I structured the route template for the function as follows:

a/path/{p1}/{p2}

I then realized that both p1 and p2 have the potential to have forward-slashes in them, which screws up the templating because the resulting path would actually be something like

a/path/the/value//of/p1/the//value/of/p2/too

I still need the variables to inject into my query, so I then changed the route template (not knowing it was not supported) to:

a/path?p1={p1}&p2={p2}

The portal makes NO complaints when I enter this until I go back to the area in the portal where I can modify/run/test code, where I get a red popup notification that says:

"Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.functionName'. System.Web.Http: The route template cannot start with a '/' or '~' character and it cannot contain a '?' character.
Parameter name: routeTemplate."

So, I think my asks are:

- Query/Body parameter support for SqlQuery
- Improved documentation for CosmosDB input binding to describe what the route templates are based on (and their limitations)
- Some examples of valid vs. invalid would be helpful
- Update portal to include real-time validation of the input for the Azure function route template

1 vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

Max Mueller shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base