Primeton BFT Primeton BFT
Primeton BFT7.6GA文档库
  • 代理服务器HTTP接口调用
  • 1.文件同步发送接口
  • 2.文件异步发送接口
  • 3.文件异步发送结果查询接口

# 代理服务器HTTP接口调用

该章节介绍代理服务器HTTP接口调用。

# 1.文件同步发送接口

接口说明:通过该接口可同步向接收代理服务器发送文件

URL:POST ip:port/manager/poilcy/trigger/syn

发送报文:

{

"address": "127.0.0.1:7082",

"sendfolder":"E:\bft76\Guidfolder1",

"recfolder": "E:\bft76\Guidfolder2",

"files": "E:\bft76\Guidfolder1\file1.txt,E:\bft76\Guidfolder1\file2.txt"

}

参数说明:

参数 说明 备注
address 接收代理服务器地址,形式:ip:port;ip:port,port为接收方代理服务器接收文件端口 必填
sendfolder 发送节点发送目录 选填,sendfolder、files必须填写一项
recfolder 接收代理服务器接收文件目录 必填
files 发送文件全路径,多个以逗号,分隔 可选,若为空则传输发送目录下所有文件

返回报文:

{

"code": 0,

"message": "成功",

"data": {

"duration": "0天0时0分1秒",

"totalsize": 2,

"endDate": "2024-01-02 18:40:00.936",

"failsize": 0,

"succsize": 2,

"startDate": "2024-01-02 18:40:00.930"

}

}

返回报文字段说明:

参数 说明
code 执行状态码 0:失败 1:成功
message 消息
totalsize 读取文件数
succsize 传输成功文件数
failsize 传输失败文件数
startDate 开始时间
endDate 结束时间
duration 传输时长
onfilesize 未传输文件数

# 2.文件异步发送接口

接口说明:通过该接口可异步向接收代理服务器发送文件

URL:POST ip:port/manager/poilcy/trigger/asyn

发送报文:

{

"address": "127.0.0.1:7082",

"sendfolder":"E:\bft76\Guidfolder1",

"recfolder": "E:\bft76\Guidfolder2",

"files": "E:\bft76\Guidfolder1\file1.txt,E:\bft76\Guidfolder1\file2.txt"

}

参数说明:

参数 说明 备注
address 接收代理服务器地址,形式 : ip:port;ip:port,port为接收方代理服务器接收文件端口 必填
sendfolder 发送节点发送目录 选填,sendfolder、files必须填写一项
recfolder 接收代理服务器接收文件目录 必填
files 发送文件全路径,多个以逗号,分隔 可选,若为空则传输发送目录下所有文件

返回报文:

{ "code": 0,

"message": "SUCCEED",

"data": "b361dd93ed8542568e739321daac6085"

}

返回报文字段说明:

参数 说明
code 执行状态码 0:成功1: 失败
message 消息
data 异步执行结果查询码用于异步执行结果查询

# 3.文件异步发送结果查询接口

接口说明:通过该接口可同步向接收代理服务器发送文件

URL:get ip:port/manager/poilcy/result/query?requestid={requestid}

参数说明:

参数 说明 备注
requestid 异步执行返回的异步查询码 必填

返回报文:

{ "code": 0,

"message": "成功",

"data": {

"duration": "0天0时0分1秒",

"totalsize": 2,

"endDate": "2024-01-02 18:40:44.896",

"failsize": 0,

"succsize": 2,

"startDate": "2024-01-02 18:40:44.890"

}

}

返回报文字段说明:

参数 说明
code 执行状态码 0:失败 1:成功
message 消息
totalsize 读取文件数
succsize 传输成功文件数
failsize 传输失败文件数
startDate 开始时间
endDate 结束时间
duration 传输时长
onfilesize 未传输文件数

← SDK传输 Shell脚本传输 →