Alfresco API

PUT /people/{personId}

基本信息

Note: 该端点在Alfresco 5.2和更高版本中可用。

更新给定people的详细信息。

您可以使用-me-字符串代替<personid>来代表当前通过身份验证的用户。

如果适用,还可以选择禁用或重新启用给定people的登录访问权限。

除了更新您自己的详细信息,您必须具有管理员权限才能更新people信息。

如果您以非管理员用户的身份更改密码,则还必须提供现有密码(除了新密码外,还使用oldPassword字段)。

通过将enabled设置为false不能禁用管理员用户。

非管理员用户不得禁用自己账户。

您可以在更新people时设置自定义属性:

{
  "firstName": "Alice",
  "properties":
  {
    "my:property": "The value"
  }
}

Note: 不支持设置类型d:content和d:category的属性。

请求方式:PUT

请求API :/ people / {personId}

响应等级(状态200)

成功回应

{
  "entry": {
    "id": "string",
    "firstName": "string",
    "lastName": "string",
    "description": "string",
    "avatarId": "string",
    "email": "string",
    "skypeId": "string",
    "googleId": "string",
    "instantMessageId": "string",
    "jobTitle": "string",
    "location": "string",
    "company": {
      "organization": "string",
      "address1": "string",
      "address2": "string",
      "address3": "string",
      "postcode": "string",
      "telephone": "string",
      "fax": "string",
      "email": "string"
    },
    "mobile": "string",
    "telephone": "string",
    "statusUpdatedAt": "2021-01-08T08:52:11.529Z",
    "userStatus": "string",
    "enabled": true,
    "emailNotificationsEnabled": true,
    "aspectNames": [
      "string"
    ],
    "properties": {},
    "capabilities": {}
  }
}

响应内容类型 applicaiton/json

Query参数

名称 类型 是否必填 示例值 描述
fields Array[string]   field名称的list。 例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。
例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。 该列表适用于返回的单个实体或集合中的条目。
如果API方法也支持include参数,则除了在fields参数中指定的fields外,还返回include参数中指定的fields。

Path参数

名称 类型 是否必填 示例值 描述
personId string   people的标识符。

Body参数(personBodyUpdate

request body示例

{
  "firstName": "string",
  "lastName": "string",
  "description": "string",
  "email": "string",
  "skypeId": "string",
  "googleId": "string",
  "instantMessageId": "string",
  "jobTitle": "string",
  "location": "string",
  "company": {
    "organization": "string",
    "address1": "string",
    "address2": "string",
    "address3": "string",
    "postcode": "string",
    "telephone": "string",
    "fax": "string",
    "email": "string"
  },
  "mobile": "string",
  "telephone": "string",
  "userStatus": "string",
  "enabled": true,
  "emailNotificationsEnabled": true,
  "password": "string",
  "oldPassword": "string",
  "aspectNames": [
    "string"
  ],
  "properties": {}
}

错误信息描述

状态码 原因
400 参数无效:更新请求无效或personId格式无效或personBodyUpdate无效
401 验证失败
403 当前用户无权更新people
404 personId不存在
422 模型完整性异常
default 意外错误

返回结果示例

{
  "error": {
    "errorKey": "string",
    "statusCode": 0,
    "briefSummary": "string",
    "stackTrace": "string",
    "descriptionURL": "string",
    "logId": "string"
  }
}