0
votes

I'd like to get the list of collections in DocumentDB using Java. How should I do that?

1

1 Answers

1
votes

Check https://github.com/shipunyc/azure-documentdb-java/blob/master/src/com/microsoft/azure/documentdb/test/GatewayTests.java#L356

DocumentClient client = new DocumentClient(HOST, MASTER_KEY, ConnectionPolicy.GetDefault(), ConsistencyLevel.Session); List collections = client.readCollections(this.databaseForTest.getSelfLink(), null).getQueryIterable().toList();