| Version | Update Time | Status | Author | Description |
|---|---|---|---|---|
1.0 | 2022-02-16 10:30 | 创建 | Weasley J | 创建api文档 |
1.1 | 2023-06-11 15:36 | 创建 | Weasley J | 更新api文档 |
1. Ukey健康Controller
1.1. ukey健康指令
Type: POST
Author: lwj
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description:
- RESTART:重启控件(较多使用)
- START: 启动控件
- STOP: 停止控件
- REPAIR: 修复证书
支持command类型
Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
message | string | 返回消息 | - |
success | boolean | 是否成功 | - |
timestamp | string | 响应时间戳 | - |
code | int32 | 状态码 | - |
data | object | 响应数据 | - |
└─stdOutList | array | 标准输出流信息 | - |
└─errorOutList | array | 错误输出流信息 | - |
Response-example:
{
"message": "success",
"success": true,
"timestamp": "2023-06-11 15:47:37",
"code": 23,
"data": {
"stdOutList": [
"f716hp"
],
"errorOutList": [
"rzbpo0"
]
}
}Curl-example:
curl -X POST -i http://localhost:8080/rpc/ukey/health/endpoint/2. 电子口岸报文加签Controller
2.1. 海关数据加签
Type: POST
Author: lwj
Content-Type: application/json; charset=utf-8
Description: 此接口已经整合"海关总署XML"和"海关179数据抓取"的加签
- 支持的加签类型
- 1.海关CEBXxxMessage XML数据加签
- 2. 海关179数据加签
Body-parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | int32 | false | 唯一id, 用来区分是哪一次发送的消息,默认值=1,从1开始,{@code int} 最大, 231-1. |
data | string | true | 加签源数据
支持的加签数据类型 |
Request-body:
{
"id": 262,
"data": "ggbuki"
}Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
message | string | 返回消息 | - |
success | boolean | 是否成功 | - |
timestamp | string | 响应时间戳 | - |
code | int32 | 状态码 | - |
data | object | 响应数据 | - |
└─success | boolean | 本次加签是否成功 | - |
└─certNo | string | 签名的ukey的卡序列号 | - |
└─x509Certificate | string | 签名的ukey证书
如需导出.cer证书,文件格式:卡序列号.cer | - |
└─digestValue | string | xml的数字摘要,先对不包含Signature节点的原始报文,进行C14n格式化,然后取shal二进制摘要,然后对sha1的值进行base64编码 | - |
└─signatureValue | string | 调用ukey获取的签名值 | - |
Response-example:
{
"message": "success",
"success": true,
"timestamp": "2023-06-11 15:47:37",
"code": 593,
"data": {
"success": true,
"certNo": "fzex4q",
"x509Certificate": "7wj4ki",
"digestValue": "rakt0t",
"signatureValue": "pbyy9u"
}
}Curl-example:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i http://localhost:8080/rpc/eport/signature --data '{
"id": 262,
"data": "ggbuki"
}'2.2. 海关总署XML数据加签(测试)
Type: GET
Author: lwj
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 非正式调用API,只为了让你看到海关总署XML加密的数据返回格式
Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
message | string | 返回消息 | - |
success | boolean | 是否成功 | - |
timestamp | string | 响应时间戳 | - |
code | int32 | 状态码 | - |
data | object | 响应数据 | - |
└─any object | object | any object. | - |
Response-example:
{
"message": "success",
"success": true,
"timestamp": "2023-06-11 15:47:37",
"code": 835,
"data": {}
}Curl-example:
curl -X GET -i http://localhost:8080/rpc/eport/signature/test/ceb2.3. 海关179数据抓取加签(测试)
Type: GET
Author: lwj
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Description: 非正式调用API,只为了让你看到179加密的数据返回格式
Response-fields:
| Field | Type | Description | Since |
|---|---|---|---|
message | string | 返回消息 | - |
success | boolean | 是否成功 | - |
timestamp | string | 响应时间戳 | - |
code | int32 | 状态码 | - |
data | object | 响应数据 | - |
└─any object | object | any object. | - |
Response-example:
{
"message": "success",
"success": true,
"timestamp": "2023-06-11 15:47:37",
"code": 250,
"data": {}
}Curl-example:
curl -X GET -i http://localhost:8080/rpc/eport/signature/test/179