Book Image

Learning Azure DocumentDB

By : Riccardo Becker
Book Image

Learning Azure DocumentDB

By: Riccardo Becker

Overview of this book

Learning DocumentDB adopts a practical, step-by-step approach to help you learn the basics of DocumentDB and use your new-found abilities in real-life scenarios and enterprise solutions. We start with the absolute basics, such as setting up a DocumentDB environment, and guide you through managing your databases, and executing simple and complex queries. Next, we explain how to work with DocumentDB using the open REST protocol, and demonstrate how JavaScript works with DocumentDB. We’ll also show you how to authenticate and execute queries. Moving on, you’ll find out how to use DocumentDB from within Node.js to kick-start your Node.js projects. Next, you’ll discover how to increase the performance of your DocumentDB database and fine-tune it. Finally, you’ll get to grips with using DocumentDB in conjunction with other services offered from the Microsoft Azure platform.
Table of Contents (15 chapters)
Learning Azure DocumentDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Querying DocumentDB resources


This section covers how to use REST to query DocumentDB resources. Each resource has a corresponding URI. The database account is managed by the Azure Management API and the base URI for a DocumentDB is https://management.azure.com/subscriptions/{subscriptionid}/resourcegroups/{resourcegroupname}/providers/Microsoft.DocumentDB/databaseAccounts/{accountname}.

  • The subscriptionid is the Azure subscription that is the owner of the database

  • The resourcegroupname is the resource group that the account is under

  • The accountname is the database account name

The base URI for the rest of the resources are based on the URI endpoint that is specifically created for the database account name. The following table shows the base URI for each type of resource:

Resources

Base URI

Database

https://{databaseaccount}.documents.azure.com/dbs/{_rid-db}

User

https://{databaseaccount}.documents.azure.com/dbs/{_rid-db}/users/{_rid-user}

Permission

https://{databaseaccount}.documents...