权限接口完善
This commit is contained in:
255
nezha接口文档.md
255
nezha接口文档.md
@@ -1773,14 +1773,16 @@ GET /system/list?pageSize=10&currPage=2
|
|||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
code |int |R |响应码,详见 附录A
|
code |int |R |响应码,详见 附录A
|
||||||
msg |string |R |
|
msg |string |R |
|
||||||
data |Object[] |R |
|
data |Object |R |
|
||||||
 id |Integer |R |编号
|
 totalCount |int |R |
|
||||||
 name |String |R |系统名称
|
 list |Object[] |R |
|
||||||
 builtIn |Integer |R |是否内置,内置不可删除,1:内置,0:非内置
|
  id |Integer |R |编号
|
||||||
 remarks |String |R |备注信息
|
  name |String |R |系统名称
|
||||||
 createDate |Date |R |创建时间
|
  builtIn |Integer |R |是否内置,内置不可删除,1:内置,0:非内置
|
||||||
 updateDate |Date |R |更新时间
|
  remarks |String |R |备注信息
|
||||||
 delFlag |Integer |R |删除标记 1:删除,0:未删除,默认:0
|
  createDate |Date |R |创建时间
|
||||||
|
  updateDate |Date |R |更新时间
|
||||||
|
  delFlag |Integer |R |删除标记 1:删除,0:未删除,默认:0
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
@@ -1788,15 +1790,18 @@ data |Object[] |R |
|
|||||||
{
|
{
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success",
|
"msg": "success",
|
||||||
"data": [{
|
"data": {
|
||||||
"id": 1,
|
"totalCount": 1,
|
||||||
"name": "system1",
|
"list": [{
|
||||||
"builtIn": 1,
|
"id": 1,
|
||||||
"remarks": "",
|
"name": "system1",
|
||||||
"delFlag": 0,
|
"builtIn": 1,
|
||||||
"createDate": "2019-07-10 10:10:10",
|
"remarks": "",
|
||||||
"updateDate": "2019-07-10 10:10:10",
|
"delFlag": 0,
|
||||||
}]
|
"createDate": "2019-07-10 10:10:10",
|
||||||
|
"updateDate": "2019-07-10 10:10:10"
|
||||||
|
}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1824,7 +1829,7 @@ GET /system/detail?id=2
|
|||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
code |int |R |响应码,详见 附录A
|
code |int |R |响应码,详见 附录A
|
||||||
msg |string |R |
|
msg |string |R |
|
||||||
data |Object[] |R |
|
data |Object |R |
|
||||||
 id |Integer |R |编号
|
 id |Integer |R |编号
|
||||||
 name |String |R |系统名称
|
 name |String |R |系统名称
|
||||||
 builtIn |Integer |R |是否内置,内置不可删除,1:内置,0:非内置
|
 builtIn |Integer |R |是否内置,内置不可删除,1:内置,0:非内置
|
||||||
@@ -1844,7 +1849,7 @@ data |Object[] |R |
|
|||||||
{
|
{
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success",
|
"msg": "success",
|
||||||
"data": [{
|
"data": {
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"name": "system2",
|
"name": "system2",
|
||||||
"builtIn": 1,
|
"builtIn": 1,
|
||||||
@@ -1862,7 +1867,7 @@ data |Object[] |R |
|
|||||||
"id": 3,
|
"id": 3,
|
||||||
"name": "group2"
|
"name": "group2"
|
||||||
}]
|
}]
|
||||||
}]
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1878,7 +1883,8 @@ data |Object[] |R |
|
|||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
name |String |R |名称
|
name |String |R |名称
|
||||||
remark |String |O |备注
|
remark |String |O |备注
|
||||||
usergroupIds |Integer[] |O |用户组id
|
usergroupIds |Integer[] |O |用户组id,分配现有节点组
|
||||||
|
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
@@ -1896,13 +1902,20 @@ usergroupIds |Integer[] |O |用户组id
|
|||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
code |int |R |响应码,详见 附录A
|
code |int |R |响应码,详见 附录A
|
||||||
msg |string |R |
|
msg |string |R |
|
||||||
|
data |Object |R |
|
||||||
|
 state |boolean |R |操作结果 false失败,true成功
|
||||||
|
 msg |String |R |失败原因
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success"
|
"msg": "success",
|
||||||
|
"data": {
|
||||||
|
"state": true,
|
||||||
|
"msg": ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1938,13 +1951,20 @@ usergroupIds |Integer[] |O |用户组id
|
|||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
code |int |R |响应码,详见 附录A
|
code |int |R |响应码,详见 附录A
|
||||||
msg |string |R |
|
msg |string |R |
|
||||||
|
data |Object |R |
|
||||||
|
 state |boolean |R |操作结果 false失败,true成功
|
||||||
|
 msg |String |R |失败原因
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success"
|
"msg": "success",
|
||||||
|
"data": {
|
||||||
|
"state": false,
|
||||||
|
"msg": "名称已被占用"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1992,46 +2012,18 @@ GET /system/nodes?id=5
|
|||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
code |int |R |响应码,详见 附录A
|
code |int |R |响应码,详见 附录A
|
||||||
msg |String |R |
|
msg |String |R |
|
||||||
data |Object[] |R |
|
data |Object |R |
|
||||||
 name |String |R |名称
|
 totalCount |int |R |
|
||||||
 hostName |String |R |主机名
|
 list |Object[] |R |
|
||||||
 ip |String |R |ip
|
  name |String |R |名称
|
||||||
 uuid |Integer |R |全局唯一
|
  hostName |String |R |主机名
|
||||||
 type |Integer |R |设备类型,1、server,2、net
|
  ip |String |R |ip
|
||||||
 tagName |String |R |设备标签名称
|
  uuid |Integer |R |全局唯一
|
||||||
 tag |Integer |R |设备标签,与sys_dict关联
|
  type |Integer |R |设备类型,1、server,2、net
|
||||||
 state |String |R |设备状态,1:在线,2:下线,3:删除
|
  tagName |String |R |设备标签名称
|
||||||
 remark |String |R |备注
|
  tag |Integer |R |设备标签,与sys_dict关联
|
||||||
|
  state |String |R |设备状态,1:在线,2:下线,3:删除
|
||||||
示例:
|
  remark |String |R |备注
|
||||||
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"code": 200,
|
|
||||||
"msg": "success",
|
|
||||||
"data": [{
|
|
||||||
"id": 1,
|
|
||||||
"name": "a",
|
|
||||||
"hostName": "b",
|
|
||||||
"ip": "112.21.122.212",
|
|
||||||
"uuid": 1,
|
|
||||||
"tagName": "atc",
|
|
||||||
"type": 1,
|
|
||||||
"tag": 1,
|
|
||||||
"state": 1,
|
|
||||||
"remark": ""
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
###### 返回结果
|
|
||||||
|
|
||||||
参数名称 |类型 |出现要求 |描述
|
|
||||||
:---- |:--- |:------ |:---
|
|
||||||
code |int |R |响应码,详见 附录A
|
|
||||||
msg |string |R |
|
|
||||||
data |Object[] |R |
|
|
||||||
 state |Integer |R |结果 0:删除失败,1:删除成功
|
|
||||||
 msg |String |O |失败原因,成功时为空
|
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
@@ -2040,8 +2032,19 @@ data |Object[] |R |
|
|||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success",
|
"msg": "success",
|
||||||
"data": {
|
"data": {
|
||||||
"state": 1,
|
"totalCount": 1,
|
||||||
"msg": ""
|
"list": [{
|
||||||
|
"id": 1,
|
||||||
|
"name": "a",
|
||||||
|
"hostName": "b",
|
||||||
|
"ip": "112.21.122.212",
|
||||||
|
"uuid": 1,
|
||||||
|
"tagName": "atc",
|
||||||
|
"type": 1,
|
||||||
|
"tag": 1,
|
||||||
|
"state": 1,
|
||||||
|
"remark": ""
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -2143,7 +2146,6 @@ code |int |R |响应码,详见 附录A
|
|||||||
msg |string |R |
|
msg |string |R |
|
||||||
data |Object |R |
|
data |Object |R |
|
||||||
 state |Integer |R |校验结果 false不可用,true可用
|
 state |Integer |R |校验结果 false不可用,true可用
|
||||||
 msg |String |R |校验信息,校验不通过时有值
|
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
@@ -2152,8 +2154,7 @@ data |Object |R |
|
|||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success",
|
"msg": "success",
|
||||||
"data": {
|
"data": {
|
||||||
"state": true,
|
"state": true
|
||||||
"msg": ""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -2175,8 +2176,8 @@ data |Object |R |
|
|||||||
|
|
||||||
参数名称 |类型 |出现要求 |描述
|
参数名称 |类型 |出现要求 |描述
|
||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
currPage |Integer |O |页码,为空时默认为1
|
currPage |Integer |O |页码,为空时默认为1
|
||||||
pageSize |Integer |O |每页记录数,为空时默认为10
|
pageSize |Integer |O |每页记录数,为空时默认为10
|
||||||
order |String |O |排序
|
order |String |O |排序
|
||||||
systemId |Integer |C |业务系统id
|
systemId |Integer |C |业务系统id
|
||||||
|
|
||||||
@@ -2192,13 +2193,18 @@ GET /usergroup/list?pageSize=10&currPage=2&systemId=4
|
|||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
code |int |R |响应码,详见 附录A
|
code |int |R |响应码,详见 附录A
|
||||||
msg |string |R |
|
msg |string |R |
|
||||||
data |Object[] |R |
|
data |Object |R |
|
||||||
 id |Integer |R |主键
|
 totalCount |int |R |
|
||||||
 name |String |R |用户组名称
|
 list |Object[] |R |
|
||||||
 remark |String |R |备注信息
|
  id |Integer |R |主键
|
||||||
 systemInfos |Object[] |R |业务系统
|
  name |String |R |用户组名称
|
||||||
  id |Integer |R |业务系统id
|
  remark |String |R |备注信息
|
||||||
  name |String |R |业务系统名称
|
  systemInfos |Object[] |R |业务系统
|
||||||
|
   id |Integer |R |业务系统id
|
||||||
|
   name |String |R |业务系统名称
|
||||||
|
  users |Object[] |R |用户组内的用户
|
||||||
|
   id |Integer |R |用户id
|
||||||
|
   username |String |R |用户登录名
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
@@ -2206,15 +2212,22 @@ data |Object[] |R |
|
|||||||
{
|
{
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success",
|
"msg": "success",
|
||||||
"data": [{
|
"data": {
|
||||||
"id": 1,
|
"totalCount": 1,
|
||||||
"name": "usergroup1",
|
"list": [{
|
||||||
"remarks": "",
|
|
||||||
“systemInfos": [{
|
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"name": "system1"
|
"name": "usergroup1",
|
||||||
|
"remarks": "",
|
||||||
|
“systemInfos": [{
|
||||||
|
"id": 1,
|
||||||
|
"name": "system1"
|
||||||
|
}],
|
||||||
|
"users": [{
|
||||||
|
"id": 1,
|
||||||
|
"username": "admin"
|
||||||
|
}]
|
||||||
}]
|
}]
|
||||||
}]
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2242,13 +2255,16 @@ GET /usergroup/detail?id=2
|
|||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
code |int |R |响应码,详见 附录A
|
code |int |R |响应码,详见 附录A
|
||||||
msg |string |R |
|
msg |string |R |
|
||||||
data |Object[] |R |
|
data |Object |R |
|
||||||
 id |Integer |R |主键
|
 id |Integer |R |主键
|
||||||
 name |String |R |用户组名称
|
 name |String |R |用户组名称
|
||||||
 remark |String |R |备注信息
|
 remark |String |R |备注信息
|
||||||
 systemInfos |Object[] |R |业务系统
|
 systemInfos |Object[] |R |业务系统
|
||||||
  id |Integer |R |业务系统id
|
  id |Integer |R |业务系统id
|
||||||
  name |String |R |业务系统名称
|
  name |String |R |业务系统名称
|
||||||
|
 users |Object[] |R |用户组内的用户
|
||||||
|
  id |Integer |R |用户id
|
||||||
|
  username |String |R |用户登录名
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
@@ -2263,6 +2279,10 @@ data |Object[] |R |
|
|||||||
“systemInfos": [{
|
“systemInfos": [{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"name": "system1"
|
"name": "system1"
|
||||||
|
}],
|
||||||
|
"users": [{
|
||||||
|
"id": 1,
|
||||||
|
"username": "admin"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2281,6 +2301,7 @@ data |Object[] |R |
|
|||||||
name |String |R |名称
|
name |String |R |名称
|
||||||
remark |String |O |备注
|
remark |String |O |备注
|
||||||
systemIds |Integer[] |O |业务系统id
|
systemIds |Integer[] |O |业务系统id
|
||||||
|
userIds |Integer[] |O |用户id
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
@@ -2288,7 +2309,8 @@ systemIds |Integer[] |O |业务系统id
|
|||||||
{
|
{
|
||||||
"name": "usergroup22",
|
"name": "usergroup22",
|
||||||
"remark": "en",
|
"remark": "en",
|
||||||
"systemIds": [1,2,3,4]
|
"systemIds": [1,2,3,4],
|
||||||
|
"userIds": [1,3]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2298,13 +2320,20 @@ systemIds |Integer[] |O |业务系统id
|
|||||||
:---- |:--- |:------ |:---
|
:---- |:--- |:------ |:---
|
||||||
code |int |R |响应码,详见 附录A
|
code |int |R |响应码,详见 附录A
|
||||||
msg |string |R |
|
msg |string |R |
|
||||||
|
data |Object |R |
|
||||||
|
 state |boolean |R |操作结果 false失败,true成功
|
||||||
|
 msg |String |R |失败原因
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success"
|
"msg": "success",
|
||||||
|
"data": {
|
||||||
|
"state": false,
|
||||||
|
"msg": "名称已被占用"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2322,6 +2351,7 @@ id |Integer |R |id
|
|||||||
name |String |R |名称
|
name |String |R |名称
|
||||||
remark |String |O |备注
|
remark |String |O |备注
|
||||||
systemIds |Integer[] |O |业务系统id
|
systemIds |Integer[] |O |业务系统id
|
||||||
|
userIds |Integer[] |O |用户id
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
@@ -2330,7 +2360,8 @@ systemIds |Integer[] |O |业务系统id
|
|||||||
"id": 9,
|
"id": 9,
|
||||||
"name": "cab9",
|
"name": "cab9",
|
||||||
"remark": "en",
|
"remark": "en",
|
||||||
"systemIds": [1,2,3,4]
|
"systemIds": [1,2,3,4],
|
||||||
|
"userIds": [1,3]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2346,7 +2377,11 @@ msg |string |R |
|
|||||||
```
|
```
|
||||||
{
|
{
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success"
|
"msg": "success",
|
||||||
|
"data": {
|
||||||
|
"state": false,
|
||||||
|
"msg": "名称已被占用"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -2390,6 +2425,46 @@ msg |string |R |
|
|||||||
|
|
||||||
- **接口说明:** 用于新增/修改用户组时展示业务系统,同 "2.2.1.1 业务系统列表查询",请求参数"usergroupId"为必须参数
|
- **接口说明:** 用于新增/修改用户组时展示业务系统,同 "2.2.1.1 业务系统列表查询",请求参数"usergroupId"为必须参数
|
||||||
|
|
||||||
|
##### 2.2.2.7 用户组名称校验
|
||||||
|
|
||||||
|
- **接口说明:** 用户组名称校验,不能重复
|
||||||
|
- **接口地址:** /usergroup/nameCheck
|
||||||
|
- **请求方式:** GET
|
||||||
|
|
||||||
|
###### 请求参数
|
||||||
|
|
||||||
|
参数名称 |类型 |出现要求 |描述
|
||||||
|
:---- |:--- |:------ |:---
|
||||||
|
id |String |O |唯一标识,为空表示正在新增
|
||||||
|
name |String |R |名称
|
||||||
|
|
||||||
|
示例:
|
||||||
|
|
||||||
|
```
|
||||||
|
GET /usergroup/nameCheck?id=5&name=ug2
|
||||||
|
```
|
||||||
|
|
||||||
|
###### 返回结果
|
||||||
|
|
||||||
|
参数名称 |类型 |出现要求 |描述
|
||||||
|
:---- |:--- |:------ |:---
|
||||||
|
code |int |R |响应码,详见 附录A
|
||||||
|
msg |string |R |
|
||||||
|
data |Object |R |
|
||||||
|
 state |Integer |R |校验结果 false不可用,true可用
|
||||||
|
|
||||||
|
示例:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "success",
|
||||||
|
"data": {
|
||||||
|
"state": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### 2.3 监测配置
|
### 2.3 监测配置
|
||||||
|
|
||||||
@@ -2408,7 +2483,7 @@ msg |string |R |
|
|||||||
currPage |Integer |O |页码,为空时默认为1
|
currPage |Integer |O |页码,为空时默认为1
|
||||||
pageSize |Integer |O |每页记录数,为空时默认为10
|
pageSize |Integer |O |每页记录数,为空时默认为10
|
||||||
order |String |O |排序
|
order |String |O |排序
|
||||||
name |String |C |监测类别
|
name |String |O |监测类别
|
||||||
|
|
||||||
示例:
|
示例:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user