Alfresco API

POST /nodes/{nodeId}/copy

基本信息

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

nodes nodeId复制到父文件夹nodes targetParentId。 您可以在请求正文中指定targetParentId

除非您在请求正文中指定新名称(name),否则新nodes与源nodes的名称相同。

如果源nodeId是文件夹,则还将复制其所有子nodes

如果源nodeId是文件,则将复制其属性,方面和标签,而不会复制其评级,注释和锁定。

请求方式 :POST

请求API:/ nodes / {nodeId} / copy

响应等级(状态201)

成功回应

{
  "entry": {
    "id": "string",
    "name": "string",
    "nodeType": "string",
    "isFolder": true,
    "isFile": true,
    "isLocked": false,
    "modifiedAt": "2021-01-08T08:52:11.410Z",
    "modifiedByUser": {
      "displayName": "string",
      "id": "string"
    },
    "createdAt": "2021-01-08T08:52:11.410Z",
    "createdByUser": {
      "displayName": "string",
      "id": "string"
    },
    "parentId": "string",
    "isLink": true,
    "isFavorite": true,
    "content": {
      "mimeType": "string",
      "mimeTypeName": "string",
      "sizeInBytes": 0,
      "encoding": "string"
    },
    "aspectNames": [
      "string"
    ],
    "properties": {},
    "allowableOperations": [
      "string"
    ],
    "path": {
      "elements": [
        {
          "id": "string",
          "name": "string",
          "nodeType": "string",
          "aspectNames": [
            "string"
          ]
        }
      ],
      "name": "string",
      "isComplete": true
    },
    "permissions": {
      "isInheritanceEnabled": true,
      "inherited": [
        {
          "authorityId": "string",
          "name": "string",
          "accessStatus": "ALLOWED"
        }
      ],
      "locallySet": [
        {
          "authorityId": "string",
          "name": "string",
          "accessStatus": "ALLOWED"
        }
      ],
      "settable": [
        "string"
      ]
    }
  }
}

响应内容类型 applicaiton/json

Query参数

名称 类型 是否必填 示例值 描述
include Array[string]   返回有关该nodes的其他信息。 可以请求以下可选字段:allowableOperations;association;isLink;isFavorite;isLocked;path;permissions
fields Array[string]   field名称的list。 例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。
例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。 该列表适用于返回的单个实体或集合中的条目。
如果API方法也支持include参数,则除了在fields参数中指定的fields外,还返回include参数中指定的fields。

Path参数

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

Body参数(nodeBodyCopy

request body示例

{
  "targetParentId": "string",
  "name": "string"
}

错误信息描述

状态码 原因
400 无效的参数:nodeId无效,或者nodeBodyCopy无效
401 验证失败
403 当前用户无权复制nodeId
404 nodeId不存在
409 新名称与目标父文件夹中的现有nodes冲突
422 模型完整性异常,包括文件名包含无效字符
default 意外错误

返回结果示例

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