HTTP/HTTPS
请求协议
APIUSB / 后台接口 / 获取全部接口及权限列表
获取全部接口及权限列表
接口地址:https://api.apiusb.com/api/admin?s=Admin.Rights.GetAllAppApis
接口描述: 获取全部接口及权限列表
接口参数
参数名字 | 类型 | 是否必须 | 默认值 | 其他 | 说明 |
---|---|---|---|---|---|
access_token | 字符串 | 可选 | 访问令牌,仅当开启签名验证时需要传递,生成令牌可使用App.Auth.ApplyToken接口 | ||
app_key | 字符串 | 必须 | 最大:100 | 应用key |
返回字段
返回结果 | 类型 | 说明 |
---|---|---|
ret | 整型 | 状态码,200表示成功,4xx表示客户端非法请求,5xx表示服务器错误 |
data | 对象或混合类型 | 业务数据,由各自接口指定,通常为对象 |
data.total | 整型 | 总接口数量 |
data.apis | 字符串 | 全部前台接口 |
data.apis[].title | 字符串 | 接口模块名称 |
data.apis[].items | 字符串 | 模块接口列表 |
data.apis[].items[].service | 字符串 | 接口名称,例如:App.Auth.ApplyToke |
data.apis[].items[].title | 字符串 | 接口标题 |
data.apis[].items[].is_allow | 整型 | 是否授权,0否1是 |
data.apis[].class | 字符串 | 类名 |
data.apis[].total | 整型 | 模块接口总数量 |
msg | 字符串 | 提示信息,失败时的错误提示 |
在线测试
参数 | 是否必须 | 值 |
---|---|---|
service | 必须 | |
access_token | 可选 | |
app_key | 必须 |
客户端请求示例
{
"ret": 200,
"data": {
"total": 15,
"apis": [
{
"title": "授权模块",
"items": [
{
"service": "App.Auth.ApplyToken",
"title": "申请访问令牌",
"is_allow": 0
},
{
"service": "App.Auth.RefreshAccessToken",
"title": "刷新访问令牌",
"is_allow": 1
},
{
"service": "App.Auth.UserLogin",
"title": "用户登录",
"is_allow": 1
}
],
"class": "Auth",
"total": 3
},
{
"title": "配置模块",
"items": [
{
"service": "App.Config.AddConfig",
"title": "添加配置",
"is_allow": 1
},
{
"service": "App.Config.EditConfig",
"title": "修改配置",
"is_allow": 1
},
{
"service": "App.Config.GetConfig",
"title": "获取配置",
"is_allow": 1
},
{
"service": "App.Config.RemoveConfig",
"title": "删除配置",
"is_allow": 1
}
],
"class": "Config",
"total": 4
},
{
"title": "文件模块",
"items": [
{
"service": "App.File.GetList",
"title": "获取文件列表",
"is_allow": 1
},
{
"service": "App.File.Upload",
"title": "文件上传",
"is_allow": 1
}
],
"class": "File",
"total": 2
},
{
"title": "二维码模块",
"items": [
{
"service": "App.QrCode.Png",
"title": "根据文本内容,生成二维码",
"is_allow": 1
}
],
"class": "QrCode",
"total": 1
},
{
"title": "默认接口",
"items": [
{
"service": "App.Site.Index",
"title": "默认接口服务",
"is_allow": 1
}
],
"class": "Site",
"total": 1
},
{
"title": "用户模块",
"items": [
{
"service": "App.User.AlterPass",
"title": "修改密码",
"is_allow": 1
},
{
"service": "App.User.Profile",
"title": "获取会员资料",
"is_allow": 1
},
{
"service": "App.User.Register",
"title": "注册接口",
"is_allow": 1
},
{
"service": "App.User.UpdateProfile",
"title": "更新会员资料",
"is_allow": 1
}
],
"class": "User",
"total": 4
}
]
},
"msg": ""
}
错误列表
错误状态码 | 错误描述信息 |
---|---|
400 | ret=400,客户端参数错误或非法请求 |
404 | 表示接口服务不存在 |
406 | ret=406,access_token令牌校验不通过 |
407 | ret=407,app_key权限不足,或未知应用 |
408 | ret=408,当前用户禁止使用,或用户未登录 |
500 | 表示服务端内部错误 |
本文档生成时间:2024-04-20 11:10:12