POST /nodes/{nodeId}/secondary-children
基本信息
Note: 该端点在Alfresco 5.2和更高版本中可用。
在父nodeId和子nodes之间创建具有给定关联类型的辅助子关联。
Note:您可以通过在JSON主体中指定关联列表来创建多个二级子关联,如下所示:
[ { "childId": "string", "assocType": "string" }, { "childId": "string", "assocType": "string" } ]
如果将列表指定为输入,则在响应正文中返回分页列表而不是条目。 例如:
{ "list": { "pagination": { "count": 2, "hasMoreItems": false, "totalItems": 2, "skipCount": 0, "maxItems": 100 }, "entries": [ { "entry": { ... } }, { "entry": { ... } } ] } }
请求方式 :POST
请求API:/ nodes / {nodeId} / secondary-children
响应等级(状态201)
成功回应
{ "entry": { "childId": "string", "assocType": "string" } }
响应内容类型 applicaiton/json
Query参数
名称 | 类型 | 是否必填 | 示例值 | 描述 |
fields | Array[string] | 否 | field名称的list。 例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。 例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。 该列表适用于返回的单个实体或集合中的条目。 如果API方法也支持include参数,则除了在fields参数中指定的fields外,还返回include参数中指定的fields。 |
Path参数
名称 | 类型 | 是否必填 | 示例值 | 描述 |
nodeId | string | 是 | 父nodes的标识符。 |
Body参数(secondaryChildAssociationBodyCreate)
request body示例
{ "childId": "string", "assocType": "string" }
错误信息描述
状态码 | 原因 |
400 | 无效的参数:assocType未知,或者nodeId无效,或者secondaryChildAssociationBodyCreate无效 |
401 | 验证失败 |
403 | 当前用户无权创建nodeId的辅助子级 |
404 | 父nodes或子childId不存在 |
409 | 这两个nodes之间已经存在此assoc类型的关联 |
422 | 模型完整性异常 |
default | 意外错误 |
返回结果示例
{ "error": { "errorKey": "string", "statusCode": 0, "briefSummary": "string", "stackTrace": "string", "descriptionURL": "string", "logId": "string" } }