An Azure NoSQL database service for app development.
Hi @kanishka , welcome to Microsoft Q&A forum.
Currently for getting the document through rest api, x-ms-documentdb-partitionkey is a mandatory header to pass(if we created the collections with partition key) with one of the partition key value. If we go through the article, it mentions "The Get Document operation retrieves a document by its partition key and document key.". There is a limitation of passing or retrieving the documents with no/null partition key.
However we can still get the list of all the documents in the collections which would not need us to pass any partition key like below:
https://{{DocumentDBHost}}/dbs/newdb/colls/container/docs
Also the efficient design of cosmos container would need us to provide a partition key to each and every document. We can still create docs without it but that would be not ideal situation.
Please let us know if this helps or we can discuss further.
----------
If answer resolves your query you can mark it 'Accept Answer'