Orisumi

读取当前版本

GET
/entities/{entityId}

读取实体的当前版本,见 VERSION-5。

Path Parameters

entityId*string

实体的 EntityId。

Formatuuid

Response Body

实体的当前版本。

application/json
  1. response

一个已保存的版本。成员的含义见 Version。

entityId*EntityId

写入方生成的 UUIDv7,见 ENTITY-2。

Formatuuid
versionId*VersionId

写入方生成的 UUIDv7,见 VERSION-12。

Formatuuid
previousVersionId*|

同一实体的前一版本,首版为 null。

category*Category

版本内容属于哪一类。前三种是 Core 类型。

Value in"observation""entity_schema""input_set""business"
schemaVersionId*|

业务内容所用的 Schema 版本,Core 类型为 null。

recordedAt*string

后端首次保存这个版本的时刻,以 Z 结尾,见 VERSION-10。

Formatdate-time
content*|||

版本的内容,按 category 解释:Core 类型的成员见各类型页,业务内容按 schemaVersionId 指向的 Schema 版本校验。

Example Request
curl -X GET 'https://example.com/api/entities/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",  "versionId": "14707576-2549-4848-82ed-f68f8a1b47c7",  "previousVersionId": "de7aac6a-ef9d-4693-9e70-ffd12c3baa44",  "category": "observation",  "schemaVersionId": "6856dbc6-454b-45a1-a35b-52f2061b8dca",  "recordedAt": "2019-08-24T14:15:22Z",  "content": {    "observerVersionId": "3a060ba7-4648-481d-8ee6-147a347a183b",    "contentVersionId": "a5a27b60-1951-4448-8e45-5c887f120534",    "inputSetVersionId": "0ffd8fea-521d-4052-adc0-e732666ff823",    "startAt": "2019-08-24T14:15:22Z",    "endAt": "2019-08-24T14:15:22Z",    "timeZone": "string"  }}