In this section, we'll retrieve documents from the Cosmos DB for display or manipulation. We have deployed Cosmos DB with transactions in the collection:
Let's begin by implementing the following steps:
- Create an Azure Function called GetTransactions and use the HttpTrigger template without parameters and Anonymous access rights.
- Add the line shown in the following screenshot to the method signature. You are adding a DocumentDB client as an input to the function, below the trigger. This allows you to execute more complex queries against DocumentDB:
- Next, you need to set some options for your query, setting ...