-
响应参数 返回状态码为200:查询成功,响应体参考QueryEffectiveTimesResponse。 表2 QueryEffectiveTimesResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" totalRecords int32 - - 总的数据条数。 1 pageSize int32 - - 每页显示数量。 10 pageIndex int32 - - 当前页数。 1 data ARRAY_REFERENCE 0-1000个列表项,详细请参见表5。 时效模板信息。 - 返回状态码为400:请求参数错误,无响应体。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误,无响应体。 详细信息请参见实际响应消息体。
-
URI /controller/campus/v1/sdwan/policy/traffic/effective-times 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 pageIndex 否 int32 [0-65535] 0 当前页数,默认是0,当0时表示查询所有页。 - pageSize 否 int32 [0-65535] 20 每页显示数量,默认是20,当为空或者0时,表示不使用。 - sort 否 string 0~255个字符。 - 排序字段。当前仅支持按name排序,"name"表示升序,"-name"表示降序,默认升序。 - id 否 uuid - - 时效模板ID。 - keyword 否 string 0~64个字符。 - 模板名关键字,如果为空查询所有的模板,支持模糊查询。 "time template"
-
响应示例 返回状态码为200:查询成功,响应体参考QueryEffectiveTimesResponse。 HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0",
"errmsg" : "",
"totalRecords" : 1,
"pageSize" : 10,
"pageIndex" : 1,
"data" : [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
]
} 返回状态码为400:请求参数错误,无响应体。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 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,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
请求示例 HTTP的示例 GET /controller/campus/v1/sdwan/policy/traffic/effective-times?keyword=time 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
-
请求示例 HTTP的示例 PUT /controller/campus/v1/sdwan/policy/traffic/effective-times 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
{
"effectiveTimes" : [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
]
}
-
响应示例 返回状态码为200:修改成功,响应体参考EffectiveTimeResponse。 HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0",
"errmsg" : "",
"success" : [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
],
"fail" : [
{
"errcode" : "0x00c8000c",
"errmsg" : "The parameter is invalid.",
"data" : {
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
}
]
} 返回状态码为400:请求参数错误,无响应体。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 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,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
-
响应示例 返回状态码为201:创建成功,响应体参考EffectiveTimeResponse。 HTTP/1.1 201 Created
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0",
"errmsg" : "",
"success" : [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
],
"fail" : [
{
"errcode" : "0x00c8000c",
"errmsg" : "The parameter is invalid.",
"data" : {
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
}
]
} 返回状态码为400:请求参数错误,无响应体。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 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,11 May 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/sdwan/policy/traffic/effective-times 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
{
"effectiveTimes" : [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
]
}
-
响应参数 返回状态码为201:创建成功,响应体参考EffectiveTimeResponse。 表4 EffectiveTimeResponse对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息。 "" success ARRAY_REFERENCE 0-1000个列表项,详细请参见表5。 成功的时效模板信息列表。 - fail ARRAY_REFERENCE 0-1000个列表项,详细请参见表6。 失败的时效模板信息列表。 - 表5 EffectiveTimeInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id uuid - - 模板ID,修改或删除的时候必填。 "00000000-0000-0000-0000-000000000000" name string 0~64个字符。 - 模板名称,创建的时候必填。 "templateName" type string 5~6个字符。 - 时间类型,该字段可以设置为以下几种: a) Daily:每日 b) Weekly:每周 c) During:固定时间 创建的时候必填。 "Weekly" weeklyDay string 0~7个字符。 - 当type为Weekly类型时才存在,表示每周几生效,多选。 左起第1位为1代表周一,第2位为1代表周二,第3位为1代表周三,第4位为1代表周四,第5位为1代表周五,第6位为1代表周六,第7位为1代表周日。 "1111100" startTime string 0~64个字符。 - 开始时间,为UTC时间。 type为Daily和Weekly的时候为hh:mm:ssZ格式; type为During的时候为YYYY-MM-DDThh:mm:ssZ格式。 创建的时候必填。 "00:00:00Z" endTime string 0~64个字符。 - 结束时间,为UTC时间。 type为Daily和Weekly的时候为hh:mm:ssZ格式; type为During的时候为YYYY-MM-DDThh:mm:ssZ格式。 创建的时候必填。 "23:01:40Z" 表6 FailEffectiveTimeInfo对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0x00c8000c" errmsg string - - 错误信息。 "The parameter is invalid." data REFERENCE 详细请参见表5。 - - 返回状态码为400:请求参数错误,无响应体。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误,无响应体。 详细信息请参见实际响应消息体。
-
请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 classificationProfiles 是 REFERENCE 详细请参见表2。 创建时效模板请求数据。 - 表2 EffectiveTimeInfos对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 effectiveTimes 否 ARRAY_REFERENCE 0-1000个列表项,详细请参见表3。 - - 表3 EffectiveTimeInfo对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 uuid - - 模板ID,修改或删除的时候必填。 "00000000-0000-0000-0000-000000000000" name 否 string 0~64个字符。 - 模板名称,创建的时候必填。 "templateName" type 否 string 5~6个字符。 - 时间类型,该字段可以设置为以下几种: a) Daily:每日 b) Weekly:每周 c) During:固定时间 创建的时候必填。 "Weekly" weeklyDay 否 string 0~7个字符。 - 当type为Weekly类型时才存在,表示每周几生效,多选。 左起第1位为1代表周一,第2位为1代表周二,第3位为1代表周三,第4位为1代表周四,第5位为1代表周五,第6位为1代表周六,第7位为1代表周日。 "1111100" startTime 否 string 0~64个字符。 - 开始时间,为UTC时间。 type为Daily和Weekly的时候为hh:mm:ssZ格式; type为During的时候为YYYY-MM-DDThh:mm:ssZ格式。 创建的时候必填。 "00:00:00Z" endTime 否 string 0~64个字符。 - 结束时间,为UTC时间。 type为Daily和Weekly的时候为hh:mm:ssZ格式; type为During的时候为YYYY-MM-DDThh:mm:ssZ格式。 创建的时候必填。 "23:01:40Z"
-
响应示例 返回状态码为200:删除成功,响应体参考EffectiveTimeResponse。 HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0",
"errmsg" : "",
"success" : [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
],
"fail" : [
{
"errcode" : "0x00c8000c",
"errmsg" : "The parameter is invalid.",
"data" : {
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
}
]
} 返回状态码为204:执行成功,无响应体。 HTTP/1.1 204 No Content
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
返回状态码为400:请求参数错误,无响应体。 HTTP/1.1 400 Bad Request
Date: Sun,11 May 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,11 May 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/sdwan/policy/traffic/effective-times/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
{
"effectiveTimes" : [
{
"id" : "00000000-0000-0000-0000-000000000000",
"name" : "templateName",
"type" : "Weekly",
"weeklyDay" : "1111100",
"startTime" : "00:00:00Z",
"endTime" : "23:01:40Z"
}
]
}