Data Plug Management

Data Plugs are the microservices that bring data from other digital resources into the HAT PDAs. However, to ensure users' privacy in the distributed ecosystem, DEX requires Data Plugs to be registered before they can be plugged into a HAT PDA.

DEX records some basic data about every plug:

Parameter Description Required/Generated
uuid UUID of the Data Plug Generated
providerId date when the field was created Generated
created date when the Data Plug was registered Generated
name Alpha-numerical name of the Plug Required
description Textual description of what the Plug Does Required
url Address of the plug for users to visit to connect Required
illustrationUrl Logo of the plug, typically shown in the UI for connecting plugs Required
passwordHash Hash of the Data Plug's password, set up with a HAT when connecting Required
approved Whether or not the plug has been approved within the DEX Required

To register a new Data Plug, you will need to contact us, providing the required details. Your plug will then be reviewed to check if it matches the HATDeX platform's governance rules, e.g. only sending the personal data to users' HAT PDAs and nowhere else. The review will also include a check on how the plug works, etc.

Listing Data Plugs

All Data Plugs are public, listed by the DEX:

{
  "request": {
	"method": "GET",
	"header": [
		{
			"key": "Content-Type",
			"value": "application/json",
			"description": ""
		},
		{
			"key": "X-Auth-Token",
			"value": "ACCESS_TOKEN",
			"description": ""
		}
	],
	"body": {},
	"url": "https://dex.hubofallthings.com/api/dataplugs",
	"description": ""
  }
}

Providing a list of all Data Plugs and their details.

Connecting a Data Plug

Since HAT PDAs are distributed and are likely to be created before you register your own Data Plug, HAT PDAs do not necessarily recognise the plug and your authentication would fail initially. When your Data Plug is registered, you, as the owner of the plug, will receive a set of credentials to use with the DEX and your account is associated with the plug as the "owner" account. Before you can connect to a HAT PDA, you need to ask DEX to connect:

{
  "request": {
	"method": "GET",
	"header": [
	{
		"key": "X-Auth-Token",
		"value": "ACCESS_TOKEN",
		"description": ""
	}
	],
	"body": {},
	"url": "https://dex.hubofallthings.com/api/dataplugs/DATAPLUG_ID/connect",
	"description": ""
  }
}

Once DEX responds with 200 OK status and a message saying that the Data Plug has been connected, you can connect directly to the HAT PDA with username matching the name of your plug and the password corresponding to the passwordHash.