接口地址:https://oneapi.xiaoshanxin.com/api/app.php?s=App.tonguedetect.Api
接口描述: 请输入接口功能描述
在线调试
医疗数据平台 / OpenAPI / AI舌诊
AI舌诊
接口参数
返回字段
客户端请求示例
{"json":"","curl":"","php":"","js":"","py":"","java":"","cs":"","go":""}
<?php require_once dirname(__FILE__) . '/PhalApiClient.php'; $client = PhalApiClient::create() ->withHost('https://oneapi.xiaoshanxin.com/api/app.php'); <?php $host = "https://ali-market-tongue-detect.macrocura.com"; $path = "/diagnose/tongue/inquiry/report/"; $method = "POST"; $appcode = "你自己的AppCode"; $headers = array(); array_push($headers, "Authorization:APPCODE " . $appcode); //根据API的要求,定义相对应的Content-Type array_push($headers, "Content-Type".":"."application/json; charset=UTF-8"); $querys = ""; $bodys = "{\"session_id\":\"4a9f16e4-9a77-11ee-a379-00163e30cbb5\",\"basic_answers\":[{\"id\":5,\"answer\":\"2ca801d5-108e-4354-af86-622736ea157e\"},{\"id\":22,\"answer\":\"09167e22-be6d-4681-9afd-72cd6ebc7c9b\"}],\"addition_answers\":[{\"id\":1000000,\"answer\":\"1\"}]}"; $url = $host . $path; $curl = curl_init(); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_FAILONERROR, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, true); if (1 == strpos("$".$host, "https://")) { curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); } curl_setopt($curl, CURLOPT_POSTFIELDS, $bodys); var_dump(curl_exec($curl)); ?> // ret状态码,200表示成功 var_dump($rs->getRet()); // 业务数据 var_dump($rs->getData()); // 提示信息 var_dump($rs->getMsg());
错误列表