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 a Link to a Thing

  1. In the Overview panel of a Thing, click the plus icon next to Links.


    Figure 1.
    The Add Link dialog opens.
  2. Enter the relationship type. Note that any relation can be established; there is no validation. Examples could include BelongsTo, PartOfOrg, Parents, etc.
  3. Enter the URL that indicates the resource that the relation is being established to.


    Figure 2.
    The URL can also be a reference to an external source.


    Figure 3.
  4. Click Add.
    The information is added to the schema.
    "links": [
    {
    			"href": "https://api.swx.altairone.com/spaces/demoworkspace/categories/links/things/01FJW37STRFV19C1S53VCF3M",
    			"rel": "BelongsTo"
    		}
    		{
    			"href": "google.com",
    			"rel": "NavigateTo"
    		}
    	],

    Notice you can create several Links for a specific Thing.

  5. 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.


    Figure 4.