Links
Links are the element of the schema that enables you to establish relationships between Things, and provides web links to arbitrary resources that relate to the specified Thing.
For example, you can see here a link that establish a relationship between two different Things:
"links": [
{
"href":https://api.swx.altairone.com/spaces/my-space/categories/my-category/things/01FJW37STRFYV19CAS53VCFS3M",
"rel": "BelongsTo"
}
],
In this definition, you can see what data is expected for this device:
- "
Href
": a string representation of a URL. Identifies the linked Thing - "
Rel
": a string describing the relationship established
This helps you define a robust and powerful database, where connections between the assets can be created.
Note: For more information, the Web of Things is defined here by the World Wide Web Consortium (W3C).
Add Links to a Thing
-
In the Overview panel of a Thing, click the plus icon next to Links.
The Add Link dialog opens.
- Enter the relationship type. Note that any relation can be established; there is no validation. Examples could include BelongsTo, PartOfOrg, Parents, etc.
-
Enter the URL that indicates the resource that the relation is being
established to.
The URL can also be a reference to an external source.
-
Click Add.
The information is added to the schema.Note: You can create several Links for a specific Thing.
-
Once the link has been created, you can click the Edit
icon to make further changes. There is also a navigation button to access the
specified URL.