5. Data Plugs
Data Plugs
In the PDA
ecosystem, Data Plug
is a minimal API-to-API web service with the primary purpose of fetching data from third party API and pushing it to the user's PDA. Due to the security considerations and limited scope of required functionality, each data plug is granted a write-only access to any particular PDA.
Fetch Data Plugs and Applications
HAT for iOS
provides an API call for you to fetch all the available Data Plugs
:
HATExternalAppsService.getExternalApps(
userToken: userToken,
userDomain: userDomain,
completion: availablePlugsReceived,
failCallBack: errorRetrievingDataPlugs)
As you may have noticed, the function name is getExternalApps
. Applications
and Data Plugs
are not only represented by the same structure but they have the same API as well.
userToken
is the user's token to authenticate with thePDA
.userDomain
is the user'sPDA address
used to form the url to fetch theData Plugs
.completion
is a callback that is called when the request was successful. It has type of@escaping (([HATApplicationObject], String?) -> Void)
.The first parameter is an array of
HATApplicationObject
. This is the structure ofData Plugs
andApplications
. More on that in the next section.This array contains all the
Data Plugs
andApplications
on thePDA
. The second parameter is an optionalString
, the refreshed user token that thePDA
returns.failCallBack
is a callback that is called when the request has failed. The type of the function is@escaping ((HATTableError) -> Void)
.HATTableError
is a custom object describing the errors that have occurred during the querying of the tables in the database.
A successful response will have statusCode
200 and look like this:
[
{
"application": {
"id": "hatapp",
"kind": {
"url": "https://rumpel.hubofallthings.com",
"iosUrl": "https://itunes.apple.com/app/id1303181222?mt=8",
"kind": "App"
},
"info": {
"version": "1.2.5",
"updateNotes": {
"header": "We’ve made some improvements to the user experience and made clear your legal rights over your data so that you can access new services on your HAT app. Please accept our updated [terms of service](https://hatdex.org/terms-of-service-hat-owner-agreement) and [privacy policy](https://hatdex.org/privacy-notice-hat-owner-services-and-hat-accounts) to continue using HAT.",
"notes": [
"We made clear the difference between “your data” in your HAT microserver and “HATDeX account data” which we need to create your HAT microserver",
"We made clear the relationship between HAT permissions and instructions that you control within the HAT versus HATDeX platform services and third party services that others control (when you give permission) to help you easily view, manage and organise the data within the HAT",
"We made clear the way data debits and data plugs operate based on the permissions and instructions you control and the services we control to execute your instructions",
"We updated the way we use your information for HATDeX account data in accordance with GDPR",
"We updated the way apps, plugs and tools are rated to give HAT owners full transparency on services and apps \"Powered by HAT\". Find more info [here](https://www.hatcommunity.org/hat-dex-rating)"
]
},
"published": true,
"name": "HAT App",
"headline": "The HAT Dashboard",
"description": {
"text": "\n Your digital life is made up of hundreds of day to day interactions on the Internet: liking and sharing content, booking train tickets, tracking your activity. It's time to see them all come together, in one place, so you can benefit from analysis, insights and self-discovery on your personal data.\n\n CONNECT DATA PLUGS\n Link your Twitter, Facebook, Spotify, FitBit, Google Calendar and iPhone GPS locations to your HAT, and pull in all that data in real time. Your data is kept in an entirely private space, owned by you – we don't see it, third parties don't see it, no-one sees it but you.\n\n YOUR DIGITAL LIFE\n View your data in a live feed where you can experience and engage with it as it arrives into your HAT. Facebook posts, workouts recorded by FitBit, photos you've shared – see it all in one integrated feed. Search your data by date range to know exactly where you were and what digital actions you took at any given time.\n\n PUBLIC PROFILE\n Save your personal information privately, and customise exactly which parts you want to share publicly on your Personal HAT Address – your own public URL. Think of it as the front door to your HAT, and use it to display the information you'd like.\n\n ME, MYSELF AND AI\n We will be releasing the Smart HAT Engine (SHE) soon – this engine on your HAT will enable you to subscribe to different types of analytics and machine learning functions to give you daily insights and help you make better decisions with your data, completely in your private space. Start claiming your data for yourself so that you can better use AI in your life.\n\n One HAT, so many possibilities: our HAT Community of startups and app makers is creating a new generation of Internet applications sitting on your HAT. With all the data in the account, you can donate your data to research, spend it, match it and exchange it for services. Join the community to be part of the movement to change the Internet at https://hatcommunity.org\n\n ",
"markdown": "\n Your digital life is made up of hundreds of day to day interactions on the Internet: liking and sharing content, booking train tickets, tracking your activity. It's time to see them all come together, in one place, so you can benefit from analysis, insights and self-discovery on your personal data.\n\n ### Connect Data Plugs\n\n Link your Twitter, Facebook, Spotify, FitBit, Google Calendar and iPhone GPS locations to your HAT, and pull in all that data in real time. Your data is kept in an entirely private space, owned by you – we don't see it, third parties don't see it, no-one sees it but you.\n\n ### Your Digital Life\n\n View your data in a live feed where you can experience and engage with it as it arrives into your HAT. Facebook posts, workouts recorded by FitBit, photos you've shared – see it all in one integrated feed. Search your data by date range to know exactly where you were and what digital actions you took at any given time.\n\n ### Public Profile\n\n Save your personal information privately, and customise exactly which parts you want to share publicly on your Personal HAT Address – your own public URL. Think of it as the front door to your HAT, and use it to display the information you'd like.\n\n ### Me, Myself and AI\n\n We will be releasing the Smart HAT Engine (SHE) soon – this engine on your HAT will enable you to subscribe to different types of analytics and machine learning functions to give you daily insights and help you make better decisions with your data, completely in your private space. Start claiming your data for yourself so that you can better use AI in your life.\n\n One HAT, so many possibilities: Our HAT Community of startups and app makers is creating a new generation of Internet applications sitting on your HAT. With all the data in the account, you can donate your data to research, spend it, match it and exchange it for services. Join the community to be part of the movement to change the Internet at https://hatcommunity.org\n ",
"html": "\n <p>Your digital life is made up of hundreds of day to day interactions on the Internet: liking and sharing content, booking train tickets, tracking your activity. It's time to see them all come together, in one place, so you can benefit from analysis, insights and self-discovery on your personal data.</p>\n\n <h3>Connect Data Plugs</h3>\n\n <p>Link your Twitter, Facebook, Spotify, FitBit, Google Calendar and iPhone GPS locations to your HAT, and pull in all that data in real time. Your data is kept in an entirely private space, owned by you – we don't see it, third parties don't see it, no-one sees it but you.</p>\n\n <h3>Your Digital Life</h3>\n\n <p>View your data in a live feed where you can experience and engage with it as it arrives into your HAT. Facebook posts, workouts recorded by FitBit, photos you've shared – see it all in one integrated feed. Search your data by date range to know exactly where you were and what digital actions you took at any given time.</p>\n\n <h3>Public Profile</h3>\n\n <p>Save your personal information privately, and customise exactly which parts you want to share publicly on your Personal HAT Address – your own public URL. Think of it as the front door to your HAT, and use it to display the information you'd like.</p>\n\n <h3>Me, Myself and AI</h3>\n\n <p>We will be releasing the Smart HAT Engine (SHE) soon – this engine on your HAT will enable you to subscribe to different types of analytics and machine learning functions to give you daily insights and help you make better decisions with your data, completely in your private space. Start claiming your data for yourself so that you can better use AI in your life.</p>\n\n <p>One HAT, so many possibilities: Our HAT Community of startups and app makers is creating a new generation of Internet applications sitting on your HAT. With all the data in the account, you can donate your data to research, spend it, match it and exchange it for services. Join the community to be part of the movement to change the Internet at https://hatcommunity.org</p>\n "
},
"termsUrl": "https://hatdex.org/terms-of-service-hat-owner-agreement-2018-10-01",
"dataUsePurpose": "The HAT App only uses your data to display it back to you. It does not share your data with any third-parties or store it outside of your personal HAT.",
"supportContact": "[email protected]",
"rating": {
"score": "Z***"
},
"dataPreview": [
{
"source": "she",
"date": {
"iso": "2018-10-31T08:54:26.303Z",
"unix": 1540976066
},
"types": [
"note"
],
"title": {
"text": "HAT Private Micro-server created"
},
"content": {
"text": "Digital Citizenship on the Internet is about the freedom of having our own persona(s) with the data we are able to claim, control and share. You now have a HAT micro-server to do that. Congratulations!"
}
}
],
"graphics": {
"banner": {
"normal": ""
},
"logo": {
"normal": "https://static1.squarespace.com/static/5a71ebc8b1ffb68777ca627a/t/5acb4a166d2a73d3a00a10c6/1523272220659/HATAppsstore-rounded.png?format=300w"
},
"screenshots": [
{
"normal": "https://is1-ssl.mzstatic.com/image/thumb/Purple116/v4/cb/01/56/cb0156b7-0cb6-128c-b1ec-fc3c7b31eb87/mzl.xfaethox.png/300x0w.jpg",
"large": "https://is5-ssl.mzstatic.com/image/thumb/Purple128/v4/ac/a2/6b/aca26bb8-39dd-1cd9-159d-d37012ffbfeb/mzl.jiaxtegz.png/643x0w.jpg"
},
{
"normal": "https://is4-ssl.mzstatic.com/image/thumb/Purple118/v4/26/b7/0f/26b70ffa-d9bc-2520-582b-b9a436eb00f5/pr_source.png/300x0w.jpg",
"large": "https://is4-ssl.mzstatic.com/image/thumb/Purple128/v4/9b/2f/68/9b2f6853-ce11-a189-ae41-445e8e7b3248/mzl.fkcehkpp.png/643x0w.jpg"
},
{
"normal": "https://is4-ssl.mzstatic.com/image/thumb/Purple128/v4/10/df/8f/10df8fae-b2b7-0c93-c530-d6338b1e6bc8/pr_source.png/300x0w.jpg",
"large": "https://is4-ssl.mzstatic.com/image/thumb/Purple118/v4/28/de/7a/28de7aeb-54ed-6692-a63a-8102703361e2/pr_source.png/643x0w.png"
},
{
"normal": "https://is5-ssl.mzstatic.com/image/thumb/Purple128/v4/15/94/30/159430c6-99fc-ee9f-72aa-d46d8436d76c/mzl.dvmpzlje.png/300x0w.jpg",
"large": "https://is2-ssl.mzstatic.com/image/thumb/Purple118/v4/11/df/40/11df4050-582a-7598-fe02-b4421a4be818/pr_source.png/643x0w.png"
}
]
}
},
"developer": {
"id": "hatdex",
"name": "Dataswyft Ltd",
"url": "https://hatdex.org",
"country": "United Kingdom"
},
"permissions": {
"rolesGranted": [
{
"role": "owner"
},
{
"role": "applicationlist"
},
{
"role": "applicationmanage",
"detail": "hatappstaging"
},
{
"role": "applicationmanage",
"detail": "notables"
},
{
"role": "applicationmanage",
"detail": "twitter"
},
{
"role": "applicationmanage",
"detail": "facebook"
},
{
"role": "applicationmanage",
"detail": "fitbit"
},
{
"role": "applicationmanage",
"detail": "spotify"
},
{
"role": "applicationmanage",
"detail": "instagram"
},
{
"role": "applicationmanage",
"detail": "monzo"
},
{
"role": "applicationmanage",
"detail": "fitbit"
},
{
"role": "applicationmanage",
"detail": "google-calendar"
},
{
"role": "applicationmanage",
"detail": "starling"
}
]
},
"setup": {
"url": "https://rumpel.hubofallthings.com",
"iosUrl": "hatapp://hatapphost",
"kind": "External"
},
"status": {
"compatibility": "1.2.5",
"dataPreviewEndpoint": "she/feed",
"recentDataCheckEndpoint": "rumpel/locations/ios",
"versionReleaseDate": "2018-07-23T12:00:00.000Z",
"kind": "Internal"
}
},
"setup": true,
"enabled": true,
"active": true,
"needsUpdating": true,
"mostRecentData": "2018-11-12T08:27:57.609Z"
}
]
application
holds the most parts of the structure. It consists of the following 7 values:
id
in theapplication
part of the JSON is theid
of theData Plug
in theHAT
.kind
in theapplication
part of the JSON has 4 values holding the various urls and the type of theData Plug
:url
is the url of theData Plug
orApplication
to use in webiosUrl
is the iTunes url of theApplication
in theApp Store
. It's optional and only there forApplication
typeandroidUrl
is the Play Store url of theApplication
in thePlay Store
. It's optional and only there forApplication
typekind
is the kind. As we mentioned earlierData Plug
andApplication
is represented by the same structure and use the same APIsTherefore, the
kind
can beApp
orData Plug
. When for example you want only theApplications
then simply you are going to filter the array based on thekind
.
info
in theapplication
part of the JSON has 12 values:version
is the version number of the app in theHAT
. This may be different from the version number of theApplication
in theApp Store
orPlay Store
updateNotes
is essentially the release notes for the latest version. It is formed by theheader
, the title of the release notes, and thenotes
an array ofString
to easily show the notes as an unordered list.published
indicates if the app is published or not. It can be that the app is not yet published, so it's not yet live, and it's testing, beta, appname
is the official name of the appheadline
is the headline or subtitle of the app. It can be placed underneath the name for example, to provide more context for the app if needed.description
allows you to describe your app better with a longer text. Also, it has support for different formats of text,text
,markdown
andhtml
.markdown
andhtml
are optional.termsUrl
is aURL
of the terms and conditions. Users must be able to read them if they wish.dataUsePurpose
is a text explaining why and how the app will use the datasupportContact
a support email. Users will use this email to contact you.rating
is an optional object formed byscore
which describes the permissions and the data use using a letter-based scoring system. You can read more here.dataPreview
is actually an array ofSheFeed
structures. This is used to preview items, if any, instead of making another network request to fetch those items. The array can be empty.
graphics
is a structure formed by 3 values:banner
is theURL
of the banner imagelogo
is theURL
of the app logo imagescreenshots
is theURL
of the app's screenshots used to showcase what this app offers.All the above 3 values use the same structure.
PDA
images can be categorised assmall
,normal
,large
andxlarge
.Except
normal
all are optional values.
developer
consists of some basic info about the developer. This includes:id
,name
,url
andcountry
.permissions
includes 3 values:rolesGranted
which is an array ofrole
anddetail
, optional, describing the roles granted in theApplication
.dataRetrieved
which is a type ofDataOfferRequiredDataDefinitionObjectV2
. It describes the data that theApplication
will retrieve. optional.rolling
describes if the data have a rolling start datebundle
You can read more about it herestartDate
the start date of thebundle
. optionalendDate
the end date of thebundle
. optional
dataRequired
which is a type ofHATExternalAppsDataRequiredObject
. optional
setup
encapsulates all the urls that theApplication
needs in order to setup. The structure is the same askind
but the urls can be differentstatus
provides some info about the status of the application:compatibility
– the last version that is compatible with the current oneversionReleaseDate
– the date, inISO
format, of the latest releasekind
– the kind of the release. It can be eitherInternal
orExternal
.recentDataCheckEndpoint
– aURL
pointing on the most recent data point. optionalstatusUrl
– aURL
to check the status of theApplication
orData Plug
. optionalexpectedStatus
– the expected status number. optionaldataPreviewEndpoint
– aURL
pointing to the actual data on thePDA
to show them as a preview. optional
setup
Boolean value indicating if this app has been setup successfullyenabled
Boolean value indicating if this app has been enabled successfullyactive
Boolean value indicating if this app is currently active or notneedsUpdating
Boolean value indicating if this app needs updating. AnApplication
may need an update in case the termshave changed or a new version has been released.
A request that has failed will look like this:
{
"error": "Not Authenticated",
"message": "Not Authenticated"
}
error
is the error that has occurredmessage
is a more descriptive message about theerror
that has occurred
Set up an Application
Setting up an application is similar to the login process. First you have to check the kind
; is it App
, or Data Plug
. The 2 of them are different in how you set them up.
In the case of an App
you first have to check if the app is already installed on the user's device. To do that you have to check with:
UIApplication.shared.canOpenURL(appURL)
where appURL
is the iosUrl
from the Application
-> setup
. If user has the app installed, then you have to form a URL
like this:
"https://\(hatAddress)/#/hatlogin?name=\(appID)&redirect=\(appURL)&fallback=\(fallback)"
hatAddress
is the (fully qualified domain) address of the PDA, e.g.postman.hubat.net
appID
is the id of the application to setup.appURL
is the URL where the user should be sent to after completing authentication. In this case it is theiosURL
.fallback
is the URL where the user should be sent to in case the authentication has failed. Optional. For aniOS
application that would probably be:\(applicationName)://failed
and has to be added in theinfo.plist
file of the project in Xcode as a known URL.
As you may have noticed this is exactly the same URL
as the login URL
and there is a reason for this. The setup process goes through web. Just like during the login process, the user will be asked to insert their password before continuing to the next step. The next step is accepting the terms and conditions
and giving the permissions
the app requires to function. After that if everything goes smoothly, PDA
will redirect back to the success redirect
. The redirect url
will now include a parameter which is the token for the particular app. iOS
will ask the user if they want to launch the particular app. If the user selects "yes" then the app will be launched. If there is a problem, DA
will redirect to the fallback
url and you have to hide Safari and show a message that something went wrong.
If you don't know how to handle SFSafariViewController
you can read more here.
If the user does not have the app installed, you first have to redirect them to the App Store
in order for them to download the app. The URL
that you have to use the url
in Application
-> kind
. Again the only thing you have to do is open it using Safari. When the user has installed the app they may then tap again to set up the Application
.
Set up Data Plug
Setting up a Data Plug
is a lot simpler than setting up an Application
. You just open the url
in Application
-> kind
with safari and follow the instructions. Again, the user will first have to enter the password. After that each Data Plug
has a different way of asking permissions and registering with the PDA
.
State of the Application and Data Plug
Application
and Data Plug
can be in multiple states. Setup, failing, need updating, disabled. To respond in state changes you can use the following snippet:
/**
Returns a ApplicationConnectionState according to the application state
— parameter application: The application to check the state of
— returns: An ApplicationConnectionState case depending in the status of the app
*/
static func getState(application: HATApplicationObject) -> ApplicationConnectionState {
if application.setup && (application.needsUpdating ?? false) {
return .needsUpdating
} else if application.enabled && !application.active {
return .failing
} else if application.enabled && application.active {
if application.mostRecentData == nil && application.application.kind.kind != "App" {
return .fetching
}
return .connected
}
return .notConnected
}
connected
is the case when theApplication
orData Plug
isenabled
,active
and it doesn'tneedsUpdating
.fetching
is the case when theApplication
orData Plug
isenabled
,active
, it's anApp
and themostRecentData
isnil
. This means that no data have been saved in thePDA
yet.needsUpdating
is the case when theApplication
orData Plug
is marked asneedsUpdating
in the API response. This means the user has to go through the setup process again.failing
is the case when there is a problem in theApplication
orData Plug
. Setting up again might or might not help. In case this persists please do contact us.notConnected
is the case when theApplication
orData Plug
has never been set up before.
Disable Data Plug or Application
You can also disable a Data Plug
or an Application
. To do that you can call the next function:
HATExternalAppsService.disableApplication(
appID: selectedApp.application.id,
userDomain: hatAddress,
userToken: userToken,
completion: appDisabled,
failCallBack: errorDisablingApp)
appID
is the id, inApplication
structure, of theApplication
orData Plug
userDomain
is the user'sPDA address
used to form the url to disable theData Plug
orApplication
userToken
is the user's token used to authenticate with thePDA
completion
is a callback function that is called when the request is successful with a type of@escaping @escaping ((HATApplicationObject, String?) -> Void)
. The first parameter is the disabledHATApplicationObject
. The second parameter is an optionalString
, the refreshed user token that thePDA
returns.failCallBack
is a callback that is called when the request has failed. The type of the function is@escaping ((HATTableError) -> Void)
.HATTableError
is a custom object describing the errors that have occurred during the querying of the tables in the database.
A successful response will have statusCode
201 and look like this:
{
"application": {
"id": "hatapp",
"kind": {
"url": "https://rumpel.hubofallthings.com",
"iosUrl": "https://itunes.apple.com/app/id1303181222?mt=8",
"kind": "App"
},
"info": {
"version": "1.2.5",
"updateNotes": {
"header": "We’ve made some improvements to the user experience and made clear your legal rights over your data so that you can access new services on your HAT app. Please accept our updated [terms of service](https://hatdex.org/terms-of-service-hat-owner-agreement) and [privacy policy](https://hatdex.org/privacy-notice-hat-owner-services-and-hat-accounts) to continue using HAT.",
"notes": [
"We made clear the difference between “your data” in your HAT microserver and “HATDeX account data” which we need to create your HAT microserver",
"We made clear the relationship between HAT permissions and instructions that you control within the HAT versus HATDeX platform services and third party services that others control (when you give permission) to help you easily view, manage and organise the data within the HAT",
"We made clear the way data debits and data plugs operate based on the permissions and instructions you control and the services we control to execute your instructions",
"We updated the way we use your information for HATDeX account data in accordance with GDPR",
"We updated the way apps, plugs and tools are rated to give HAT owners full transparency on services and apps \"Powered by HAT\". Find more info [here](https://www.hatcommunity.org/hat-dex-rating)"
]
},
"published": true,
"name": "HAT App",
"headline": "The HAT Dashboard",
"description": {
"text": "\n Your digital life is made up of hundreds of day to day interactions on the Internet: liking and sharing content, booking train tickets, tracking your activity. It's time to see them all come together, in one place, so you can benefit from analysis, insights and self-discovery on your personal data.\n\n CONNECT DATA PLUGS\n Link your Twitter, Facebook, Spotify, FitBit, Google Calendar and iPhone GPS locations to your HAT, and pull in all that data in real time. Your data is kept in an entirely private space, owned by you – we don't see it, third parties don't see it, no-one sees it but you.\n\n YOUR DIGITAL LIFE\n View your data in a live feed where you can experience and engage with it as it arrives into your HAT. Facebook posts, workouts recorded by FitBit, photos you've shared – see it all in one integrated feed. Search your data by date range to know exactly where you were and what digital actions you took at any given time.\n\n PUBLIC PROFILE\n Save your personal information privately, and customise exactly which parts you want to share publicly on your Personal HAT Address – your own public URL. Think of it as the front door to your HAT, and use it to display the information you'd like.\n\n ME, MYSELF AND AI\n We will be releasing the Smart HAT Engine (SHE) soon – this engine on your HAT will enable you to subscribe to different types of analytics and machine learning functions to give you daily insights and help you make better decisions with your data, completely in your private space. Start claiming your data for yourself so that you can better use AI in your life.\n\n One HAT, so many possibilities: our HAT Community of startups and app makers is creating a new generation of Internet applications sitting on your HAT. With all the data in the account, you can donate your data to research, spend it, match it and exchange it for services. Join the community to be part of the movement to change the Internet at https://hatcommunity.org\n\n ",
"markdown": "\n Your digital life is made up of hundreds of day to day interactions on the Internet: liking and sharing content, booking train tickets, tracking your activity. It's time to see them all come together, in one place, so you can benefit from analysis, insights and self-discovery on your personal data.\n\n ### Connect Data Plugs\n\n Link your Twitter, Facebook, Spotify, FitBit, Google Calendar and iPhone GPS locations to your HAT, and pull in all that data in real time. Your data is kept in an entirely private space, owned by you – we don't see it, third parties don't see it, no-one sees it but you.\n\n ### Your Digital Life\n\n View your data in a live feed where you can experience and engage with it as it arrives into your HAT. Facebook posts, workouts recorded by FitBit, photos you've shared – see it all in one integrated feed. Search your data by date range to know exactly where you were and what digital actions you took at any given time.\n\n ### Public Profile\n\n Save your personal information privately, and customise exactly which parts you want to share publicly on your Personal HAT Address – your own public URL. Think of it as the front door to your HAT, and use it to display the information you'd like.\n\n ### Me, Myself and AI\n\n We will be releasing the Smart HAT Engine (SHE) soon – this engine on your HAT will enable you to subscribe to different types of analytics and machine learning functions to give you daily insights and help you make better decisions with your data, completely in your private space. Start claiming your data for yourself so that you can better use AI in your life.\n\n One HAT, so many possibilities: Our HAT Community of startups and app makers is creating a new generation of Internet applications sitting on your HAT. With all the data in the account, you can donate your data to research, spend it, match it and exchange it for services. Join the community to be part of the movement to change the Internet at https://hatcommunity.org\n ",
"html": "\n <p>Your digital life is made up of hundreds of day to day interactions on the Internet: liking and sharing content, booking train tickets, tracking your activity. It's time to see them all come together, in one place, so you can benefit from analysis, insights and self-discovery on your personal data.</p>\n\n <h3>Connect Data Plugs</h3>\n\n <p>Link your Twitter, Facebook, Spotify, FitBit, Google Calendar and iPhone GPS locations to your HAT, and pull in all that data in real time. Your data is kept in an entirely private space, owned by you – we don't see it, third parties don't see it, no-one sees it but you.</p>\n\n <h3>Your Digital Life</h3>\n\n <p>View your data in a live feed where you can experience and engage with it as it arrives into your HAT. Facebook posts, workouts recorded by FitBit, photos you've shared – see it all in one integrated feed. Search your data by date range to know exactly where you were and what digital actions you took at any given time.</p>\n\n <h3>Public Profile</h3>\n\n <p>Save your personal information privately, and customise exactly which parts you want to share publicly on your Personal HAT Address – your own public URL. Think of it as the front door to your HAT, and use it to display the information you'd like.</p>\n\n <h3>Me, Myself and AI</h3>\n\n <p>We will be releasing the Smart HAT Engine (SHE) soon – this engine on your HAT will enable you to subscribe to different types of analytics and machine learning functions to give you daily insights and help you make better decisions with your data, completely in your private space. Start claiming your data for yourself so that you can better use AI in your life.</p>\n\n <p>One HAT, so many possibilities: Our HAT Community of startups and app makers is creating a new generation of Internet applications sitting on your HAT. With all the data in the account, you can donate your data to research, spend it, match it and exchange it for services. Join the community to be part of the movement to change the Internet at https://hatcommunity.org</p>\n "
},
"termsUrl": "https://hatdex.org/terms-of-service-hat-owner-agreement-2018-10-01",
"dataUsePurpose": "The HAT App only uses your data to display it back to you. It does not share your data with any third-parties or store it outside of your personal HAT.",
"supportContact": "[email protected]",
"rating": {
"score": "Z***"
},
"dataPreview": [
{
"source": "she",
"date": {
"iso": "2018-10-31T08:54:26.303Z",
"unix": 1540976066
},
"types": [
"note"
],
"title": {
"text": "HAT Private Micro-server created"
},
"content": {
"text": "Digital Citizenship on the Internet is about the freedom of having our own persona(s) with the data we are able to claim, control and share. You now have a HAT micro-server to do that. Congratulations!"
}
}
],
"graphics": {
"banner": {
"normal": ""
},
"logo": {
"normal": "https://static1.squarespace.com/static/5a71ebc8b1ffb68777ca627a/t/5acb4a166d2a73d3a00a10c6/1523272220659/HATAppsstore-rounded.png?format=300w"
},
"screenshots": [
{
"normal": "https://is1-ssl.mzstatic.com/image/thumb/Purple116/v4/cb/01/56/cb0156b7-0cb6-128c-b1ec-fc3c7b31eb87/mzl.xfaethox.png/300x0w.jpg",
"large": "https://is5-ssl.mzstatic.com/image/thumb/Purple128/v4/ac/a2/6b/aca26bb8-39dd-1cd9-159d-d37012ffbfeb/mzl.jiaxtegz.png/643x0w.jpg"
},
{
"normal": "https://is4-ssl.mzstatic.com/image/thumb/Purple118/v4/26/b7/0f/26b70ffa-d9bc-2520-582b-b9a436eb00f5/pr_source.png/300x0w.jpg",
"large": "https://is4-ssl.mzstatic.com/image/thumb/Purple128/v4/9b/2f/68/9b2f6853-ce11-a189-ae41-445e8e7b3248/mzl.fkcehkpp.png/643x0w.jpg"
},
{
"normal": "https://is4-ssl.mzstatic.com/image/thumb/Purple128/v4/10/df/8f/10df8fae-b2b7-0c93-c530-d6338b1e6bc8/pr_source.png/300x0w.jpg",
"large": "https://is4-ssl.mzstatic.com/image/thumb/Purple118/v4/28/de/7a/28de7aeb-54ed-6692-a63a-8102703361e2/pr_source.png/643x0w.png"
},
{
"normal": "https://is5-ssl.mzstatic.com/image/thumb/Purple128/v4/15/94/30/159430c6-99fc-ee9f-72aa-d46d8436d76c/mzl.dvmpzlje.png/300x0w.jpg",
"large": "https://is2-ssl.mzstatic.com/image/thumb/Purple118/v4/11/df/40/11df4050-582a-7598-fe02-b4421a4be818/pr_source.png/643x0w.png"
}
]
}
},
"developer": {
"id": "hatdex",
"name": "Dataswift Ltd",
"url": "https://hatdex.org",
"country": "United Kingdom"
},
"permissions": {
"rolesGranted": [
{
"role": "owner"
},
{
"role": "applicationlist"
},
{
"role": "applicationmanage",
"detail": "hatappstaging"
},
{
"role": "applicationmanage",
"detail": "notables"
},
{
"role": "applicationmanage",
"detail": "twitter"
},
{
"role": "applicationmanage",
"detail": "facebook"
},
{
"role": "applicationmanage",
"detail": "fitbit"
},
{
"role": "applicationmanage",
"detail": "spotify"
},
{
"role": "applicationmanage",
"detail": "instagram"
},
{
"role": "applicationmanage",
"detail": "monzo"
},
{
"role": "applicationmanage",
"detail": "fitbit"
},
{
"role": "applicationmanage",
"detail": "google-calendar"
},
{
"role": "applicationmanage",
"detail": "starling"
}
]
},
"setup": {
"url": "https://rumpel.hubofallthings.com",
"iosUrl": "hatapp://hatapphost",
"kind": "External"
},
"status": {
"compatibility": "1.2.5",
"dataPreviewEndpoint": "she/feed",
"recentDataCheckEndpoint": "rumpel/locations/ios",
"versionReleaseDate": "2018-07-23T12:00:00.000Z",
"kind": "Internal"
}
},
"setup": true,
"enabled": false,
"active": true,
"needsUpdating": true,
"mostRecentData": "2018-11-12T08:27:57.609Z"
}
If you are not familiar with the structure you can read more here.
A request that has failed will look like this:
{
"error": "Not Authenticated",
"message": "Not Authenticated"
}
error
is the error that has occurredmessage
is a more descriptive message about theerror
that has occurred
Last updated
Was this helpful?