api-title-realtime.png

MachineShop provides a set of highly robust, scalable, near real-time services specifically designed for integration of OT Systems and Devices to provide them RESTful API interfaces. API's provided include the ability to define, configure and receive information from these systems and devices without the need to update or change the communications protocol.

Representative samples of API’s available within our Data Collection services:

/data_source_types

As new types of devices are added to the MachineShop service data_source_types are defined via API. This structure allows for the definition of the data elements that will be reported or collected and exposed via normalized JSON.

Every data_source (or data endpoint) is required to be associated with a data_source_type to be ingested properly into the data collection services. When a data_source_type is created a unique ID is returned to be associated with a new instance of this data_source.

Information from the data_source_types can be used by the application to identify they JSON name/value pairs and structure of the device that will report as this type.

Creation of device_source_types is restricted to accounts with the Publisher id permission. Any downstream users under that publisher account will also inherit these data_source_types.

Methods available

  • GET - updates an existing data_source_type; Restricted to publisher accounts
  • PUT – creates a new data_source_type and returns a unique data_source_type ID. Restricted to publisher accounts
  • POST – returns all data_source_types available to this account
  • DELETE – deletes a data_source_type. Restricted to publisher accounts

Example: GET /data_source_typesView

[
  {
    "_id": "54cfb0386db0c9f9bf000109",
    "active": true,
    "created_at": "2015-02-02T17:13:28Z",
    "deleted_at": null,
    "last_known_translator_port": 10210,
    "long_description": "MachineShop IOS Application",
    "model": "IOS8",
    "name": "MachineShop iPhone App",
    "rule_ids": [],
    "translator": IOS8,
    "type": "iPhone",
    "updated_at": "2015-02-02T17:13:28Z",
    "user_id": "545998084433ab437c000050"
  },
  {
    "_id": "54cfaf5750e7b02180000107",
    "active": true,
    "created_at": "2015-02-02T17:09:43Z",
    "deleted_at": null,
    "last_known_translator_port": 10222,
    "long_description": "Quectel GL200 Tracker",
    "model": "GL200",
    "name": "Quectel GL200",
    "rule_ids": [],
    "translator": GL200,
    "type": "Tracker",
    "updated_at": "2015-02-02T17:09:43Z",
    "user_id": "545998084433ab437c000050"
  }
]

/data_sources

Description: For each endpoint that will be sending information to MachineShop's data collection services, a specific data_source must be defined. Once defined, the data_source will be assigned a unique ID, which will be used to gain information concerning this device.

Only data_source id’s associated with this user are allowed access to information concerning this device. The owner publisher account has the ability to view all data_source elements associated with its downstream accounts.

Query strings and associated endpoints can be called based on the data_source ID.

When making a GET call, the data collection services will return all the latest status data that has been reported from the requested data_source ID. Included in this report is a JSON array of normalized name/value pairs that represents the translated information from a data_source. Also included is the raw data that was received.

Additional information available includes applicable rules that are being evaluated based on this dats_source if the user has subscribed to the IQ set of API’s from MachineShop.

Methods available

  • GET – returns latest information and report about a specific data_source
  • PUT – Updates information on a data_source
  • POST – Create a new data_source, returns data_source unique ID
  • DELETE – delete a data_source

Example: GET /data_source_types View

