Bitpool Cloud Platform
Bitpool Website
  • Bitpool Cloud Platform
    • General Tools
      • Account Settings
        • Account Details
        • Set UI Options
        • Changing your Password
      • Navigation
        • Navigation Bar
        • Page Title And Dashboard Tree
        • Sidebar Widgets
        • Dashboard Comments
        • User and Organisation Details
        • Dashboard Actions
        • Widgets Navigation
    • Dashboards
      • Widgets Introduction
      • Widget Groups
        • Data Visualisation
        • Charting
        • Time and Date
        • Display
        • Weather
        • Utility
        • Infographic
        • Command and Control
      • Grid and Widget Size
      • Dashboard Creation
        • Create a Dashboard
        • Adding Widgets
        • Tweaking Grid and Widget Size
    • Data
    • Flows
      • Flow Tools
        • Stream Types Nodes
        • Math Nodes
        • Data Nodes
        • Insights Nodes
      • Virtual Streams
    • Presentation
    • Connections
      • MQTT
      • Haystack
      • API
      • CSV Importer
      • Windows Uploader
    • Reports
      • Create a Report
      • Create a Template
      • Report and Template Elements
        • Header
        • Footer
        • Baseline Compare Chart
        • Consumption Table
        • Period Compare Chart
        • Date Range
        • Date
        • Markdown
        • Stacked Chart
        • Total Table
        • Pie Chart
        • Table
        • Page Break
        • Bitpool AI
        • Text Box
        • Summary Card
        • Image
        • Total Value
        • Chart
    • Semantics
    • Tag Manager
    • Admin
Powered by GitBook
On this page
  • Web Services
  • The Bitpool Analogy
  • Bitpool API (v1,v2)
  • Examples

Bitpool Cloud Platform

Web services to collect, manage and visualise IoT solutions

NextGeneral Tools

Last updated 4 months ago

Bitpool-Cloud, or more commonly known as just Bitpool, is a web-based platform used to collect, manage and visualise Internet of Things (IoT) data.

At its core, Bitpool has its roots in Amazon Web Services as a data warehouse. It stores billions of time-stamped IoT data which is wrapped with a REST API web service, allowing authorized users the ability to push and pull data from customer edge networks.

Bitpool also provides a rich user experience via its web portal, where users can manage and visualize their data using customisable dashboards.

Get more information here to experience what Bitpool Cloud can offer.

Web Services

The following technical information relates to the Bitpool REST API.

The Bitpool Analogy

To better understand how the API is structured, we have created a real-world analogy to help represent the critical building blocks in our system.

When we think of the ecological cycle of water as it moves around our planet, rain falls to earth creating streams, which run down into pools, which later form into lakes.

  • rain droplet - a single time-stamped data interval, aka Bitpool Interval

  • stream of water - a group of time-stamped data intervals, aka Bitpool Stream (logs)

  • pool - a group of streams, aka Bitpool Pool

  • lake - a group of pools, aka Bitpool Lake

Key Relationships

  • There are 1 or more Intervals in a Stream

  • There are 1 or more Streams in a Pool

  • There are 1 or more Pools in an Organisation

  • There are 1 or more Users in an Organisation

  • There are 1 or more Organisations in a Data Lake

Bitpool API (v1,v2)

The Bitpool V1 API is extensive, however V2 distils functionality down to the basic components for reading and writing interval data to Bitpool.

Please find below examples of how you can quickly get started using tools like Postman.

To continue below, you will need a valid Bitpool account for your organisation in order to generate an API Key.

Examples

The API Key will take the following format: Bitpool2 00000000-0000-0000-0000-000000000000.

These are the minimum number of API calls required to upload or download data from Bitpool. Let's work through them one by one.

Note, you only need to create the Pool, Station, and Stream once. Future pushing and pulling of data only requires the Stream and API Keys.

Create a Pool
Create a Station
Create a Stream
Uploading Stream data
Downloading Stream data

1. Create a Pool

  • A valid response will return the new Pool Key, which we use next to create a Station.

  • We only need to make this request once. Either store the key, or query later using the API (provide Pool Name)

HTTP POST

POST /public/v2/pools
Host: api.bitpool.com
Authorization: Bitpool2 00000000-0000-0000-0000-000000000000
Content-Type: application/json

{
  "Poolname": "EDGE-TEST",
  "Public": false,
  "Virtual": false
}

HTTP Response

