接口详情
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ServerModel::indexServer |
| 所属业务 | 公共接口 |
| 来源模块/系统 | 接口模型 |
功能说明
接口详情
调用示例
$id = 1;
$result = (new \app\common\model\ServerModel())->indexServer($id);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
id | int | 否 | — | — | 接口ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
id | int | 接口ID |
server_group_id | int | 接口分组ID |
name | string | 接口名称 |
module | string | 模块类型 |
url | string | 地址 |
username | string | 用户名 |
password | string | 密码 |
hash | string | hash |
status | string | 是否启用(0=禁用,1=启用) |
正常返回
{
"id": 1,
"server_group_id": 1,
"name": "示例名称",
"module": "string",
"url": "https://example.com/callback",
"username": "示例名称",
"password": "Example@123",
"hash": "string",
"status": "1"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |