Apr 11 2019 03:20 PM
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"
Aug 08 2019 06:11 PM
@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
Aug 30 2020 12:45 AM
@aletc1 @JohnKarwoski For a V3 function in .net core 3.1 check out this issue and the GitHub repo. Gives you OData in azure function
https://github.com/Azure/Azure-Functions/issues/1044
https://github.com/smokedlinq/Microsoft.Azure.WebJobs.Extensions.OData