云服务器内容精选

  • 响应参数 返回状态码为200:当前时间段模板。 表2 TimeInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 - data ARRAY_REFERENCE 0-1000个列表项,详细请参见表5。 时间信息列表。 - 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部服务错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 GET /controller/campus/v3/networkconfig/timetemplate?name=workday template 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
  • 响应示例 返回状态码为200:当前时间段模板。 HTTP/1.1 200 OK Date: Thu,13 Sep 2018 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode": "0", "errmsg": "", "data": [{ "id": "fbde1c5d-5b94-49e3-a912-48641015e45c", "templateName": "08:00 A.M. to 18:00 P.M.", "dayContentDtoList": [{ "switchDay": 1, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 2, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 3, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 4, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 5, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 6, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 7, "startTime": "08:00", "endTime": "18:00", "onOff": true }] }, { "id": "2c3918cb-f0bd-44e3-963b-119870bfc779", "templateName": "Workdays 08:00 to 18:00", "dayContentDtoList": [{ "switchDay": 1, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 2, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 3, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 4, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 5, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 6, "startTime": "00:00", "endTime": "00:00", "onOff": true }, { "switchDay": 7, "startTime": "00:00", "endTime": "00:00", "onOff": true }] }, { "id": "b8eafae0-d7e8-490a-a28e-c49a628de0d7", "templateName": "Weekday", "dayContentDtoList": [{ "switchDay": 1, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 2, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 3, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 4, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 5, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 6, "startTime": "00:00", "endTime": "00:00", "onOff": true }, { "switchDay": 7, "startTime": "00:00", "endTime": "00:00", "onOff": true }] }, { "id": "e86429a8-7c83-4d50-be7c-82164ab38567", "templateName": "All time", "dayContentDtoList": [{ "switchDay": 1, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 2, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 3, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 4, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 5, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 6, "startTime": "00:00", "endTime": "24:00", "onOff": true }, { "switchDay": 7, "startTime": "00:00", "endTime": "24:00", "onOff": true }] }, { "id": "94386ba0-9976-4f92-b699-f3ca00de56e5", "templateName": "tem01", "dayContentDtoList": [{ "switchDay": 1, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 2, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 3, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 4, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 5, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 6, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 7, "startTime": "08:00", "endTime": "18:00", "onOff": true }] }] } 返回状态码为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的示例 PUT /controller/campus/v3/networkconfig/timetemplate HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN:CA48D152F6B19D84:637C38259E6974E17788348128A430FEE150E874752CE754B6BF855281219925 { "id": "94386ba0-9976-4f92-b699-f3ca00de56e5", "templateName": "tem01", "dayContentDtoList": [{ "switchDay": 1, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 2, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 3, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 4, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 5, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 6, "startTime": "09:00", "endTime": "17:00", "onOff": true }, { "switchDay": 7, "startTime": "08:00", "endTime": "18:00", "onOff": true }] }
  • 响应示例 返回状态码为200:修改时间段模板结果。 HTTP/1.1 200 OK Date: Thu,13 Sep 2018 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode": "0", "errmsg": "", "data": { "id": "94386ba0-9976-4f92-b699-f3ca00de56e5", "templateName": "tem01", "dayContentDtoList": [{ "switchDay": 1, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 2, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 3, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 4, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 5, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 6, "startTime": "09:00", "endTime": "17:00", "onOff": true }, { "switchDay": 7, "startTime": "08:00", "endTime": "18:00", "onOff": true }] } } 返回状态码为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
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 modifyDto 是 REFERENCE 详细请参见表2。 修改时间段模板入参。 - 表2 TimeTemplateDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 templateName 是 string 1~32个字符。 - 模板名称。 "eee" dayContentDtoList 是 ARRAY_REFERENCE 7个列表项,详细请参见表3。 时间段列表,列表必须分别为周一至周日7天时间段数据。 - id 是 string 36个字符。 - 模板标识,UUID格式。 "d8b568f4-9918-4c09-a49f-c35e3bf7086b"
  • 响应示例 返回状态码为201:新增时间段模板结果。 HTTP/1.1 201 Created Date: Thu,13 Sep 2018 10:00:00 GMT Server: example-server Content-Type: application/json { "errcode": "0", "errmsg": "", "data": { "id": "94386ba0-9976-4f92-b699-f3ca00de56e5", "templateName": "tem01", "dayContentDtoList": [{ "switchDay": 1, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 2, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 3, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 4, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 5, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 6, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 7, "startTime": "08:00", "endTime": "18:00", "onOff": true }] } } 返回状态码为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
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 timeTemplate 是 REFERENCE 详细请参见表2。 增加时间段模板入参。 - 表2 AddTemplateDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 templateName 是 string 1~32个字符。 - 模板名称。 "eee" dayContentDtoList 是 ARRAY_REFERENCE 7个列表项,详细请参见表3。 时间段列表,列表必须分别为周一至周日7天时间段数据。 - 表3 DayContentDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 switchDay 是 int32 - - 日期选择。1代表周一,2代表周二,3代表周三,4代表周四,5代表周五,6代表周六,7代表周日。 1 startTime 是 string 1~16个字符。 - 开始时间,HH:MM格式(MM只支持:00,15,30,45)。 "01:00" endTime 是 string 1~16个字符。 - 结束时间,HH:MM格式(MM只支持:00,15,30,45)。 "18:00" onOff 是 boolean true false - startTime至endTime时间段是启用或禁止。 true
  • 响应参数 返回状态码为201:新增时间段模板结果。 表4 TemplateResultDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息。 - data REFERENCE 详细请参见表5。 - - 表5 TimeTemplateDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 templateName string 1~32个字符。 - 模板名称。 "eee" dayContentDtoList ARRAY_REFERENCE 7个列表项,详细请参见表6。 时间段列表,列表必须分别为周一至周日7天时间段数据。 - id string 36个字符。 - 模板标识,UUID格式。 "d8b568f4-9918-4c09-a49f-c35e3bf7086b" 表6 DayContentDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 switchDay int32 - - 日期选择。1代表周一,2代表周二,3代表周三,4代表周四,5代表周五,6代表周六,7代表周日。 1 startTime string 1~16个字符。 - 开始时间,HH:MM格式(MM只支持:00,15,30,45)。 "01:00" endTime string 1~16个字符。 - 结束时间,HH:MM格式(MM只支持:00,15,30,45)。 "18:00" onOff boolean true false - startTime至endTime时间段是启用或禁止。 true 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部服务错误。 详细信息请参见实际响应消息体。
  • 请求示例 HTTP的示例 POST /controller/campus/v3/networkconfig/timetemplate HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN:CA48D152F6B19D84:637C38259E6974E17788348128A430FEE150E874752CE754B6BF855281219925 { "templateName": "tem01", "dayContentDtoList": [{ "switchDay": 1, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 2, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 3, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 4, "startTime": "08:30", "endTime": "20:30", "onOff": true }, { "switchDay": 5, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 6, "startTime": "08:00", "endTime": "18:00", "onOff": true }, { "switchDay": 7, "startTime": "08:00", "endTime": "18:00", "onOff": true }] }