设置预测试外呼任务状态接口
<h3>接口说明:</h3>
<h5>设置预测试外呼任务的状态。</h5>
<h3>请求参数</h3>
<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_Yccall.TaskSet</td>
</tr>
<tr>
<td>token</td>
<td>string</td>
<td>是</td>
<td>通过授权接口获取的token</td>
</tr>
<tr>
<td>taskid</td>
<td>string</td>
<td>是</td>
<td>创建任务时返回的唯一id</td>
</tr>
<tr>
<td>taskstatus</td>
<td>int</td>
<td>是</td>
<td>设置任务状态 1:开启、2:暂停、3:结束</td>
</tr>
</tbody>
</table>
<h3>接口请求示例(PHP)</h3>
<pre><code>&lt;?php
$apiUrl = 'http://127.0.0.1:8080';
$postFields = [
'service' =&gt; 'App.Sip_Yccall.TaskSet',
'token' =&gt; 'ABCDEFG',
'taskid' =&gt; 'ABCDEFG',
'taskstatus' =&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);
?&gt;</code></pre>
<h3>返回数据结构示例</h3>
<pre><code>{
&quot;ret&quot;: 200,
&quot;data&quot;: {
&quot;status&quot;: 0,
&quot;desc&quot;: &quot;设置成功&quot;,
&quot;reqtime&quot;: 1581496800,
&quot;rsptime&quot;: 1581496800
},
&quot;msg&quot;: &quot;&quot;
}</code></pre>
<h3>返回参数说明</h3>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>desc</td>
<td>string</td>
<td>返回描述</td>
</tr>
</tbody>
</table>