GET /nodes/{nodeId}/children
基本信息
Note: 该端点在Alfresco 5.2和更高版本中可用。
获取父nodes nodeId的子级列表。
默认情况下,返回每个最少信息的子nodes。
您可以使用include参数返回其他信息。
如果有子nodes列表包括主要子级和次要子级。
您可以使用include参数(include = association)返回每个子项的子项关联详细信息,包括assocType和isPrimary标志。
返回列表的默认排序顺序是文件夹在文件之前按名称升序排序。
您可以使用orderBy覆盖默认值,以指定一个或多个字段进行排序。 默认顺序始终是升序,但是您可以使用可选的ASC或DESC修饰符来指定升序或降序排序。
例如,指定orderBy = name DESC
将以名称(name)降序返回混合的文件夹/文件列表。
您可以使用以下任何字段来排序结果:
- isFolder
- name
- mimeType
- nodeType
- sizeInBytes
- modifiedAt
- createdAt
- modifiedByUser
- createdByUser
请求方式:GET
请求API: / nodes / {nodeId} / children
响应等级(状态200)
成功回应
{ "list": { "pagination": { "count": 0, "hasMoreItems": true, "totalItems": 0, "skipCount": 0, "maxItems": 0 }, "entries": [ { "entry": { "id": "string", "name": "string", "nodeType": "string", "isFolder": true, "isFile": true, "isLocked": false, "modifiedAt": "2021-01-08T08:52:11.371Z", "modifiedByUser": { "displayName": "string", "id": "string" }, "createdAt": "2021-01-08T08:52:11.371Z", "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" ] }, "association": { "assocType": "string", "isPrimary": true } } } ], "source": { "id": "string", "name": "string", "nodeType": "string", "isFolder": true, "isFile": true, "isLocked": false, "modifiedAt": "2021-01-08T08:52:11.371Z", "modifiedByUser": { "displayName": "string", "id": "string" }, "createdAt": "2021-01-08T08:52:11.371Z", "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参数
名称 | 类型 | 是否必填 | 示例值 | 描述 |
skipCount | integer | 否 | 0 | 在list中跳过指定数量的数据。 如果未提供,则默认值为0。 |
maxItems | integer | 否 | 100 | list中要返回的最大项目数。 如果未提供,则默认值为100。 |
orderBy | Array[string] | 否 | 一个字符串,用于控制列表中返回的实体的顺序。 您可以使用orderBy参数按一个或多个字段对列表进行排序。 每个字段都有一个默认的排序顺序,通常是升序。 阅读上面的API方法实现说明,以检查此方法中使用的任何字段的默认搜索顺序是否为降序。 要按特定顺序对实体进行排序,可以对任何字段使用ASC和DESC关键字。 |
|
where | string | 否 | 可以选择过滤列表。 示例:where=(isFolder=true) where=(isFile=true) where=(nodeType='my:specialNodeType') where=(nodeType='my:specialNodeType INCLUDESUBTYPES') where=(isPrimary=true) where=(assocType='my:specialAssocType') where=(isPrimary=false and assocType='my:specialAssocType') |
|
include | Array[string] | 否 | 返回有关该nodes的其他信息。 可以请求以下可选字段:allowableOperations;association;isLink;isFavorite;isLocked;path;permissions | |
relativePath | string | 否 | 返回有关此路径解析的文件夹中的子项的信息。 路径是相对于nodeId的。 | |
includeSource | boolean | 否 | 除了在父nodes上具有文件夹信息的条目(entries)之外,还包括source(指定的父nodeId或由relativePath解析的条目)。 | |
fields | Array[string] | 否 | field名称的list。 例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。 例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。 该列表适用于返回的单个实体或集合中的条目。 如果API方法也支持include参数,则除了在fields参数中指定的fields外,还返回include参数中指定的fields。 |
Path参数
名称 | 类型 | 是否必填 | 示例值 | 描述 |
nodeId | string | 是 | nodes的标识符。 您也可以使用以下知名别名之一: -my--shared- -root- |
错误信息描述
状态码 | 原因 |
400 | 无效的参数:nodeId不是有效的格式,nodeId不是文件夹或orderBy无效 |
401 | 验证失败 |
403 | 当前用户无权检索nodeId的子级 |
404 | nodeId不存在 |
default | 意外错误 |
返回结果示例
{ "error": { "errorKey": "string", "statusCode": 0, "briefSummary": "string", "stackTrace": "string", "descriptionURL": "string", "logId": "string" } }