Hi,
x-ms-documentdb-partitionkey needs to be set to the partition key value. For your sample document you would set it to "personal".
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Trying to get a document by its id using the following API (https://learn.microsoft.com/en-us/rest/api/cosmos-db/get-a-document). However, after providing the value for x-ms-documentdb-partitionkey I keep getting a not found error message despite the document existing.
A sample document is attached below:
And the partition key is defined below:
Note that I can use the list documents API with no issues, it shows all the documents in the collection as expected.
I am using Postman to send the API request.
Hi,
x-ms-documentdb-partitionkey needs to be set to the partition key value. For your sample document you would set it to "personal".
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP