This document outlines the changes to the BitBrew management APIs and Dashboard application that will be released November 7, 2017. Changes should be carefully read and understood.

Table of Contents

Platform Changes

  • TLS Enabled Port

API Changes

  • Destinations

  • DynamoDB Destination

  • Keen Destination

  • Create Device Bulk

  • Remove Header VIN

  • New Device Attributes

  • PID UDP Data

  • Dynamo Re-Structure

Dashboard Changes

  • Tagging

  • Destinations

  • Remove Command Sets

Platform Changes

TLS Enabled Port

We now have an updated TLS-enabled port for queue connections. Please make the required changes to your URLs to connect to your queues.

Protocol: amqps
New port:
5671 

API Changes: Destinations

You can now assign additional destinations beyond the RabbitMQ internal queue.

New Endpoints

  • List Destinations 

[GET] /v1/tenants/{{tenantId}}/destinations

  • View Destination 

[GET] /v1/tenants/{{tenantId}}/destinations/destination-uuid

  • Update Destination 

[PUT] /v1/tenants/{{tenantId}}/destinations/destination-uuid

  • Delete Destination 

[DEL] /v1/tenants/{{tenantId}}/destinations/destination-uuid

DynamoDB Destination

You can now create a destination in your DyanmoDB table so that you can store and manage your data within AWS.

New Endpoints: Create DynamoDB Destination 

[POST] /v1/tenants/##{{tenantId}}/destinations/dynamodb 

Request Body

{
  "name": "my-dynamo-destination",
  "awsClientId": "Ar3F2dH7Egr3",
  "awsClientSecret": "sY4hRgi4EhY2In",
  "awsRegion": "us-east-2",
  "tableName": "table-name"
}

Response Body

{
    "name": "my-dynamo-destination",
    "id": "2c1875d0-8d36-4fe6-b400-d7fea9415e86",
    "awsRegion": "us-east-2",
    "tableName": "table-name",
    "awsClientId": "Ar3F2dH7Egr3",
    "type": "dynamodb"
}

Keen Destination

You can now utilize Keen as your destination in order to offer some data visualization tools.

New Endpoints Create Keen Destination 

[POST] /v1/tenants/##{{tenantId}}/destinations/keen

Request Body

{
  "name": "my-keen-destination",
  "keenProjectId": "59e64b84c9e77c00015738f9",
  "keenWriteKey": "CEBD4E9945D1302F37919E6534DF321ABCE3F6340B09E60471281490767729081279FF2A772A869451ED8AD8CBD0243B3017D64FD16CA0F30A022C8950965070FB261D406D9AC4896F4FCF95F02A97CAAD908E8B55F8BF129C892D3B460815C",
  "streamName": "streamName"
}

Response Body

{
    "name": "my-keen-destination",
    "keenProjectId": "59e64b84c9e77c00015738f9",
    "id": "62b94f7d-cf9d-4e3d-9c9d-479adfd57e01",
    "type": "keen",
    "streamName": "streamName"
}

Create Devices Bulk

We have updated the bulk device creation endpoint.

New Endpoints: Bulk Create Device 

[POST] /v1/tenants/{{tenantId}}/devices-bulk 

Request Body

{
  "devices": [
    {
      "deviceId": "1",
      "brokers": [
          {
              "type": "DanlawTcp",
              "imei": "1",
              "configurationFolderName": "cfgFolder",
              "firmwareFolderName": "fwFolder"
          },
          {
              "type": "DanlawUdp"
          }
      ],
      "tracing": "full",
      "enabled": true
    },{
      "deviceId": "2",
      "brokers": [
          {
              "type": "DanlawTcp",
              "imei": "2",
              "configurationFolderName": "cfgFolder",
              "firmwareFolderName": "fwFolder"
          },
          {
              "type": "DanlawUdp"
          }
      ],
      "tracing": "full",
      "enabled": true
    },{
      "deviceId": "3",
      "brokers": [
          {
              "type": "DanlawTcp",
              "imei": "3",
              "configurationFolderName": "cfgFolder",
              "firmwareFolderName": "fwFolder"
          },
          {
              "type": "DanlawUdp"
          }
      ],
      "tracing": "full",
      "enabled": true
    }
  ]
}

