PHPackages                             crassaert/php-azure-documentdb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. crassaert/php-azure-documentdb

ActiveLibrary[API Development](/categories/api)

crassaert/php-azure-documentdb
==============================

PHP wrapper to query Microsoft Azure DocumentDB REST API

v1.1(8y ago)1010.4k—10%6[2 issues](https://github.com/crassaert/php-azure-documentdb/issues)GPL-3.0PHP

Since Apr 20Pushed 7y ago3 watchersCompare

[ Source](https://github.com/crassaert/php-azure-documentdb)[ Packagist](https://packagist.org/packages/crassaert/php-azure-documentdb)[ RSS](/packages/crassaert-php-azure-documentdb/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (4)Used By (0)

php-azure-documentdb
====================

[](#php-azure-documentdb)

PHP wrapper for CosmosDB (ex DocumentDB) operations (beta version)

Update January 2018 v1.1
------------------------

[](#update-january-2018-v11)

- Use of the x-ms-version 2017-02-22
- PHP 7.0 mini recommended
- Enhanced unit tests
- Adding some errors throws

Usage
=====

[](#usage)

Install
-------

[](#install)

`composer require crassaert/php-azure-documentdb`

Instantiate
-----------

[](#instantiate)

`$db = new AzureDocumentDB(AZURE_HOST, AZURE_KEY, false);`

Databases operation
-------------------

[](#databases-operation)

### List

[](#list)

`$db->get('database')->_list();`

### Creation

[](#creation)

`$db->get('database')->create('my_database');`

### Selection

[](#selection)

`$db->get('database')->select('my_database');`

### Remove

[](#remove)

`$db->get('database')->delete('my_database');`

Collections
-----------

[](#collections)

Before requesting, you have to select a database (see previous paragraph).

### List

[](#list-1)

`$db->get('collection')->_list();`

### Creation

[](#creation-1)

`$db->get('collection')->create('my_collection');`

### Selection

[](#selection-1)

`$db->get('collection')->select('my_collection');`

### Remove

[](#remove-1)

`$db->get('collection')->delete('my_collection');`

Document
--------

[](#document)

Before requesting, you have to select a database and a collection (see previous paragraph).

### Creation

[](#creation-2)

`$db->get('document')->create($json);`

### Requesting

[](#requesting)

Fell free to write your SQL query here.

`$db->get('document')->query('SELECT * FROM my_table');`

### Remove

[](#remove-2)

You have to select your document before removing it to obtain the internal ID.

```
$rid = $document->_rid;
$db->get('document')->delete($rid);

```

TODO
----

[](#todo)

Implement permissions, triggers, users, sprocs and UDF.

You can find all features on [Microsoft Azure Website](https://msdn.microsoft.com/fr-fr/library/azure/dn781481.aspx)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 84.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~263 days

Total

2

Last Release

3097d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6930172?v=4)[Cédric Rassaert](/maintainers/crassaert)[@crassaert](https://github.com/crassaert)

---

Top Contributors

[![crassaert](https://avatars.githubusercontent.com/u/6930172?v=4)](https://github.com/crassaert "crassaert (16 commits)")[![glenndehaan](https://avatars.githubusercontent.com/u/7496187?v=4)](https://github.com/glenndehaan "glenndehaan (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/crassaert-php-azure-documentdb/health.svg)

```
[![Health](https://phpackages.com/badges/crassaert-php-azure-documentdb/health.svg)](https://phpackages.com/packages/crassaert-php-azure-documentdb)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k14](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
