接口地址:http://yesx2.com/api/app.php?s=App.Subject.Data  

接口描述: 请输入接口功能描述

接口参数

参数名字类型是否必须默认值其他说明
access_token字符串可选访问令牌,仅当开启签名验证时需要传递,生成令牌可使用App.Auth.ApplyToken接口

返回字段

返回结果类型说明
ret整型状态码,200表示成功,4xx表示客户端非法请求,5xx表示服务器错误
data对象或混合类型业务数据,由各自接口指定,通常为对象
msg字符串提示信息,失败时的错误提示

在线测试   


参数是否必须
service 必须
access_token 可选

客户端请求示例

{
    "ret": 200,
    "data": null,
    "msg": ""
}
<?php
require_once dirname(__FILE__) . '/PhalApiClient.php';

$client = PhalApiClient::create()
    ->withHost('http://yesx2.com/api/app.php');

$curl = curl_init();

curl_setopt_array($curl, array(
   CURLOPT_URL => 'http://api.com/api/v1/course',
   CURLOPT_RETURNTRANSFER => true,
   CURLOPT_ENCODING => '',
   CURLOPT_MAXREDIRS => 10,
   CURLOPT_TIMEOUT => 0,
   CURLOPT_FOLLOWLOCATION => true,
   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
   CURLOPT_CUSTOMREQUEST => 'GET',
   CURLOPT_HTTPHEADER => array(
      'User-Agent: Apifox/1.0.0 (https://apifox.com)'
   ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

// ret状态码,200表示成功
var_dump($rs->getRet());
// 业务数据
var_dump($rs->getData());
// 提示信息
var_dump($rs->getMsg());

错误列表

错误状态码错误描述信息
400表示客户端参数错误
404表示接口服务不存在
500表示服务端内部错误

本文档生成时间:2024-09-17 02:53:21

var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?bbd0e84d1a1464f844d594adc1610100"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();