Kumar Sanu
Kumar Sanu

Reputation: 226

Error -The partition key supplied in x-ms-partitionkey header has fewer components than defined in the the collection

I've created a database and a collection. When creating the collection, the partition key was a required field so I used 'Date' field as partition key.

I have created stored procedure to perform bulk documents delete from the collection in the cosmos db.

Calling the Rest API EndPoint for stored procedure, I am getting following error.

{"Errors":["The partition key supplied in x-ms-partitionkey header has fewer components than defined in the the collection."]}

Complete details of the issue is mentioned here.

Upvotes: 3

Views: 1981

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222572

The error is somewhat misleading, however in order to fix, you need to specify is the partition key for your collection using the x-ms-documentdb-partitionkey header with the request

Upvotes: 3

Related Questions