LdapService
更新时间: 2026/06/26
在Gitcode上查看源码

ResourceDefinition

uris

  • /redfish/v1/AccountService/LdapService

properties

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-Ldap资源模型的OData描述信息
@odata.idstringtrue-Ldap资源节点的访问路径
@odata.typestringtrue-Ldap资源类型
Idstringtrue-Ldap资源的ID
Namestringtrue-Ldap资源的名称
LdapServiceEnabledbooleanfalsetrue,falseLdap功能使能
LdapControllersobjecttrue-域控制器集合:
@odata.id:域控制器集合路径

supported_methods

  • GET
  • PATCH

HTTP methods

GET

命令功能

查询Ldap服务资源

说明

命令格式

URL: https://device_ip/redfish/v1/AccountService/LdapService

请求头:


X-Auth-Token: 123456789***********************

请求消息体: 无

参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
auth_value执行该GET请求时,必须在"Headers"中携带"X-Auth-Token"值用于鉴权可通过/redfish/v1/SessionService/Sessions创建会话时获得

使用指南

使用实例

请求样例:

http
GET https://device_ip/redfish/v1/AccountService/LdapService

请求头:


X-Auth-Token: 123456789***********************

请求消息体:无

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#HwLdapService.HwLdapService",
  "@odata.id": "/redfish/v1/AccountService/LdapService",
  "@odata.type": "#HwLdapService.v1_0_0.HwLdapService",
  "Id": "LdapService",
  "Name": "Ldap Service",
  "LdapServiceEnabled": false,
  "LdapControllers": {
    "@odata.id": "/redfish/v1/AccountService/LdapService/LdapControllers"
  }
}

响应码:200

PATCH

命令功能

修改Ldap功能开启使能

说明

命令格式

URL: https://device_ip/redfish/v1/AccountService/LdapService

请求头:


X-Auth-Token: 123456789***********************
Content-Type: header_type
If-Match: ifmatch_value

请求消息体:

json
{
  "LdapServiceEnabled": enabled
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
enabledLdap功能是否开启,控制所有域控制器的使能true为打开,false为关闭

使用指南

使用实例

请求样例:

http
PATCH https://device_ip/redfish/v1/AccountService/LdapService

请求头:


X-Auth-Token: 123456789***********************
Content-Type: application/json
If-Match: W/"bc428df5"

请求消息体:

json
{
  "LdapServiceEnabled": false
}

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#HwLdapService.HwLdapService",
  "@odata.id": "/redfish/v1/AccountService/LdapService",
  "@odata.type": "#HwLdapService.v1_0_0.HwLdapService",
  "Id": "LdapService",
  "Name": "Ldap Service",
  "LdapServiceEnabled": false,
  "LdapControllers": {
    "@odata.id": "/redfish/v1/AccountService/LdapService/LdapControllers"
  }
}

响应码:200