Skip to content

Azure Functions Crud Ops with Cosmos using REST Endpoints

License

Notifications You must be signed in to change notification settings

BlueRoseStory/AzureRest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzureRest

Azure functions CRUD operations with Cosmos DB. Table Storage is also used for tracking all changes.

Postman Documentation

Run in Postman

(To view the documentation, click here)

Punch List

  • Convert Response objects to follow JSend spec
  • Pagination for getAll methods.
  • Add more tests to get an End-to-End test
  • Video - Write script and record video
  • README.MD Add more explanation to this file
  • Update Postman API Documentation
  • Consider requiring a bearer token in header (The token could contain the ownerId)

Response Objects

We are trying to keep things simple by following this JSend specification. It appears to be a subset of the json Api specification. If we decide to add additional properties, we will use what is defined in the json Api.

This issue discussed in this article about the cosmos input trigger not being able to read headers is why we are not using bindings for the colleciton get (We can't get to our ownerid header)

Packages that I was using, but no longer need. "json-stringify-safe": "^5.0.1", "uuid": "^8.3.2"

Doc for Cosmos Javascript SDK

Link for examples from Youtube POST/CON 2019 - Testing, Automation and Reporting Workshop (videos link)

More good examples for Postman Tests

Postman - Dynamic variables

JSON Editor Online - Best tool I have found for quickly formatting JSON.

This doc Azure Cosmos DB input binding for Azure Functions 2.x and higher was helpful to get the bindings working. Here is another link that shows all the bindings

This article may be answer for how to handle pagination in Cosmos (using Javascript)

About

Azure Functions Crud Ops with Cosmos using REST Endpoints

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published