IP风险画像
<h3>接口描述</h3>
<ul>
<li>IP风险画像产品,基于多维度数据信息、持续性IP风险验证机制和多级IP风险判定算法,实时关联IP的位置信息、应用场景、端口服务和设备风险信息等进行IP风险精准判定,并实行IP风险赋分、风险分级机制,简化业务应用门槛。</li>
</ul>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com/ip/portraint</code></p>
<h3>请求方式</h3>
<ul>
<li>GET/POST</li>
</ul>
<h3>请求格式</h3>
<ul>
<li>x-www-form-urlencoded</li>
</ul>
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>appId</td>
<td>String</td>
<td>是</td>
<td>服务商分配的唯一标识</td>
</tr>
<tr>
<td>timestamp</td>
<td>Long</td>
<td>是</td>
<td>当前时间的毫秒数</td>
</tr>
<tr>
<td>sign</td>
<td>String</td>
<td>是</td>
<td>签名,详见签名算法说明</td>
</tr>
<tr>
<td>ip</td>
<td>String</td>
<td>是</td>
<td>ip地址</td>
</tr>
<tr>
<td>coordsys</td>
<td>String</td>
<td>否</td>
<td>坐标系,分为WGS84和BD09,默认为WGS84</td>
</tr>
</tbody>
</table>
<h3>签名算法说明</h3>
<p><code>sign = sha256(appId + appSecret + timestamp)</code></p>
<p>用服务商分配的 appId、服务商分配的 appSecret,当前时间毫秒数 timestamp,按上述顺序拼接成字符串,再进行 sha256 哈希得到。如下:</p>
<pre><code class="language-java">String appId = &quot;xyzxy2121zxyz&quot;;
String timestamp = &quot;1555378976238&quot;;
String appSecret = &quot;efcefcef1121cefcefc1212121&quot;;
String str = appId + appSecret + timestamp;
String sign = sha256(str);</code></pre>
<h3>成功返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 200,//返回码,详见返回码说明
&quot;msg&quot;: &quot;成功&quot;,//返回码对应描述
&quot;taskNo&quot;: &quot;116857074229138445573411&quot;,//本次请求号
&quot;charge&quot;: true, //计费标志,
&quot;data&quot;: {
&quot;continent&quot;: &quot;亚洲&quot;,//大洲
&quot;owner&quot;: &quot;中国联通&quot;,//所属机构
&quot;country&quot;: &quot;中国&quot;,//国家
&quot;lng&quot;: &quot;120.069641&quot;,//经度
&quot;city&quot;: &quot;杭州市&quot;,//城市
&quot;level&quot;: &quot;无&quot;,//风险等级(存在多项值,参考风险标签与等级说明)
&quot;isp&quot;: &quot;中国联通&quot;,//运营商
&quot;areacode&quot;: &quot;CN&quot;,//国家编码
&quot;scene&quot;: &quot;家庭宽带&quot;,//使用场景
&quot;score&quot;: 0,//风险分值
&quot;district&quot;: &quot;西湖区&quot;,//区县
&quot;tag&quot;: &quot;Sec_Dial&quot;,//风险标签 1.Proxy (该IP被捕获到被当做代理IP来使用) 2.IDC Sec_Dial (该IP被捕获到被当做秒拨IP来使用) 3. (该IP被识别为数据中心机房IP) 4. VPN (该IP被捕获到被当做VPN IP来使用) 5. Tor (该IP被捕获到被当做Tor节点来使用) 6.Scan (该IP被捕获到有端口扫描行为) 7.Brute_Force (该IP被捕获到有暴力破解行为)
&quot;radius&quot;: &quot;8.0562&quot;,//定位半径
&quot;updatetime&quot;: &quot;2024-06-24 18:03:36&quot;,//风险捕获时间
&quot;prov&quot;: &quot;浙江省&quot;,//省份
&quot;lat&quot;: &quot;30.267769&quot;//纬度
}
}</code></pre>
<h3>失败返回样例</h3>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;ip不能为空&quot;,
&quot;code&quot;: 400
}</code></pre>
<h3>风险分数以及风险等级说明</h3>
<table>
<thead>
<tr>
<th>序号</th>
<th>风险等级</th>
<th>风险分数</th>
<th><div style="width:400px">风险说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>高</td>
<td>80-100</td>
<td>该ip当前具有较高的业务风,建议对该ip采取较高等级的业务风控处理。</td>
</tr>
<tr>
<td>2</td>
<td>中</td>
<td>70-80</td>
<td>该ip当前具有中等业务风,建议对该ip采取一般的业务风控处理。</td>
</tr>
<tr>
<td>3</td>
<td>低</td>
<td>60-70</td>
<td>该ip当前具有较低的业务风险,建议可以对该ip进行标记,结合其他特征进行风控处理。</td>
</tr>
<tr>
<td>4</td>
<td>无</td>
<td>0-60</td>
<td>该ip无风险或目前未被捕获。</td>
</tr>
</tbody>
</table>
<h3>返回字段说明</h3>
<table>
<thead>
<tr>
<th>字段名</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>返回码,详见code返回码说明</td>
</tr>
<tr>
<td>msg</td>
<td>code对应的描述</td>
</tr>
<tr>
<td>charge</td>
<td>是否计费</td>
</tr>
<tr>
<td>taskNo</td>
<td>本次请求号</td>
</tr>
<tr>
<td>data</td>
<td>返回具体结果,详见成功返回样例</td>
</tr>
</tbody>
</table>
<h4>code返回码说明</h4>
<table>
<thead>
<tr>
<th>code</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>成功(计费)</td>
</tr>
<tr>
<td>400</td>
<td>参数错误</td>
</tr>
<tr>
<td>404</td>
<td>请求地址不正确</td>
</tr>
<tr>
<td>500</td>
<td>服务商维护,请稍候再试</td>
</tr>
<tr>
<td>601</td>
<td>接口未开通</td>
</tr>
<tr>
<td>602</td>
<td>账号停用</td>
</tr>
<tr>
<td>603</td>
<td>余额不足请充值</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>607</td>
<td>ip不在白名单</td>
</tr>
<tr>
<td>609</td>
<td>请求过于频繁,请稍候再试</td>
</tr>
<tr>
<td>999</td>
<td>其他,以实际返回为准</td>
</tr>
</tbody>
</table>