【问题标题】:How to get file name list from nuxeo folder using rest api?如何使用rest api从nuxeo文件夹中获取文件名列表?
【发布时间】:2020-06-27 14:57:54
【问题描述】:

我将文件上传到工作区下的 nuxeo 文档。现在我需要使用文件夹 UUID 获取文件信息列表。使用http://127.0.0.1:8080/nuxeo/api/v1/id/{folder_id} 端点我只得到文件夹信息,但没有文件夹内的文件信息。我应该使用哪个端点?

【问题讨论】:

    标签: rest file upload nuxeo


    【解决方案1】:

    您可以通过advanced_document_content 页面提供者列出文件夹中的文档,如下所示:

    curl -X GET -u Administrator:Administrator \
      "http://localhost:8080/nuxeo/api/v1/search/pp/advanced_document_content/execute?currentPageIndex=0&offset=0&pageSize=40&ecm_parentId=b7ffc1a1-5439-4050-9562-bcaa4db0624f&ecm_trashed=false" | jq
    

    其中ecm_parentId 参数指定文件夹的UUID。您还可以使用分页(currentPageIndex、offset 和pageSize 参数),当您设置pageSize=0 时,它将列出所有文件夹文档。

    它将列出每个文档的基本属性。如果您需要有关每个文档的更多详细信息,您可以使用 properties 和 enrichers-document 标头,您可以在其中指定您还想像这样检索什么:

    curl -X GET -u Administrator:Administrator \
      -H "properties: dublincore,common,uid,file" \
      -H "enrichers-document: thumbnail, permissions" \
      "http://localhost:8080/nuxeo/api/v1/search/pp/advanced_document_content/execute?currentPageIndex=0&offset=0&pageSize=40&ecm_parentId=b7ffc1a1-5439-4050-9562-bcaa4db0624f&ecm_trashed=false" | jq
    
    • properties 标头列出文档架构
    • enrichers-document 标头列出了提供有关文档的更多信息的内容丰富器。 Here 您可以找到所有可用的丰富器的列表,或者您可以实施您的自定义。

    【讨论】:

      猜你喜欢
      • 2023-03-20
      • 1970-01-01
      • 2014-01-21
      • 2019-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多