The Azure Cosmos DB Blog

All about Azure Cosmos DB and Azure

Month: December 2015 (page 1 of 2)

DocumentDB Stored Procedures

Using DocumentDB Stored Procedures

DocumentDB supports the use of Stored Procedures.

Andrew Liu  wrote a tutorial on DocumentDB server-side programming: Stored procedures, database triggers, and UDFs.

The tutorial covers the basics  on DocumentDB’s language integrated, transactional execution of JavaScript.  This lets developers write stored procedures, triggers and user defined functions (UDFs) natively in JavaScript.

After working my way through Andrew’s and other tutorials,  I thought about what are the Use Cases  for using DocumentDB Stored Procedures.

Continue reading

REST API for DocumentDB

For some time now, I have been developing an REST API for Azure DocumentDB.

The main reason is DocumentDB does have it’s own REST API, but does not provide an API Connector for it.

I created a Swagger API  using GitHub.  For those not familiar with a Swagger you can view the documentation.  You can create an free account on SwaggerHub, and create your own. You can also test it and use their code generator to generate client or server code as shown below.

Swagger Code Generation

ClientCodeServer Code

I have made my GitHub project public.

There you can find the Swagger I created along with the code for an API App generated from the Swagger.

You can download and build the project in Visual Studio 2015.  I refactored the code using Resharper.

I would appreciate any feedback.

If you would like to collaborate on the project,  please use the following form to  contact me

Older posts
%d bloggers like this:
Skip to toolbar