API调用方式
<h3>接口网关</h3>
<ol>
<li>正式环境:<a href="https://api.kylin-task.com/">https://api.kylin-task.com/</a></li>
<li>测试环境:<a href="https://api-dev.kylin-task.com/">https://api-dev.kylin-task.com/</a></li>
</ol>
<h3>接口规范</h3>
<p>开放平台的所有接口均通过 HTTPS 进行通信,全部使用 POST 方式,请求参数为 JSON 格式,返回值为 JSON 格式</p>
<h3>公共请求参数</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>类型</th>
<th>是否必填</th>
<th>最大长度</th>
<th>参数描述</th>
<th>示例值</th>
</tr>
</thead>
<tbody>
<tr>
<td>companyId</td>
<td>数值</td>
<td>是</td>
<td>11</td>
<td>平台分配给企业的ID</td>
<td>52984126340489216</td>
</tr>
<tr>
<td>charset</td>
<td>字符</td>
<td>是</td>
<td>10</td>
<td>请求使用的编码格式,如utf-8,gbk等</td>
<td>utf-8</td>
</tr>
<tr>
<td>signType</td>
<td>字符</td>
<td>是</td>
<td>10</td>
<td>企业生成签名字符串所使用的签名算法类型,目前支持RSA和RSA2,推荐使用RSA2</td>
<td>RSA2</td>
</tr>
<tr>
<td>bizContent</td>
<td>json</td>
<td>是</td>
<td>不限</td>
<td>请求参数的集合,最大长度不限,除公共参数外所有请求参数都必须放在这个参数中传递</td>
<td>-</td>
</tr>
<tr>
<td>timestamp</td>
<td>字符</td>
<td>是</td>
<td>19</td>
<td>发送请求的时间,格式"yyyy-MM-dd HH:mm:ss"</td>
<td>2023-10-01 08:08:08</td>
</tr>
<tr>
<td>sign</td>
<td>字符</td>
<td>是</td>
<td>344</td>
<td>企业请求参数的签名串,详见[数据签名](<a href="https://www.showdoc.com.cn/kycloudopen/11199716093743187">https://www.showdoc.com.cn/kycloudopen/11199716093743187</a> "数据签名")</td>
<td>详见示例</td>
</tr>
</tbody>
</table>
<h3>请求示例</h3>
<pre><code class="language-json">{
&quot;companyId&quot;: 5,
&quot;charset&quot;: &quot;utf-8&quot;,
&quot;signType&quot;: &quot;RSA2&quot;,
&quot;timestamp&quot;: &quot;2024-05-28 13:53:08&quot;,
&quot;sign&quot;:&quot;NlnRFdaASWw4tTgsD5oXaIwJHzda1RzgZmEmkil7dUfvOxWqEEZqg5BDnuFeVMMAvUAcGbqqObEM2NowTveTPEjgI0zggaOafGNJB2JqtKSQDbso/UU9rYw4Kl6IoUhwDFgEOZlDttKZdEAocHRdh+B+vX7YyVB+78t3GcOPtwMW+KOcGAwE1WMEmJ6ciuDRvfLFtYIRPsxxqZu0Gs0pUHAkP2i2mS2Bijazp9kKgwMZI6J9wWzWrCAgWy4PywtCpnKg+JOkFwTiz4Gw/9r8VLyt527zZW7qkoPEihtr+/aO0MmvTiOmHrRVPvxiyumDleku1oMH/oOctA+21LEP5g==&quot;,
&quot;bizContent&quot;: &quot;{\\&quot;cardNumber\\&quot;:\\&quot;330102202301011122\\&quot;}&quot;
}</code></pre>
<h3>返回示例</h3>
<pre><code class="language-json">{
&quot;success&quot;: true,
&quot;code&quot;: &quot;success&quot;,
&quot;message&quot;: null,
&quot;object&quot;: {
&quot;userId&quot;: &quot;52984126340489216&quot;,
&quot;name&quot;: &quot;张三&quot;,
&quot;cardNumber&quot;: &quot;330102202301011122&quot;,
&quot;address&quot;: &quot;北京市东城区故宫&quot;,
&quot;age&quot;: &quot;18&quot;,
&quot;cardFrontUrl&quot;: &quot;https://oss-cn-hangzhou.aliyuncs.com/123456.png&quot;,
&quot;cardBackUrl&quot;: &quot;https://oss-cn-hangzhou.aliyuncs.com/123456.png&quot;,
&quot;startTime&quot;: &quot;2000-01-01&quot;,
&quot;endTime&quot;: &quot;2099-10-01&quot;,
&quot;isAuth&quot;: true
},
&quot;extParams&quot;: null,
&quot;redirect&quot;: null
}</code></pre>