Skip to content
Microus API系统
返回首页

目录示例接口

公开接口 免费

演示子目录结构的API接口,返回目录下的接口响应信息

请求信息

请求方式 GET
返回格式 JSON
请求地址
https://api.microku.cn/api/test/
示例地址
/api/test/?key=YOUR_API_KEY&type=info

请求参数

参数名 类型 必填 说明
type string 请求类型,可选值:info, status

返回参数

字段名 类型 说明
code integer 状态码
msg string 状态消息
data.message string 返回消息内容
data.path string 接口路径
timestamp integer 时间戳

状态码说明

状态码 状态信息 说明
200 OK 请求成功
400 Bad Request 请求参数错误
401 Unauthorized 未授权,无效的API密钥
403 Forbidden 权限不足或余额不足
404 Not Found 接口不存在
429 Too Many Requests 请求过于频繁
500 Internal Server Error 服务器内部错误
502 Bad Gateway 网关错误

在线测试

type
点击"发送请求"按钮查看返回结果...

调用示例

PHP (cURL)
<?php
$url = 'https://api.microku.cn/api/test/';
$params = [
    'type' => 'value',
];

$url .= '?' . http_build_query($params);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data);