{
    "PoolKey": "11917245-6a1d-4117-11c6-1237e94e03e1",
    "Name": "EDGE-TEST",
    "RegistrationDate": "/Date(1654818341126)/",
    "Virtual": false,
    "Public": false,
    "Owner": false,
    "AccessMode": 0,
    "UtcOffset": 10.0,
    "TimeZone": "Sydney"
}

2. Create a Station

  • A valid response will return the new Station Index.

  • We only need to make this request once.

  • Typically, there is only 1x Station for a Pool.

  • Historically, a Pool could have many Stations, but generally one is all that is required to link a Stream to a Pool.

HTTP POST

POST /public/v2/pools/11917245-6a1d-4117-11c6-1237e94e03e1/stations/1/streams
Host: api.bitpool.com
Authorization: Bitpool2 00000000-0000-0000-0000-000000000000
Content-Type: application/json

"test"

HTTP Response

{
    "StationID": 1,
    "StationName": "test",
    "RegistrationDate": "/Date(1654821754000)/",
    "PoolKey": "11917245-6a1d-4117-11c6-1237e94e03e1"
}

3. Create a Stream

  • A valid response will return the new Stream Key. We use the Stream Key to push and pull data from Bitpool.

  • We only need to make this request once. Either store the key, or query later using the API (provide Stream Name).

  • Notice that we require both the Pool Key and the Station Index to create a Stream.

HTTP POST

POST /public/v2/pools/11917245-6a1d-4117-11c6-1237e94e03e1/stations/1/streams
Host: api.bitpool.com
Authorization: Bitpool2 00000000-0000-0000-0000-000000000000
Content-Type: application/json

{
  "LocalIndex": "TEST_STREAM_1",
  "StreamName": "TEST_STREAM_1",
  "Description": "My Test Stream",
  "Public": false,
  "DataType": "Double"
}

HTTP Response

{
    "StreamKey": "1238e79-ae23-42c0-b22a-672224c0aa00",
    "LocalIndex": "TEST_STREAM_1",
    "Name": "TEST_STREAM_1",
    "Description": "My Test Stream",
    "RegistrationDate": "/Date(1654820392000)/",
    "LastTimestamp": null,
    "FirstTimestamp": null,
    "LastValue": null,
    "FirstValue": null,
    "PoolKey": "11917245-6a1d-4117-11c6-1237e94e03e1",
    "Public": false,
    "Virtual": false,
    "VirtualType": "Default",
    "Recalculate": false,
    "Weather": false,
    "Owner": false,
    "StreamLogsCount": 0,
    "PostProcessingType": "None",
    "DataType": "Double"
}

4. Uploading Stream data

  • With the Stream created, we can now push data to Bitpool using the Key

  • A JSON array of objects containing mandatory 'Timestamp' and 'Value' properties will allow you to bulk upload interval data.

HTTP POST

POST /public/v2/streams/1238e79-ae23-42c0-b22a-672224c0aa00/logs
Host: api.bitpool.com
Authorization: Bitpool2 00000000-0000-0000-0000-000000000000
Content-Type: application/json

[
	{
	"Ts": "2022-06-10 10:00:00.000+00:00",
	"Val": 144498
	}, 
	{
	"Ts": "2022-06-10 10:15:00.000+00:00",
	"Val": 144500
	}
]

HTTP Response

"OK"

5. Downloading Stream data

  • Knowing the Stream Key will allow you to download interval data from Bitpool.

  • Review the API documentation to understand other features of this request - e.g. downloading aggregated data.

HTTP GET

GET /public/v2/streams/1238e79-ae23-42c0-b22a-672224c0aa00/logs?from=2022-05-09T03:13:00.000Z&to=2022-07-10T03:13:00.000Z&take=10&skip=0&postProcessIfAvailable=true&showDifference=false
Host: api.bitpool.com
Authorization: Bitpool2 00000000-0000-0000-0000-000000000000
Content-Type: application/json

{ }

HTTP Response

{
    "Data": [
        {
            "StreamKey": "1238e79-ae23-42c0-b22a-672224c0aa00",
            "Timestamp": "/Date(1654856100000)/",
            "Value": 144500.0,
            "ValueString": null,
            "Calculated": false
        },
        {
            "StreamKey": "1238e79-ae23-42c0-b22a-672224c0aa00",
            "Timestamp": "/Date(1654855200000)/",
            "Value": 144498.0,
            "ValueString": null,
            "Calculated": false
        }
    ],
    "Total": 2
}
How Bitpool Works