getCatalogRevision
单条修订
include=diff 追加相对 diff_base 的字段级变更集;diff_base 缺席时相对前一条修订。此 id 即 POST /v2/moderation/reverts 所取。需要应用密钥。
/v2/catalog/revisions/{id}catalog:readAuthorization: Bearer nmk_live_…(v2 应用密钥,门户自助铸造,无需申请)参数
| 参数 | 类型 | 位置 | 说明 |
|---|---|---|---|
id 必填 | string | path | 修订 id。 |
include | string | query | 逗号分隔的块。唯一 token 为 diff。未知 token 返回 400 UNKNOWN_INCLUDE。 |
view | string | query | basic(默认)或 full。full 会加入 diff。 |
fields | string | query | 逗号分隔的顶层键。未知 token 返回 400 UNKNOWN_FIELD。 |
diff_base | string | query | 作为 diff 对照的修订 id。需要 include=diff。缺席则为同一实体的前一条修订。 |
响应
actionstring必填本修订如何产生。
枚举createdmergeddirectrevertedactor_uidstring必填认领站自己的、导致本次修订的用户 id。不是 catalog id。
amender_uidstring必填 可空认领站自己的最近修正者用户 id。无人修正时为 null。
changed_fieldsstring[]必填本修订触及的字段键。空数组,从不为 null。
created_atstringdate-time 必填RFC 3339 UTC。
diffobject[]仅当 include=diff 时出现。相对 diff_base 的字段级变更集;缺席 diff_base 时相对前一条修订。没有任何差异则为空数组。
fromobject必填变更前的值。字段原先未设或该修订没有前驱时为 null。
keystring必填编辑引擎字段键。不得用作判别条件。
toobject必填变更后的值。字段被清空时为 null。
diff_basestring仅当 include=diff 时出现。diff 所对照的修订。若这是该实体的第一条修订则为 null。
entity_idstring必填本 revision 所属实体的 catalog id。
idstring必填修订 id。这是 POST /v2/moderation/reverts 作为 revision_id 接收的值。
objectstring必填类型判别字段。恒为 revision。
枚举revisionproposal_idstring必填 可空本修订所合入的提案。直接编辑与导入则为 null。
seqintegerint64 必填在此实体修订链中的位置,从 1 起且连续。
sitestring必填记录本修订所用的租户。开放词表;不得用作判别条件。
site_work_idstring必填 可空认领站自己的作品 id,不是 catalog id。仅当 target_object 为 work 且认领站等于 site 时才有值,否则为 null。
target_objectstring必填本修订所属实体的族。
枚举workcompanycharacterreleasetagengineseries
请求示例
curl "https://api.nextmoe.dev/v2/catalog/revisions/value" \
-H "Authorization: Bearer nmk_live_<YOUR_KEY>"