Help with best practice - Implementing OData URL Conventions (V4) with Azure Functions V2

Copper Contributor

I’m @JohnKarwoski  looking for some best practices on implementing OData URL Conventions (V4) with Azure Functions V2 (using .NET Core 2.1) that utilize a CosmosDb backend setup using the SQL API.

 

If you have experience in this area please continue reading below and please reach out if this resonates. Just 5 minutes of your time would be TRULY appreciated! Please forward this on to SMEs that might have insights.

For example, an Azure function that returns user tasks from the backend. What are the best practices to support OData ‘$filter’ and ‘$select’ query options from the URL, and translate those query options to a CosmosDb SQL syntax. I’d rather not write a custom parser if there are existing libraries to take advantage of. Example API call: "https://myapi.myapp.com/v1/tasks?$filter=Name eq 'SomeTaskName' and TaskDuration lt 8$select=Description,StartDate,EstEndDate"

2 Replies

@JohnKarwoski I could share with you a workaround while official support is being developed: https://github.com/aletc1/examples-odata-azure-functions

Full details in: https://www.algohace.net/posts/odata-en-azure-functions-v2 (Spanish only)

 

If you want to track the official request, please go to: https://github.com/Azure/Azure-Functions/issues/1044