应用
创建应用
根据鉴权方式查看“创建应用”对应的真实 API 地址、参数与响应。
鉴权方式
个人访问令牌(PAT)由用户自行创建,用于以个人身份调用 API。
版本
请求地址
Header 参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
Authorization | string | 是 | Bearer {{access_token}} |
Query 参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
orgId | string | 是 | HAP组织Id |
Body 参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
name | string | 是 | 应用名称 |
icon | string | 否 | 图标名称,如:0_lego |
color | string | 否 | 主题颜色,如:#00bcd4 |
navLayout | string | 否 | 导航方式:top|group|tree|card |
navColor | string | 否 | 导航颜色:appColor|white|gray|black |
enableExternalPortal | boolean | 否 | 是否开启外部门户,默认 false |
响应参数
200成功获取应用信息| 名称 | 类型 | 描述 |
|---|---|---|
success | boolean | 是否调用成功 |
error_code | integer | 错误代码 |
error_msg | string | 错误消息 |
data | object | 应用详细信息 |
data.organizationId | string | 组织 id |
data.appId | string | 应用ID |
data.name | string | 应用名称 |
data.iconUrl | string | 图标地址 |
data.color | string | 颜色 |
data.desc | string | 应用说明 |
data.remark | string | 应用描述 |
data.sections | object[] | 分组信息 |
data.sections.id | string | 应用分组id |
data.sections.name | string | 分组名称 |
data.sections.items | object[] | 分组下应用项信息 |
data.sections.items.id | string | 应用项id |
data.sections.items.name | string | 应用项名称 |
data.sections.items.type | integer | 应用项类型,0:工作表、1:自定义页面、2:子分组 |
data.sections.items.iconUrl | string | 应用项图标地址 |
data.sections.items.status | integer | 状态 |
data.sections.items.alias | string | 别名 |
data.sections.items.notes | string | 开发者备注 |
data.sections.childSections | object,null[] | 子分组信息 |
data.sections.childSections.id | string | 子分组id |
data.sections.childSections.name | string | 子分组名称 |
data.sections.childSections.items | object[] | — |
curl -X POST "https://example.com/v3/apps?orgId=string" \ -H "Authorization: Bearer {{access_token}}" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "data": { "organizationId": "28447959-cf7f-4ae9-XXXXXXXXXXXXXXX", "appId": "b55d6ceb-b69a-44f0-a011-XXXXXXXXXXXXXXX", "name": "客户关系管理", "iconUrl": "https://fp1.example.cn/customIcon/sys_13_1_shop.svg", "color": "#3054EB", "desc": "", "sections": [ { "id": "676910ae3e6f2583f5d3edd5", "name": "驾驶舱", "items": [ { "id": "676910ad3e6f2583f5d3edd0", "name": "应用说明(操作指引)", "type": 1, "iconUrl": "https://fp1.example.cn/customIcon/12_2_book.svg", "status": 1, "alias": "", "notes": "" } ], "childSections": [] } ] }, "success": true}