映射 JSON 架构
下面介绍将一个 URN 映射到另一个 URN 的 IRS 映射所用的 JSON 架构。
<irs-urn-mapping>:
{
"id": <id>,
"key": <urn>,
"value": <urn>,
}
<id>: integer
<urn>: <thingmark-urn> | <thing-urn> | <template-urn>
<thingmark-urn>: urn:vuforia:vumark:<thingmark-code>
<thing-urn>: urn:thingworx:thing:<thing-name>[@<hostname>]
<template-urn>: urn:thingworx:template:<template-name>[@<hostname>]
<thingmark-code>: <domain-id>:<instance-id>
<domain-id>: integer
<instance-id>: integer
<thing-name>: string (name of Thing in ThingWorx server)
<template-name>: string (name of ThingTemplate in ThingWorx server)
<hostname>: string (valid FQDN of machine hosting ThingWorx server)
|
id 属性是不可变的,并且在创建映射时由 Experience Service 分配。因此,对于创建或修改映射的请求,在指定其主体时,id 属性从 JSON 对象中省略。
|
下面是符合此架构的 URN 映射 JSON 对象的示例:
{
"id": 1512,
"key": "urn:vuforia:vumark:2:101",
"value": "urn:thingworx:thing:Quadcopter101@es.example.com"
}