如何在 Orion 中获取创建和修改日期

How get creation and modification date in Orion

我想获取实体创建和更新日期。按照 问题的答案,我应该用

得到它们
GET /v2/entities/myEntity?options=dateCreated,dateModified

在另一个来源中,v2 reference,在虚拟属性部分下,选项略有不同:dateCreationdateModification

然而,无论我使用哪个选项,我总是得到错误答案:

{
    "error": "BadRequest",
    "description": "Invalid value for URI param /options/"
}

我怎样才能得到它们?

注意:由于 Proton/xml 兼容性,我使用的是 0.26 版。

dateCreateddateModified 选项在 Orion 0.28.0 中引入:

Add: dateCreated and dateModified options to get entity creation and modification times as "virtual" attributes (Issue #876)

因此,您应该将 Orion 升级到该版本。请注意,Orion 0.28.0 仍然支持 XML(实际上,it will be the last release supporting it)。