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

时间:2024-05-07 09:20:02

请求示例

批量写请求,向test-table-1表中下载一个kv和删除一个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_blob" : {
            "primary_key" : {
              "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