Get endpoint data from INSIGHT API
After a successful Authentication, you can use Insight API to request data from ProGlove resources, such as Events endpoint.
To reach the resource endpoint use your Base URL.
Endpoint | HTTP method | Description |
---|---|---|
| GET | List of scan events. By default, returns scan events for the last 24 hours. |
To acquire data for a specific endpoint:
Make a
POST
Authentication request to get the Access Token.Make a
GET
request for the desired endpoint. (e.g.{BaseURL}/{customer_id}/devices
)Replace the
{BaseURL}
in the request with your Base URL.Add an HTTP Header Authorization and populate the Value field with the
AccessToken
from theAuthenticationResult
JSON object.Send request.
Note
In case of a 403 Forbidden
error, double-check for any extra strings in the Authorization header and Value.
Events endpoint
This endpoint provides access to all of your stored events. An event is not only a scan event - the type of event is specified in the response’s type
field.
Currently available event types: [scan, telemetry].
Scan events are process-critical events and 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
Because the number of events stored at once for a specific time window is unknown and can exceed the payload limits of an HTTP response, the events endpoint returns paginated data.
If the number of events in the specified time window is too high, the HTTP response will not contain all the requested events, 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 |