云服务器内容精选

  • 请求示例 HTTP的示例 PUT /controller/campus/v1/accountservice/mac/a91e1696-02a2-4a68-bad4-aa639359c8cf HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN: x-yyyyyy { "name" : "macAccountName", "description" : "mac test", "terminalMacs" : ["11-11-11-11-11-11","22-22-22-22-22-22"], "userGroupId" : "a7953ba5-2779-4fb4-aaf0-6f39fac19c5e", "roleIds" : ["a7953ba5-2779-4fb4-aaf0-6f39fac19c5e"], "email" : "xxx@example.com", "telephone" : "1xxxxxxxxxx", "validPeriodLong" : "1571710215000", "bindAccessInfo" : { "bindDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindAccDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindEsn" : "21500829352SH1903955,21500829352SH1903977", "bindIP" : "10.1.1.1,10.1.1.2" }, "fields" : [ { "customFieldId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359cb", "customFieldValue" : "aaa" } ], "supportDpsk" : false, "dpsk" : "" }
  • 响应示例 返回状态码为200:修改成功,响应体参考DataMacDto。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "data" : { "name" : "macAccountName", "description" : "mac test", "terminalMacs" : ["11-11-11-11-11-11","22-22-22-22-22-22"], "userGroupId" : "a7953ba5-2779-4fb4-aaf0-6f39fac19c5e", "roleIds" : ["a7953ba5-2779-4fb4-aaf0-6f39fac19c5e"], "email" : "xxx@example.com", "telephone" : "1xxxxxxxxxx", "validPeriodLong" : "1571710215000", "bindAccessInfo" : { "bindDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindAccDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindEsn" : "21500829352SH1903955,21500829352SH1903977", "bindIP" : "10.1.1.1,10.1.1.2" }, "fields" : [ { "customFieldId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359cb", "customFieldValue" : "aaa" } ], "supportDpsk" : false, "dpsk" : "", "id" : "d50a4732-f933-410b-88c0-7adf0ba59550", "userGroupPath" : "ROOT\\Guest" } } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /controller/campus/v1/accountservice/mac/action/batch-delete HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "ids" : ["fb9317cf-fdb6-40fe-821f-3c20fc6a63eb"] }
  • 响应示例 返回状态码为200:删除成功,响应体参考DeleteMacsOutput。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errorCode" : "", "errorMessage" : "", "deleteNameList" : ["name"], "failList" : [ { "errcode" : "0308000221", "errmsg" : "The selected user does not exist", "id" : "51cdcbe3-5e14-492b-ab27-86950b661d19", "name" : "mac1" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 响应示例 返回状态码为201:创建mac帐号成功,响应体参考DataMacDto。 HTTP/1.1 201 Created Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "data" : { "name" : "macAccountName", "description" : "mac test", "terminalMacs" : ["11-11-11-11-11-11","22-22-22-22-22-22"], "userGroupId" : "a7953ba5-2779-4fb4-aaf0-6f39fac19c5e", "roleIds" : ["a7953ba5-2779-4fb4-aaf0-6f39fac19c5e"], "email" : "xxx@example.com", "telephone" : "1xxxxxxxxxx", "validPeriodLong" : "1571710215000", "bindAccessInfo" : { "bindDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindAccDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindEsn" : "21500829352SH1903955,21500829352SH1903977", "bindIP" : "10.1.1.1,10.1.1.2" }, "fields" : [ { "customFieldId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359cb", "customFieldValue" : "aaa" } ], "supportDpsk" : false, "dpsk" : "", "id" : "d50a4732-f933-410b-88c0-7adf0ba59550", "userGroupPath" : "ROOT\\Guest" } } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /controller/campus/v1/accountservice/mac HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "name" : "macAccountName", "description" : "mac test", "terminalMacs" : ["11-11-11-11-11-11","22-22-22-22-22-22"], "userGroupId" : "a7953ba5-2779-4fb4-aaf0-6f39fac19c5e", "roleIds" : ["a7953ba5-2779-4fb4-aaf0-6f39fac19c5e"], "email" : "xxx@example.com", "telephone" : "1xxxxxxxxxx", "validPeriodLong" : "1571710215000", "bindAccessInfo" : { "bindDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindAccDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindEsn" : "21500829352SH1903955,21500829352SH1903977", "bindIP" : "10.1.1.1,10.1.1.2" }, "fields" : [ { "customFieldId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359cb", "customFieldValue" : "aaa" } ], "supportDpsk" : false, "dpsk" : "" }
  • 请求示例 HTTP的示例 GET /controller/campus/v1/accountservice/mac?id=a91e1696-02a2-4a68-bad4-aa639359c8cf&pageIndex=1&pageSize=20&searchName=mac&terminalMac=11-11-11-11-11-11&roleId=a91e1696-02a2-4a68-bad4-aa639359c8cf&userGroupIdList=a7953ba5-2779-4fb4-aaf0-6f39fac19c5e,a7953ba5-2779-4fb4-aaf0-6f39fac19c5e&description=xxx&accountStatus=ENABLED,DISABLED,EXPIRED&validateStartTime=1541389780672&validateEndTime=1541390000000 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • 响应参数 返回状态码为200:查询成功返回结果,响应体参考MacDataList。 表2 MacDataList对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 pageIndex int32 [0-2147483647] - 页面索引。 0 pageSize int32 [0-1000] - 页面大小。 1000 totalRecords int32 - - 总数据量。 1000 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" data ARRAY_REFERENCE 0-1000个列表项,详细请参见表7。 MAC账号出参dto - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • URI /controller/campus/v1/accountservice/mac 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 string 0~36个字符。 - mac帐号ID,UUID格式。如果使用id作为查询条件,其他查询条件失效。 "a91e1696-02a2-4a68-bad4-aa639359c8cf" pageIndex 否 int32 [0-2147483647] - 页面索引。 1 pageSize 否 int32 [0-1000] - 页面大小。 20 searchName 否 string 0~128个字符。 - 名称搜索关键词。该字段支持模糊查询。 "mac" terminalMac 否 string 0~64个字符。 - mac地址。该字段支持模糊查询,只支持按照字符匹配,MAC地址段也只按照字符匹配。 "11-11-11-11-11-11" roleId 否 string 0~36个字符。 - 角色ID。UUID格式 "a91e1696-02a2-4a68-bad4-aa639359c8cf" userGroupIdList 否 string 0~370个字符。 - 用户组ID列表。最多支持10个用户组ID,多个用户组id以英文逗号分割。UUID格式 "a7953ba5-2779-4fb4-aaf0-6f39fac19c5e,a7953ba5-2779-4fb4-aaf0-6f39fac19c5e" description 否 string 0~128个字符。 - mac账号描述信息。该字段支持模糊查询。 "xxx" accountStatus 否 string 0~24个字符。 - 用户状态,支持如下三个类型,ENABLED - 已启用, DISABLED - 已停用,EXPIRED - 已过期,如果多个类型用英文逗号分割。 "ENABLED,DISABLED,EXPIRED" validateStartTime 否 int64 - - 查询过期起始时间。 1541389780672 validateEndTime 否 int64 - - 查询过期结束时间。 1541390000000
  • 响应示例 返回状态码为200:查询成功返回结果,响应体参考MacDataList。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "pageIndex" : 0, "pageSize" : 1000, "totalRecords" : 1000, "errcode" : "0", "errmsg" : "", "data" : [ { "name" : "macAccountName", "description" : "mac test", "terminalMacs" : ["11-11-11-11-11-11","22-22-22-22-22-22"], "userGroupId" : "a7953ba5-2779-4fb4-aaf0-6f39fac19c5e", "roleIds" : ["a7953ba5-2779-4fb4-aaf0-6f39fac19c5e"], "email" : "xxx@example.com", "telephone" : "1xxxxxxxxxx", "validPeriodLong" : "1571710215000", "bindAccessInfo" : { "bindDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindAccDeviceInfo" : [ { "deviceIp" : "10.1.1.1", "port" : "G0/0/1", "vlan" : "3377" } ], "bindEsn" : "21500829352SH1903955,21500829352SH1903977", "bindIP" : "10.1.1.1,10.1.1.2" }, "fields" : [ { "customFieldId" : "ea25fdbf-8dee-4823-bac2-5bfe8e3359cb", "customFieldValue" : "aaa" } ], "supportDpsk" : false, "dpsk" : "", "id" : "d50a4732-f933-410b-88c0-7adf0ba59550", "userGroupPath" : "ROOT\\Guest" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive