Q:

Where can I get a reference for the JS objects/Functions when writing SP in Azure DocumentDB

Where can I get the list of functions and object to use in Azure DocumentDB Stored Procedure ?
How to delete, create, search...
For example, I manage to fish this one "collection.queryDocuments" in the internet, but is there a place that all is gathered ?

A:

Here is probably what you are looking for:

Server-side API Docs

These might also have the information that you need:

Write a simple stored procedure and more details on sprocs, UDFs, and triggers
Example stored procedures on GitHub
JavaScript language integrated queries (server-side)

Here is the complete annotated list of links that I use as references, but note that I'm doing mostly Node.js work so I don't have a lot of information about .NET programming in here. Server-side is the same though so those aspects will be useful for you. Feel free to edit/add to this answer if you know of any.

Client-side API Docs
This is what you used when calling DocumentDB from Node.js. Note, if you want to submit pull requests to fix errors here do not submit them to https://github.com/Azure/azure-documentdb-js rather submit them to https://github.com/Azure/azure-documentdb-node. Browse the latest source code here
Server-side API Docs
This is the API available to the Stored Procedures, User Defined Functions, and Triggers that are executed in DocumentDB.* HTTP status codes for Documentdb. Apparently, this is not comprehensive. I've heard of 503 and other errors that are not listed here.
Say goodby to self links and use ids to retrieve documents
JavaScript language integrated queries (server-side)
Query examples and playground
Limits
User Voice for DocumentDB
SQL Cheat Sheet
Write a simple stored procedure and more details on sprocs, UDFs, and triggers
Note, I no longer use triggers. The requirement to explicitly specify them when doing an operation made me worry that someone else on the team would neglect to specify them and we'd have data integrity issues. All modifications to data, I now do through sprocs. Also, it looks like you can't specify triggers inside of a sproc which makes their use an either/or choice and sprocs are more flexible.
Example stored procedures on GitHub
Count.js is interesting because it returns a continuation token that allows it to be called many times to process very large data sets.
Best practices for multi-tenancy using DocumentDB
This is outdated since the introduction of partitioned collections.
Performance Tips: Part 1 and Part 2

