云服务器内容精选

  • 响应示例 HTTP/1.1 200 OK Server: product only Date: Tue, 19 Nov 2019 21:47:16 GMT Content-Type: application/yang.data+json Content-Length: 77 Connection: keep-alive Keep-Alive: timeout=60 X-Frame-Options: DENY Strict-Transport-Security: max-age=31536000;incodeSubDomains Cache-Control: no-cache, no-store, must-revalidate X-Content-Type-Options: nosniff Pragma: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT X-XSS-Protection: 1; mode=block {"device-shell-group-northbound:device-group":[{"device-group-name":"cccc"}]}
  • 响应参数 返回状态码为200:查询成功 表2 body对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 device-shell-group-northbound:device-group list 详细信息请参见表 device-shell-group-northbound:device-group对象的参数列表 - 表3 device-shell-group-northbound:device-group对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 device-group-name string 1-128个字符 - - device-child-group-names list 详细信息请参见表 device-child-group-names对象的参数列表 如果设备组不存在子设备则不显示。 device-ids list 详细信息请参见表 device-ids对象的参数列表 如果设备组不存在设备则不显示。 表4 device-child-group-names对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 device-child-group-name string 1-128个字符 - 子设备组名,包括数字,字母,特殊字符-_@的一种或组合,且不能以数字开头。 表5 device-ids对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 device-id string 1-128个字符 - 设备ID。 返回状态码为40X:参数不正确。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。 表6 错误码描述 Status Code Error Code Error Message Parameter 错误说明 400 0x006e004b 解析请求体发生错误。 错误的参数字段。 请求体body存在错误。 409 0x00c80014 设备组{0}不存在。 {0}:设备组名。 查询的设备组不存在。 500 0x00c80006 操作数据库异常。 - 系统内部错误,操作数据库存在异常。
  • 请求示例 cURL示例 curl -k -s -L -i -X GET \ https://{ip:port}/restconf/data/device-shell-group-northbound:device-shell-group/device-group/cccc \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'x-access-token: x-ntc9c745ryk9uohj7vpint3wsanwo9nvnuur4bg5ir08bt3woavsjvc46rurrx9djzfy84k8c988qqnw04ldjw5hlfuq6q5iqpsbqkvwc82rvx0bvxnsgbhg5doa7wg9' HTTP示例 GET /restconf/data/device-shell-group-northbound:device-shell-group/device-group/cccc HTTP/1.1 Host: {ip:port} Content-Type: application/json x-access-token: x-ntc9c745ryk9uohj7vpint3wsanwo9nvnuur4bg5ir08bt3woavsjvc46rurrx9djzfy84k8c988qqnw04ldjw5hlfuq6q5iqpsbqkvwc82rvx0bvxnsgbhg5doa7wg9 Cache-Control: no-cache
  • 响应示例 HTTP/1.1 204 No Content Server: product only Date: Tue, 19 Nov 2019 21:49:46 GMT Connection: keep-alive Keep-Alive: timeout=60 X-Frame-Options: DENY Strict-Transport-Security: max-age=31536000;incodeSubDomains Cache-Control: no-cache, no-store, must-revalidate X-Content-Type-Options: nosniff Pragma: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT X-XSS-Protection: 1; mode=block
  • 请求参数 表1 url参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 device-group-name 是 string 1-128个字符 - 环境中存在的一个设备组名,包括数字,字母,特殊字符-_@的一种或组合,且不能以数字开头。 表2 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 device-group-name 是 string 1-128个字符 必须与表 url参数列表中参数device-group-name一致,包括数字,字母,特殊字符-_@的一种或组合,且不能以数字开头。 device-ids 是 list 详细信息请参见表 device-ids对象的参数列表 - 表3 device-ids对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 device-id 是 string 1-128个字符 - 设备ID。
  • 请求示例 cURL示例 curl -k -s -L -i -X PUT \ https://{ip:port}/restconf/data/device-shell-group-northbound:device-shell-group/device-group/cccc \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'x-access-token: x-ntc9c745ryk9uohj7vpint3wsanwo9nvnuur4bg5ir08bt3woavsjvc46rurrx9djzfy84k8c988qqnw04ldjw5hlfuq6q5iqpsbqkvwc82rvx0bvxnsgbhg5doa7wg9' \ -d '{ "device-group": { "device-group-name": "cccc", "device-ids": [{ "device-id": "8d394835-cb84-38f3-a4d5-16a7f2074b40" }] } }' HTTP示例 PUT /restconf/data/device-shell-group-northbound:device-shell-group/device-group/cccc HTTP/1.1 Host: {ip:port} Content-Type: application/json x-access-token: x-ntc9c745ryk9uohj7vpint3wsanwo9nvnuur4bg5ir08bt3woavsjvc46rurrx9djzfy84k8c988qqnw04ldjw5hlfuq6q5iqpsbqkvwc82rvx0bvxnsgbhg5doa7wg9 Cache-Control: no-cache body: { "device-group": { "device-group-name": "cccc", "device-ids": [{ "device-id": "8d394835-cb84-38f3-a4d5-16a7f2074b40" }] } }
  • 响应参数 返回状态码为204:新增成功。 返回状态码为40X:参数不正确。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。 表4 错误码描述 Status Code Error Code Error Message Parameter 错误说明 400 0x006e004b 解析请求体发生错误。 错误的参数字段。 请求体body存在错误。 500 0x00c80014 数据不存在。 - 增加的设备不存在。 500 0x00c80006 操作数据库异常。 - 系统内部错误,操作数据库存在异常。
  • 响应示例 HTTP/1.1 204 No Content Server: product only Date: Tue, 19 Nov 2019 21:38:43 GMT Connection: keep-alive Keep-Alive: timeout=60 X-Frame-Options: DENY Strict-Transport-Security: max-age=31536000;incodeSubDomains Cache-Control: no-cache, no-store, must-revalidate X-Content-Type-Options: nosniff Pragma: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT X-XSS-Protection: 1; mode=block
  • 响应参数 返回状态码为204:删除成功。 返回状态码为40X:参数不正确。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。 表2 错误码描述 Status Code Error Code Error Message Parameter 错误说明 400 0x006e004b 解析请求体发生错误。 错误的参数字段。 请求体body存在错误。 409 0x00c80014 设备组{0}不存在。 {0}:设备组名。 删除的设备组不存在。 500 0x00c80006 操作数据库异常。 - 系统内部错误,操作数据库存在异常。
  • 请求示例 cURL示例 curl -k -s -L -i -X DELETE \ https://{ip:port}/restconf/data/device-shell-group-northbound:device-shell-group/device-group/cccc2 \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'x-access-token: x-ntc9c745ryk9uohj7vpint3wsanwo9nvnuur4bg5ir08bt3woavsjvc46rurrx9djzfy84k8c988qqnw04ldjw5hlfuq6q5iqpsbqkvwc82rvx0bvxnsgbhg5doa7wg9' HTTP示例 DELETE /restconf/data/device-shell-group-northbound:device-shell-group/device-group/cccc2 HTTP/1.1 Host: {ip:port} Content-Type: application/json x-access-token: x-ntc9c745ryk9uohj7vpint3wsanwo9nvnuur4bg5ir08bt3woavsjvc46rurrx9djzfy84k8c988qqnw04ldjw5hlfuq6q5iqpsbqkvwc82rvx0bvxnsgbhg5doa7wg9 Cache-Control: no-cache
  • 请求示例 cURL示例 curl -k -s -L -i -X POST \ https://{ip:port}/restconf/data/device-shell-group-northbound:device-shell-group \ -H 'content-type: application/json' \ -H 'x-access-token: x-s9hgo7eneoqr5isarujwel9ivt5j46uo9dldhg1guo0a44amgafx1fmq88mm2qo5o7g65g1i3yuk5galddip5js785aqrs4ao8ak46mq4488c86k85bt6nrwph9dnsrw' \ -d '{ "device-shell-group-northbound:device-group": [{ "device-group-name":"cccc2" }] }' HTTP示例 POST /restconf/data/device-shell-group-northbound:device-shell-group HTTP/1.1 Host: {ip:port} Content-Type: application/json x-access-token: x-s9hgo7eneoqr5isarujwel9ivt5j46uo9dldhg1guo0a44amgafx1fmq88mm2qo5o7g65g1i3yuk5galddip5js785aqrs4ao8ak46mq4488c86k85bt6nrwph9dnsrw Cache-Control: no-cache body: { "device-shell-group-northbound:device-group": [{ "device-group-name":"cccc2" }] }
  • 响应参数 返回状态码为201:创建成功。 返回状态码为40X:参数不正确。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。 表4 错误码描述 Status Code Error Code Error Message Parameter 错误说明 400 0x006e004b 解析请求体发生错误。 错误的参数字段。 请求体body存在错误。 409 0x00c80005 设备组{0}已经存在。 {0}:设备组名称。 新创建的设备组名已存在。 500 0x00c80006 操作数据库异常。 - 系统内部错误,数据库存在异常。
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 device-shell-group-northbound:device-group 是 list 详细信息请参见表 device-shell-group-northbound:device-group对象的参数列表 提交修改参数。 表2 device-shell-group-northbound:device-group对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 device-group-name 是 string 1-128个字符 - 设备组名,包括数字,字母,特殊字符-_@的一种或组合,且不能以数字开头。 device-ids 否 list 详细信息请参见表 device-ids对象的参数列表 设备ID。 表3 device-ids对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 device-id 是 string 1-128个字符 - 设备ID。
  • 响应示例 HTTP/1.1 201 Created Server: product only Date: Tue, 19 Nov 2019 21:20:23 GMT Content-Type: application/octet-stream Content-Length: 0 Connection: keep-alive Keep-Alive: timeout=60 X-Frame-Options: DENY Strict-Transport-Security: max-age=31536000;incodeSubDomains Cache-Control: no-cache, no-store, must-revalidate X-Content-Type-Options: nosniff Pragma: no-cache Expires: Thu, 01 Jan 1970 00:00:00 GMT X-XSS-Protection: 1; mode=block
  • 响应示例 返回状态码为200:查询认证设备组成功,响应体参考DevGroupQueryOutputApiDto。 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" : [ { "id" : "2be5a878-b311-4e85-8ae2-560f5fddd966", "bsid" : "0000", "name" : "devgroup", "description" : "this is devgroup", "parentId" : "2be5a878-b311-4e85-8ae2-560f5fddd966", "fullName" : "ROOT/sub", "orderId" : 0, "hasPermission" : false, "childList" : [ { "id" : "2be5a878-b311-4e85-8ae2-560f5fddd966", "bsid" : "0000", "name" : "devgroup", "description" : "this is devgroup", "parentId" : "2be5a878-b311-4e85-8ae2-560f5fddd966", "fullName" : "ROOT/sub", "orderId" : 0, "hasPermission" : false, "childList" : [ { ... } ] } ] } ] }