ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

【TcaplusDB知识库】RESTfulAPI. for List表-[PB] ListDeleteAllRecords.介绍

2022-02-24 15:34:50  阅读:135  来源: 互联网

标签:RESTfulAPI ListDeleteAllRecords string 示例 版本号 TcaplusDB version tcaplus id


【TcaplusDB知识库】RESTfulAPI2.0 for List表-[PB] ListDeleteAllRecords2.0介绍

简介

在List PB表中删除对应Key下的所有记录。

POST http://{Tcaplus_REST_URL}

请求语法

Http请求

#腾讯云控制台 RESTful Endpoint, ip:80, 端口默认80
http://172.17.0.22
#TcaplusDB本地docker版 RESTful Endpoint, ip:31001, 端口默认31001
http://9.135.8.93:31001

Http头

x-tcaplus-target:Tcaplus.ListDeleteAllRecords
x-tcaplus-app-id:{string}
x-tcaplus-zone-id:{string}
x-tcaplus-protocol-version:{string}
x-tcaplus-table-name:{string}
x-tcaplus-pwd-md5:{string}
x-tcaplus-result-flag:result_flag
x-tcaplus-version:{string}
x-tcaplus-data-version-check:{string}
x-tcaplus-idl-type:protobuf

参数说明:

名称是否必填限制条件说明
x-tcaplus-target Tcaplus.ListDeleteAllRecords
x-tcaplus-version Tcaplus3.50.0
x-tcaplus-app-id 对应业务id编号(aka,集群接入id)
x-tcaplus-zone-id 对应zone编号(aka,表格组id)
x-tcaplus-protocol-version 对应protocol版本号,默认2.0
x-tcaplus-table-name 对应表名
x-tcaplus-pwd-md5 业务密码(aka,集群访问密码),传入计算后的md5值
x-tcaplus-idl-type protobuf
x-tcaplus-result-flag 0:操作成功后不返回数据1:操作成功后返回和请求一致的数据2:操作成功后返回本次update操作后的数据3:操作成功后返回tcapsvr端操作前的数据
x-tcaplus-data-version-check   1:检测记录版本号,只有当该版本号与服务器端的版本号相同时,该版本号才会自增2:不检测记录版本号,强制把客户端的记录版本号写入到服务器中3:不检测记录版本号,将服务器端的版本号自增
x-tcaplus-data-version   具体的version值

 

示例:

x-tcaplus-target:Tcaplus.ListDeleteAllRecords
x-tcaplus-app-id:3
x-tcaplus-zone-id:1
x-tcaplus-protocol-version:2.0
x-tcaplus-table-name:tb_online_list
x-tcaplus-pwd-md5:4e81984efccfb4982333aeb1ff7968d5
x-tcaplus-result-flag:2
x-tcaplus-version:Tcaplus3.50.0
x-tcaplus-data-version-check: 3
x-tcaplus-idl-type:protobuf

Data

使用json格式表示记录相关信息。指定

  • Record: 指定要删除记录的主键

{
  "Record": {
              "openid": 1,
              "timekey": "1",
              "tconndid": 1
      }
}

完整请求示例

curl -i -XPOST -H 'x-tcaplus-target: Tcaplus.ListGetAllRecords' -H 'x-tcaplus-app-id: 70' -H 'x-tcaplus-zone-id: 1' -H 'x-tcaplus-protocol-version: 2.0' -H 'x-tcaplus-table-name: tb_online_list' -H 'x-tcaplus-pwd-md5: 0972ad76decf4d11a69e2e0d9af335da' -H 'x-tcaplus-result-flag: 1' -H 'x-tcaplus-version: Tcaplus3.50.0' -H 'x-tcaplus-data-version-check: 1' -H 'x-tcaplus-idl-type: protobuf' http://172.17.32.17 -d '{
  "Record": {
              "openid": 1,
              "timekey": "1",
              "tconndid": 1
      }
}'

返回语法

返回参数说明

参数名说明
ErrorCode 返回码
ErrorMsg 返回信息
RecordVersion 当前记录的版本号
TotalNum 删除的记录条数

 

返回示例

成功示例

{
  "ErrorCode": 0,
  "ErrorMsg": "Succeed",
  "RecordVersion": -1,
  "TotalNum": 16
}

失败示例

{
  "ErrorCode": 261,
  "ErrorMsg": "Record does not exist"
}

 

img

TcaplusDB是腾讯出品的分布式NoSQL数据库,存储和调度的代码完全自研。具备缓存+落地融合架构、PB级存储、毫秒级时延、无损水平扩展和复杂数据结构等特性。同时具备丰富的生态、便捷的迁移、极低的运维成本和五个九高可用等特点。客户覆盖游戏、互联网、政务、金融、制造和物联网等领域。

标签:RESTfulAPI,ListDeleteAllRecords,string,示例,版本号,TcaplusDB,version,tcaplus,id
来源: https://www.cnblogs.com/shujurener/p/15931977.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有