Search code examples
restazure-cosmosdb

x-ms-documentdb-partitionkey issue with hirarchical partition key


We are trying to create a cosmos DB document with REST API Call. We have create hirarchical partition key like /id, /date. Now when WE pass

x-ms-documentdb-partitionkey

in header with ["value","value1"] we are getting below error.

We have also added x-ms-documentdb-partitionkey-kind with HASH value.

The 'kind' value 'MultiHash' specified in the partition key definition is invalid. Please choose 'Hash' partition type.


Solution

  • REST and other tools don't have the support for Hierarchical partition keys apart from the latest version of the SDKs mentioned here

    so it won't work with the REST API.