跳转至

Generate Object View URLs(生成对象视图 URL)

In the course of developing Object Views, you may need to generate URLs that link to a specific object or search for objects.

If you are embedding these views within an iframe rather than providing them as links, append a URL query parameter embedded=true, which will load the view without the Workspace sidebar.

:::callout{theme="neutral"} To learn how to create a URL linking to a search or Exploration, see Generating Object Explorer URLs. :::

There are two ways to link into the URL.

Option 1

/workspace/hubble/external/object/v0/<object-type-id>?<primary-key-property-id>=<primary-key-property-value>

For example:

/workspace/hubble/external/object/v0/aircraft?aircraftId=1234

Option 2

/workspace/hubble/external/search/v2/?objectId=<objectRid>

This way is recommended when the primary key property value could possibly have special characters.

This URL loads the Object View within the context of Object Explorer. To load the Object View with no additional wrapping (for instance, to use within an iframe), create a URL like /workspace/hubble/objects/<objectRid>.


中文翻译

生成对象视图 URL

在开发对象视图(Object Views)的过程中,您可能需要生成指向特定对象或搜索对象的 URL。

如果要将这些视图嵌入到 iframe 中而非作为链接提供,请添加 URL 查询参数 embedded=true,这样加载视图时将不显示工作区侧边栏。

:::callout{theme="neutral"} 如需了解如何创建指向搜索或探索(Exploration)的 URL,请参阅生成对象浏览器 URL。 :::

生成对象链接

有两种方式可以链接到 URL。

方式 1

/workspace/hubble/external/object/v0/<object-type-id>?<primary-key-property-id>=<primary-key-property-value>

例如:

/workspace/hubble/external/object/v0/aircraft?aircraftId=1234

方式 2

/workspace/hubble/external/search/v2/?objectId=<objectRid>

当主键属性值可能包含特殊字符时,推荐使用此方式。

该 URL 会在对象浏览器(Object Explorer)的上下文中加载对象视图。如需加载不带任何额外包装的对象视图(例如在 iframe 中使用),请创建类似 /workspace/hubble/objects/<objectRid> 的 URL。