[
[
    {
    "_id": "54b0236b6db0c93f580003b4",
    "_type": "V1::DataSource",
    "active": true,
    "auth_token": null,
    "created_at": "2015-01-09T18:52:27Z",
    "data_source_type_id": "54cfaf5750e7b02180000107",
    "iccid": "89011704252305659606",
    "name": "359464036002587",
    "rule_ids": [
      "54ca4e336db0c9e06700025d"
    ],
    "type": "data_sources",
    "updated_at": "2015-02-02T17:11:00Z",
    "user_id": "54a6025050e7b0d4de0008f7",
    "data_source_type": {
      "_id": "54cfaf5750e7b02180000107",
      "active": true,
      "name": "Quectel GL200",
      "model": "GL200",
      "type": "Tracker",
      "long_description": " Quectel GL200 Tracker ",
      "user_id": "545998084433ab437c000050",
      "last_known_translator_port": 10222,
      "updated_at": "2015-02-02T17:09:43Z",
      "created_at": "2015-02-02T17:09:43Z"
    },
    "last_report": {
      "_id": "54cfccf16db0c9f9bf00011b",
      "created_at": "2015-01-29T16:38:35Z",
      "data_source_datetime": "2015-01-29T16:44:46+00:00",
      "data_source_id": "54b0236b6db0c93f580003b4",
      "deleted_at": null,
      "duplicate": false,
      "edge_data_source_name": null,
      "payload": {
        "report_id": 0,
        "report_type": 0,
        "number": 1,
        "gps_accuracy": 5,
        "speed": 0,
        "azimuth": 0,
        "altitude": 45.2,
        "longitude": -71.056763,
        "latitude": 42.350171,
        "gps_utc_time": "2015-01-29T16:44:33Z",
        "mcc": 310,
        "mnc": 410,
        "lac": 177,
        "cell_id": 5855,
        "odo_milege": "",
        "battery_percentage": 76,
        "send_time": "2015-01-29T16:44:46Z",
        "count_number": "E746",
        "tail_character": "$"
      },
      "profile_timestamps": {
        "data_source": "2015-01-29 16:44:46.000 UTC",
        "worker": "2015-01-29 16:38:35.413 UTC"
      },
      "raw_data": "+RESP:GTFRI/ 020109/ 359464036002587/ / 0/ 0/ 1/ 5/ 0.0/ 0/ 45.2/ -71.056763/ 42.350171/ 20150129164433/ 0310/ 0410/ 177F/ 5855/ / 76/ 20150129164446/ E746/ $",
      "report_processor": "java",
      "stale": false,
      "updated_at": "2015-01-29T16:38:35Z"
    },
    "report_count": 1967
  },
  {
    "_id": "54aee18750e7b04e6d0001b7",
    "_type": "V1::DataSource",
    "active": true,
    "auth_token": null,
    "created_at": "2015-01-08T19:59:03Z",
    "data_source_type_id": "54cfb0386db0c9f9bf000109",
    "name": "Greg IPhone",
    "type": "data_sources",
    "updated_at": "2015-02-02T17:14:10Z",
    "user_field": "data_sources",
    "user_id": "54a6025050e7b0d4de0008f7",
    "data_source_type": {
      "_id": "54cfb0386db0c9f9bf000109",
      "active": true,
      "name": "MachineShop iPhone App",
      "model": "IOS8",
      "type": "iPhone",
      "long_description": " MachineShop IOS Application ",
      "user_id": "545998084433ab437c000050",
      "last_known_translator_port": 10210,
      "updated_at": "2015-02-02T17:13:28Z",
      "created_at": "2015-02-02T17:13:28Z"
    },
    "last_report": {
      "_id": "54cfccf16db0c9f9bf00011c",
      "created_at": "2015-02-02T16:47:57Z",
      "data_source_datetime": "2015-02-02T04:48:17+00:00",
      "data_source_id": "54aee18750e7b04e6d0001b7",
      "deleted_at": null,
      "duplicate": false,
      "edge_data_source_name": null,
      "payload": {
        "temp": 71,
        "location": {
          "longitude": -92.90993,
          "latitude": 34.65049
        }
      },
      "profile_timestamps": {
        "data_source": "2015-02-02 04:48:17.000 UTC",
        "worker": "2015-02-02 16:47:57.105 UTC",
        "platform": "2015-02-02 16:50:44.000 UTC"
      },
      "raw_data": "arbitrary_raw_data",
      "report_processor": "java",
      "stale": false,
      "updated_at": "2015-02-02T16:47:57Z"
    },
    "report_count": 54
  }
]

MachineShop’s Ecosystem

Join the growing network of organizations leveraging Connected Services

Get Started
As Seen in