Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
D
dbp
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • credit_data
  • dbp
  • Wiki
  • instructions

instructions · Changes

Page history
init authored Oct 21, 2019 by 李林坳's avatar 李林坳
Hide whitespace changes
Inline Side-by-side
Showing with 61 additions and 0 deletions
+61 -0
  • instructions.md instructions.md +61 -0
  • No files found.
instructions.md 0 → 100644
View page @ 34c365d3
#### 数据交互规范
1. 使用HTTP协议进行数据通信 
2. 请求数据均使用GET/POST方式发送(Content-Type: application/x-www-form-urlencoded) 
3. 双方的接口响应数据字符集必须为UTF-8,且返回的数据为JSON格式字符串 
4. 脱敏使用MD5、SHA256等hash算法进行脱敏 
5. 双方每次API交互都需要做请求签名处理
6. 接口的有效期为10分钟,所以至少每隔十分钟需要重新获取参数。
---
#### 服务地址:
```
http://api.shuidi.cn/
```
#### 接口认证
客户每次调用接口,必需包含接入ID(**pname**), 安全验证码(**vkey**)和时间戳(**ptime**).
| 参数名称 | 是否必填 | 说明 |
| -------- | -------- | -------- |
| pname | 是 | 调用方唯一ID,用于身份识别 |
| ptime | 是 | 时间戳,从格林威治时间1970年01月01日00时00分00秒起至现在的时间,精确到毫秒(13位) |
| vkey | 是 | 安全验证码。使用下划线依次连接pkey、ptime、pkey,计算该字符串的MD5值完成签名.<br>结果为32个字符 |
Java计算vkey示例:
```
String ptime =String.valueOf(System.currentTimeMillis());
SecureUtil.md5(pkey + "_" + ptime + "_" + pkey);
```
php计算vkey示例:
```
$vkey=md5($pkey.”_”.$ptime.”_”.$pkey)
```
#### 返回数据格式
> 所有接口返回值以JSON字符串的形式返回给调用者,JSON格式如下:
```
{
"statusCode": 1,
"statusMessage": "请求成功",
"data": {}
}
```
返回JSON属性如下:
|属性 | 说明 |
| -------- | -------- |
|statusCode | 返回查询结果编码 |
|statusMessage | result不为1时的错误信息描述。 |
|data | 结果数据。不同接口,data的内容会有所不同。具体见各接口返回说明。 |
#### 错误编码
| 错误编码 | 说明 |
| -------- | -------- |
| 1 | 请求成功 |
| 2 | 未查询到数据 |
| 3 | 接口未授权 |
| 4 | 请求参数错误 |
| 30001 | 请求已过期 |
| 99999 | 系统错误 |
\ No newline at end of file
Clone repository
  • README
  • SUMMARY
  • bidchance.wiki
    • README
    • open_bidchance_batchGetDatas
    • open_bidchance_batchGetKeywords
    • open_bidchance_count
    • open_bidchance_find
    • open_bidchance_keywords
    • open_bidchance_search
    • open_bidchance_searchPage
  • common
    • authenticate
    • error_code
    • output_format
    • service_hosts_pub
  • company.wiki
    • README
View All Pages