创建域
典型场景
创建域。
接口功能
创建域。
接口约束
1、该接口仅支持租户视图或msp代维视图下,角色为“Open Api Operator”的用户访问,必须在用户会话建立后使用。
2、依赖认证方案,需要先创建认证方案。
3、FW网关设备不支持。
调用方法
POST
URI
/controller/campus/v1/sdwan/aaa/domain
请求参数
参数名称 |
必选 |
类型 |
参数值域 |
默认值 |
参数说明 |
参数示例 |
---|---|---|---|---|---|---|
domain |
是 |
REFERENCE |
详细请参见表2。 |
域信息。 |
- |
参数名称 |
必选 |
类型 |
参数值域 |
默认值 |
参数说明 |
参数示例 |
---|---|---|---|---|---|---|
siteId |
是 |
uuid |
- |
- |
站点ID,UUID格式 |
"00000000-0000-0000-0000-000000000000" |
deviceId |
是 |
uuid |
- |
- |
设备ID,UUID格式 |
"00000000-0000-0000-0000-000000000000" |
domainName |
是 |
string |
1~128个字符。 |
- |
域名称。 创建后不允许修改。 长度范围是1~64,不支持空格、中文字符,且不能包含字符“*” “?” “"”。 其中V600版本设备的域名称不能包含大写字母。 |
"name" |
domainSates |
否 |
REFERENCE |
详细请参见表3。 |
- |
- |
|
authenticationSchemaId |
是 |
uuid |
- |
- |
认证方案ID,UUID格式。 |
"00000000-0000-0000-0000-000000000000" |
tacasServerTemplateId |
否 |
uuid |
- |
- |
HWTACACS服务器模板ID,UUID格式。 |
"00000000-0000-0000-0000-000000000000" |
radiusServerTemplateName |
否 |
string |
0~32个字符。 |
- |
设备RADIUS服务器模板名称。 |
"radius1" |
请求示例
POST /controller/campus/v1/sdwan/aaa/domain 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 { "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "domainName" : "name", "domainSates" : { "state" : true }, "authenticationSchemaId" : "00000000-0000-0000-0000-000000000000", "authorizationSchemaId" : "00000000-0000-0000-0000-000000000000", "tacasServerTemplateId" : "00000000-0000-0000-0000-000000000000", "radiusServerTemplateName" : "radius1" }
响应参数
返回状态码为201:创建成功,响应体参考DomainResponse。
参数名称 |
类型 |
参数值域 |
默认值 |
参数说明 |
参数示例 |
---|---|---|---|---|---|
errcode |
string |
- |
- |
错误码。 |
"0" |
errmsg |
string |
0~255个字符。 |
- |
错误描述。 |
"" |
data |
REFERENCE |
详细请参见表5。 |
- |
- |
参数名称 |
类型 |
参数值域 |
默认值 |
参数说明 |
参数示例 |
---|---|---|---|---|---|
domainId |
uuid |
- |
- |
域ID,UUID格式,主键字段 |
"00000000-0000-0000-0000-000000000000" |
siteId |
uuid |
- |
- |
站点ID,UUID格式 |
"00000000-0000-0000-0000-000000000000" |
deviceId |
uuid |
- |
- |
设备ID,UUID格式 |
"00000000-0000-0000-0000-000000000000" |
domainName |
string |
1~128个字符。 |
- |
域名称。 创建后不允许修改。 |
"name" |
domainSates |
REFERENCE |
详细请参见表6。 |
- |
- |
|
authenticationSchemaId |
uuid |
- |
- |
认证方案ID,UUID格式 |
"00000000-0000-0000-0000-000000000000" |
enableAuthorizationSchema |
boolean |
|
- |
是否使能授权方案。 当为 false 时表示去使能授权方案,为 true 时表示使能授权方案,不填写时表示维持创建时的配置。 |
true |
enableTacasServerTemplate |
boolean |
|
- |
是否使能HWTACACS服务器模板。 当为 false 时表示去使能HWTACACS服务器模板,为 true 时表示使能HWTACACS服务器模板,不填写时表示维持创建时的配置。 |
true |
tacasServerTemplateId |
uuid |
- |
- |
HWTACACS服务器模板ID,UUID格式 |
"00000000-0000-0000-0000-000000000000" |
radiusServerTemplateName |
string |
0~32个字符。 |
- |
设备RADIUS服务器模板名称。 |
"radius1" |
参数名称 |
类型 |
参数值域 |
默认值 |
参数说明 |
参数示例 |
---|---|---|---|---|---|
state |
boolean |
|
true |
使能域,默认为true。 |
true |
返回状态码为400:请求参数错误。
详细信息请参见实际响应消息体。
返回状态码为500:内部异常。
详细信息请参见实际响应消息体。
响应示例
返回状态码为201:创建成功,响应体参考DomainResponse。
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" : "", "data" : { "domainId" : "00000000-0000-0000-0000-000000000000", "siteId" : "00000000-0000-0000-0000-000000000000", "deviceId" : "00000000-0000-0000-0000-000000000000", "domainName" : "name", "domainSates" : { "state" : true }, "authenticationSchemaId" : "00000000-0000-0000-0000-000000000000", "enableAuthorizationSchema" : true, "authorizationSchemaId" : "00000000-0000-0000-0000-000000000000", "enableTacasServerTemplate" : true, "tacasServerTemplateId" : "00000000-0000-0000-0000-000000000000", "radiusServerTemplateName" : "radius1" } }
返回状态码为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