DCIM API 文档 / 交换机 / 获取交换机自定义脚本
▍概述
获取交换机自定义脚本
▍URL
/index.php?m=api&a=getSwitchCustomScripts
▍请求参数
字段名 | 变量名 | 必填 | 类型 | 描述 |
---|---|---|---|---|
类型 | type | 是 | string | 需要获取的脚本类型(switch:对交换机操作,switch_port:对交换机端口操作) |
交换机ID | id | 是 | int | 交换机ID |
▍返回参数
字段名 | 变量名 | 类型 | 描述 |
---|---|---|---|
脚本ID | id | int | 自定义脚本ID,data数组中 |
名称 | name | string | 自定义脚本名称,data数组中 |
脚本 | scripts | string | 自定义脚本,data数组中 |
自定义变量 | custom_var | string | 自定义变量,json字符串,data数组中 |
状态 | status | string | success 成功 error 失败 |
信息 | msg | string | 提示信息 |