如何通过 oData 查询仅获取 sensenet 中的文档数

How to fetch only count of documents in sensenet by oData query

我通过以下查询获得了所有文档列表和所有属性

/OData.svc/workspaces/Document?$select=*&metadata=no&query=InTree:/Root/Sites/Default_Site/workspaces/Document%20AND%20TypeIs:File

但我只需要数那些文件

通过哪个oData查询我只能得到计数?

谢谢

使用$count属性,格式如下: https://demo.sensenet.com/OData.svc/workspaces/Document/$count

您可以在本文('Addressing the count of a collection' 部分)中阅读有关 OData(与此问题相关)的更多信息:

https://community.sensenet.com/docs/odata-rest-api

Br, 马罗斯