Remove Header VIN

We are removing the VIN field in the new event header since it is no longer being supported.

Response header.body.vin

{
  "header": {...},
  "body": {
    "header": {
      "imei": "354235053108415",
      "evtDataAvl": 1,
      "cfgVersion": "BBRTS.05",
-     "vin": "JM1BK343551221507",
      "swVersion": "07.46",
      "pctTripData": 1
    },
    "contents": {
      "command1": "NEW",
      "result": 0,
      "reportType": 3,
      "command2": "EVNT"
    }
  }
}

New Device Attributes

We have added a created at device attribute so that you can track when the device was created and will also return a Device List in order of creation starting with oldest first.

Response Body

{
    "tenantId": "somecompany",
    "devices": [
        {
            "tags": [
                {
                    "name": "hotstuff",
                    "id": "e9c735c6-684c-405c-b584-dcc62c9f5cb4",
                    "color": "#ff69b4"
                },
                {
                    "name": "Cool Tag 1",
                    "id": "05670e32-f681-4983-8a8d-0e2be1ea1ef6",
                    "color": "#ec7063"
                }
            ],
            "enabled": true,
+          "createdAt": "2016-04-09T19:58:37Z",
            "brokers": [
                {
                    "type": "DanlawUdp"
                }
            ],
            "tracing": "disabled",
            "deviceId": "test1"
        }
    ]
}

PID UDP Data

The PID number is now included in the body.eventType.pid message.

Response Body

{
    "body": {
        "footer": 237,
        "message": {
            "value": 135,
            "eventCount": 1,
            "eventType": {
                "reserved2": 0,
                "onChange": 1,
                "oncePerEvent": 0,
                "raisingEdge": 0,
                "oncePerTrip": 0,
+               "pid": 5,
                "periodic": 0,
                "reserved1": 0,
                "fallingEdge": 0,
                "type": "OBDPidEvent"
            },
            "type": "OBDPidAndVehicleBatteryEvent"
        },
        "header": {
            "timestamp": "2017-07-14T10:45:34-04:00",
            "latitude": 0,
            "tripType": "Trip",
            "vehicleProtocolId": "ISO15765_11_BIT_CAN",
            "longitude": 0,
            "messageType": 7,
            "odo": 53,
            "tripNumber": 14,
            "fixQuality": "FixInvalid",
            "messageLength": 8
        }
    },
    "header": {
        "tags": [
            "fulltracking"
        ],
        "messageId": "1868d190-68a3-11e7-bad5-9b5ba1ec0ecd",
        "brokerType": "DanlawUdp",
        "ingestionTimestamp": "2017-07-14T14:45:35.657Z",
        "tenantId": "cave-of-wonders",
        "deviceId": "6062161248"
    }
}

Dynamo Re-Structure

{
-  "brokerType": "DanlawUdp",
   "deviceId": "5032778596",
-  "ingestionTimestamp": 1509036188716,
+  "receivedAt": "2017-11-01T16:22:26.101Z"
   "message": ". . .",
   "messageId": "bf5236c0-ba6c-11e7-b7ad-a3a43e10852c",
-  "rule": "all-events-4",
+  "triggeredRule": "all-events-4",
   "tags": "tag1",
   "timestamp": 1509036189000
}

Tagging

You can now create tags for your devices and bulk tag them in your devices tab.

Manage your tags on your devices.

Destinations

You can now set destinations to use within the rule wizard.

Assign your destination per DynamoDB table.

Identify the appropriate table within the Set Your Destination step in the rule wizard.

Remove Command Sets

Now you do not need to select the standard command set when creating your devices.

Did this answer your question?