gpt4 book ai didi

azure - DocumentDB REST API : x-ms-documentdb-partitionkey is invalid

转载 作者:行者123 更新时间:2023-12-02 21:15:55 24 4
gpt4 key购买 nike

我尝试使用 REST API 从 DocumentDB 获取文档。我正在使用分区集合,因此需要添加“x-ms-documentdb-partitionkey” header 。如果添加此内容,我会收到“分区键 abc 无效”。我在文档中找不到任何期望 key 采用特定格式的地方,但仅仅提供期望的字符串值是行不通的。有谁知道预期的格式吗?

最佳答案

分区键必须指定为数组(具有单个元素)。例如:

x-ms-documentdb-partitionkey: [ "abc" ]

关于azure - DocumentDB REST API : x-ms-documentdb-partitionkey is invalid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40423437/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com