GET /queries/nodes
基本信息
Note: 该端点在Alfresco 5.2和更高版本中可用。
获取与给定搜索条件匹配的nodes列表。
搜索词用于查找与名称,标题,描述,全文内容或标记匹配的nodes。
搜索词:
- 必须至少包含3个字母数字字符
- 允许“引用术语”
- 可以选择使用’*’进行通配符匹配
默认情况下,将搜索文件和文件夹类型,除非提供特定类型作为查询参数。
默认情况下,搜索将跨存储库,除非提供了特定的根nodesID来开始搜索。
您可以使用orderBy参数对结果列表进行排序。 您可以在orderBy参数中指定以下一个或多个字段:
- name
- modifiedAt
- createdAt
请求方式: GET
请求API: / queries / nodes
响应等级(状态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.570Z", "modifiedByUser": { "displayName": "string", "id": "string" }, "createdAt": "2021-01-08T08:52:11.571Z", "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" ] } } } ], "source": { "id": "string", "name": "string", "nodeType": "string", "isFolder": true, "isFile": true, "isLocked": false, "modifiedAt": "2021-01-08T08:52:11.571Z", "modifiedByUser": { "displayName": "string", "id": "string" }, "createdAt": "2021-01-08T08:52:11.571Z", "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参数
名称 | 类型 | 是否必填 | 示例值 | 描述 |
term | string | 是 | 要搜索的字词。 | |
skipCount | integer | 否 | 0 | 在list中跳过指定数量的数据。 如果未提供,则默认值为0。 |
maxItems | integer | 否 | 100 | list中要返回的最大项目数。 如果未提供,则默认值为100。 |
nodeType | string | 否 | 将返回结果限制为仅给定nodes类型及其子类型的结果 | |
include | Array[string] | 否 | 返回有关该nodes的其他信息。 可以请求以下可选字段:allowableOperations;aspectNames;isLink;isFavorite;isLocked;path & properties | |
orderBy | Array[string] | 否 | 控制list中entities退回顺序的string。您可以使用orderBy参数通过一个或多个fields对列表进行排序。每个fields都有一个默认的排序顺序,通常是升序的。阅读API方法实践说明以检查是否所有fields使用这个方法将默认搜索顺序设为降序。要按照特殊顺序对entities进行排序的话,您可以使用ASC和DESC关键字对fields进行排序。 | |
fields | Array[string] | 否 | field名称的list。 例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。 例如,如果您想节省整体带宽,则可以使用此参数来限制响应中返回的field。 该列表适用于返回的单个实体或集合中的条目。 如果API方法也支持include参数,则除了在fields参数中指定的fields外,还返回include参数中指定的fields。 |
错误信息描述
状态码 | 原因 |
400 | 无效的参数:maxItems的值或skipCount无效,或者搜索词太短,或者nodeType未知,或者orderBy无效 |
401 | 验证失败 |
404 | rootNodeId不存在 |
default | 意外错误 |
返回结果示例
{ "error": { "errorKey": "string", "statusCode": 0, "briefSummary": "string", "stackTrace": "string", "descriptionURL": "string", "logId": "string" } }