Data as a Service (DaaS)

HAT creation gets automatically initialised with the supplied email address and autogenerated password

Once the HAT PDA is up and running (2-3 seconds), the user gets automatically logged in and presented with the HMI Screen. HMI is the HAT Microserver Instructions that the HAT PDA owner issues and represents the legal contract between the HAT PDA owner and the application in order to enable the application to interact with the HAT PDA.

Once HMI is confirmed, the user gets redirected through the OAuth process of each data plug provider (eg facebook) in order to setup data plug access into the HAT PDA, if the data plug have not yet been set up. If it has been set up, only the application’s permissions would be required

Upon finishing data access setup for all required providers, the user will be redirected back to the redirect_uri

Instructions for Single Screen Frictionless HAT PDA Vending

In order to use frictionless HAT PDA vending via DaaS, the only requirement from your application or webpage, is to collect user's email address.

  1. Your application (web or mobile) collects the email address of the user (with precautionary measures against spam bots)
  2. In order to register users via daas, the application or webpage needs to redirect users to the following URL:

    https://hatters.dataswift.io/services/daas/signup

    With the following query parameters:

    "email"
    "application_id"
    "redirect_uri"

    Please use the value of A​pplication ID​ in the kit summary to test

  3. HAT PSA creation gets automatically initialised with the supplied email address and autogenerated password
  4. Once the HAT PDA is up and running (2-3 seconds), the user gets automatically logged in and presented with the HMI Screen. HMI is the HAT Microserver Instructions that the HAT PDA owner issues and is the legal contract between the HAT PDA owner and the application to enable the application to interact with his/her HAT PDA.
  5. Once HMI is confirmed, the user gets redirected through the OAuth process of each data plug provider (eg facebook) to setup data plug access into the HAT PDA if the data plug have not yet been set up — if it has been set up, only the application’s permissions would be required
  6. Upon finishing data access setup for all required providers, the user will be redirected back to the callback URL from step 2
  7. In case signup is successful the user will be redirected back to your application with query parameter token, the application token for that user.

In case signup fails at any stage of the process, the user will be redirected back to your application with query parameters error and error_reason. It is left up to each individual application to decide how the failures should be communicated to the user. Currently error field will always have the value hat_provisioning. The error_reason field can have multiple values depending on the failure type:

  * `out_of_capacity`
  * `duplicate_email`
  * `invalid_submission_data`
  * `user_cancelled`
  * `uncaught_error`
  1. The token is generated using JWT standard and it carries additional information about the issuer, application and expiration date. The issuer parameter can be used to extract the domain name of the HAT PDA.
  2. The data itself can be retrieved from the data debit endpoint on that HAT (the request details are documented here.

    Note that HAT PDA domain name will be different for each user and needs to be adjusted based on information encoded in the 
    token.

    The token itself is used for authenticating the request and should be passed as a x-auth-token header.

    https://{{userHatDomain}}/api/v2.6/data-debit/app-{{applicationId}}/values

    Please use the value of A​pplication ID​ in the kit summary. The HAT PDA owner will receive an email for him/her to claim his HAT PDA within 7 days and a further email at the end of 7 days to inform him that the HAT PDA will be deleted if unclaimed.

  3. If the HAT PDA owner claims his/her HAT PDA, he will be prompted to change his password and set up his HAT PDA in accordance with HATDeX platform guidelines.
  4. In case signup fails at any stage of the process, the user will be redirected back to your application with query parameters “error” and “errorreason”. It is left up to each individual application to decide how the failures should be communicated to the user. Currently “error” field will always have the value “hatprovisioning”. The “errorreason” field can have multiple values depending on the failure type: “outofcapacity”, “duplicateemail”, “invalidsubmissiondata”, “usercancelled” and “uncaughterror”.