Skip to content

Getting Data from the ProGlove API

After successful authentication, you can use the ProGlove API to request data from ProGlove resources such as:

  • Devices
  • Gateways
  • Events.

Each of these resources has its own endpoint reachable using your Base URL.

Endpoint HTTP method Description
/{customer_id}/devices GET List of scanner devices.
/{customer_id}/gateways GET List of gateways.
/{customer_id}/events GET List of scan events.
By default, returns scan events for the last 24 hours.

Note: Make sure to add an HTTP Header field Authorization to the JWT token acquired during login.

Devices Endpoint

A device is not neccessarily a scanner (MARK) but any wearable device. For every customer, the system maintains a dedicated resource to store all devices used at least once.

GET Request

{BaseURL}/{customer_id}/devices

JSON Response

{
  "items": [
    {
      "id": "M2MR101000000",
      "class": "device",
      "created": 1557220259,
      "last_activity_time": 1557220259,
      "last_updated": 1557220259,
      "battery": 93,
      "firmware": "0.0.1",
      "model": "Mark",
      "manufacturer": "Workaround GmbH",
      "status": "ACTIVE",
      "version": 1
    }
  ],
  "links": {
    "next": "/devices?next_token=11234"
  },
  "metadata": {
    "description": "string",
    "size": 23,
    "filters": [
      {
        "name": "start_time_millis",
        "value": 1557220259
      }
    ]
  }
}

Error Codes

HTTP error code reason
200 OK
400 Malformed request
401 No authentication header found
403 Access denied
500 Internal Server Error

Gateways Endpoint

A Gateway is a ProGlove Cloud authenticated device which connects to the cloud and devices (wearables), and sends the events coming from devices to the cloud. Gateways are configured to have a name and a use case in order to filter events coming from devices.

GET Request

{BaseURL}/{customer_id}/gateways

JSON Response

{
  "items": [
    {
      "id": "919ebc9d-9788-4f08-93db-e238c5eaa69a",
      "class": "gateway",
      "model": "Samsung Galaxy S8",
      "manufacturer": "Proglove",
      "type": "stationary",
      "firmware": "0.0.1",
      "created": 1557220259,
      "last_updated": 1557220259,
      "usecase": "Picking",
      "station": "Station 3",
      "name": "Joe's android"
    }
  ],
  "links": {
    "next": "/gateways?next_token=11234"
  },
  "metadata": {
    "description": "string",
    "size": 23,
    "filters": [
      {
        "name": "start_time_millis",
        "value": 1557220259
      }
    ]
  }
}

Error Codes

HTTP error code reason
200 OK
400 Malformed request
401 No authentication header found
403 Access denied
500 Internal Server Error

Events Endpoint

This endpoint provides access to all of your stored events. An event is not necessarily a scan event: the type of event is specified inside the response in the type field. Currently available event types: [scan, telemetry] Typically the scan events are process-critical events. Also, scans typically have some telemetry attached to them.

To learn more about Events endpoint (e.g. how to pass start/end date), see Events Calls under API Specification.

Pagination

Since the amount of events stored at a time for a specific time window is unknown and can easily exceed the payload limits of an HTTP response, this ProGlove endpoint returns paginated data. If the amount of events in the specified time window is too high, the HTTP response will not contain all the events asked for, but will provide a link so you can call again to receive the rest of the data.

GET Request

{BaseURL}/{customer_id}/events

JSON Response

{
  "items": [
    {
      "id": "919ebc9d-9788-4f08-93db-e238c5eaa69a",
      "type": "scan",
      "created": 1557220259,
      "scan_code": "1234567890",
      "scan_decode_symbology": "EAN-13",
      "device_id": "M2MR101000000",
      "device_battery": 93,
      "device_firmware": "v2.0.1",
      "gateway_id": "919ebc9d-9788-4f08-93db-e238c5eaa69a",
      "metrics_worker_steps": 7,
      "scan_duration": 0.27
    }
  ],
  "links": {
    "next": "${NEXT_TOKEN}"
  },
  "metadata": {
    "description": "string",
    "size": 23,
    "filters": [
      {
        "name": "start_time_millis",
        "value": 1557220259
      }
    ]
  }
}

Error Codes

HTTP error code reason
200 OK
400 Malformed request
401 No authentication header found
403 Access denied
500 Internal Server Error