键值存储服务 KVS-批量写请求:请求示例

时间:2024-12-09 15:46:54

请求示例

批量写请求,向test-table-1表中插入和删除一个kv

POST https://{endpoint}/v1/batch-write-kv

{
  "table_opers" : [ {
    "table_batch" : {
      "table_name" : "test-table-1",
      "kv_opers" : [ {
        "put_kv" : {
          "oper_id" : 1,
          "kv_doc" : {
            "owner" : "user-3",
            "filename" : "test-file-3"
          }
        }
      }, {
        "delete_kv" : {
          "oper_id" : 2,
          "primary_key" : {
            "owner" : "user-2",
            "filename" : "test-file-2"
          }
        }
      } ]
    }
  } ]
}
support.huaweicloud.com/api-kvs/BatchWriteKv.html