呼叫接口

呼叫接口


创建分机组

<h4>接口说明:</h4> <h5>创建分机组</h5> <h4>请求方式:POST,form-data格式</h4> <h4>请求参数</h4> <table> <thead> <tr> <th>参数名</th> <th>类型</th> <th>是否必须</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>service</td> <td>string</td> <td>是</td> <td>App.Sip_Extgroup.AddExtgroup</td> </tr> <tr> <td>token</td> <td>string</td> <td>是</td> <td>通过授权接口获取的token</td> </tr> <tr> <td>name</td> <td>string</td> <td>是</td> <td>分机组名</td> </tr> <tr> <td>status</td> <td>int</td> <td>否</td> <td>分机组状态:1 启用;0 禁用,默认 1</td> </tr> </tbody> </table> <h4>接口请求示例(PHP)</h4> <pre><code>&amp;lt;?php $apiUrl = 'http://127.0.0.1:8080'; $postFields = [ 'service' =&amp;gt; 'App.Sip_Extgroup.AddExtgroup', 'token' =&amp;gt; 'ABCDEFG', 'name' =&amp;gt; 'abcdefg', 'status' =&amp;gt; 1 ]; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $apiUrl); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $postFields); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($curl); $curlError = curl_error($curl); curl_close($curl); var_dump($response); ?&amp;gt;</code></pre> <h4>返回数据结构示例</h4> <pre><code>{ &amp;quot;ret&amp;quot;: 200, &amp;quot;data&amp;quot;: { &amp;quot;status&amp;quot;: 0, &amp;quot;desc&amp;quot;: &amp;quot;分机组添加成功&amp;quot;, &amp;quot;reqtime&amp;quot;: 1581410934, &amp;quot;rsptime&amp;quot;: 1581410934 }, &amp;quot;msg&amp;quot;: &amp;quot;&amp;quot; }</code></pre> <h4>返回数据字段说明</h4> <table> <thead> <tr> <th>字段</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td></td> </tr> </tbody> </table>

页面列表

ITEM_HTML