Welcome! This article will walk you through shared dataports and public dataports.
Immediately you have two options, creating a data share or making your dataport public. The difference being how many people have access to your data. Sharing is much narrower, as you specify which other users, by email, have access to your data. Sharing also allows you to generate one-time codes that you can distribute(in case you don't have everyone's email). Making a dataport public however will allow everyone using Exosite to see all the data contained within the newly public dataport.
Sharing a Dataport
1. Creating a Share
First, open the dataport that you would like to share from and find the "Share Data" box. Here, you have the option of entering a user's email address to share exclusively with them or to generate a share code that can be used once by anyone. Enter an email and click "Create Share" to add that user. Alternatively without entering an email address, click the "Create Share" button; This will generate a share code for this dataport.
2. Using a Shared Dataport
Go to the "Data" page and click "Add Data +". Select that you want to add your new dataport "From Shared Data".
If the dataport was shared via email, select the radio button "Data Shared to You" and select the desired dataport from the drop-down list.
If the dataport had been shared via activation code, paste/type the provided code into the "Activation Code" form.
You have now successfully shared data!
Data Share Nuances
If you plan on reading this dataport from the device side APIs (HTTP or CoAP), make sure to add an alias to the new dataport.
You now have a one-way share setup. If you need data to be shared in both directions, repeat the process but get a share code from the second device and apply it to the first.
The relationship you just created has read-only permissions. Giving another user a share code will not allow them to write to your dataport, it is protected by your device CIK.
A data share can also be generated with the JSON RPC API. For more information go here: https://github.com/exosite/docs/tree/master/rpc#share
Publicly Publishing a Dataport
1. Make sure you have a device already added.
It is not important what type of device it is -- or even its name. Just that you have a device to attach the dataport to.
If you need a quick refresher on how to do so, check out:
2. Add the public dataport.
Navigate to the data section of your portal and click on add data. It should look like this:
Once inside be sure to select "From Public Source."
This example used Minneapolis Temperature. You can either key in what public source you want, if you are already familiar with it, or you can hit "Search" right away to pull the whole list.
The key step comes next. It is important to match the tag exactly. If you click the radio button of your desired dataport, it will automatically populate the alias information correctly. The RID can be copied by triple clicking the Tag section of the dataport and pasting it.
Double-check that you have the new dataport assigned to the device you want.
Hit "Submit" to complete adding the public dataport to your device.
Public Dataport Nuances
It is important to know that the list of public dataports available, will be from any dataport any person from any portal made public. Exosite made many public dataports available primarily concerned with weather. Exosite's list is not a complete list. If you wanted to add your own city you could do so through public data available through a weather application. You can use those service's APIs to pull the data and then push into Exosite using the Exosite API.
Refresher on Exosite API: