Please enable JavaScript to view this website.

Skip to main content

Data Logger APIs

How to call the Data Logger APIs to submit MDL Data Logs

Initialize Session

To start the upload process, first you need to create a sequence ID for the upload.

Perform a POST to the v2/buffered/create endpoint:

https://tooldata-api.milwaukeetool.com/tooldata/v2/buffered/create

Sample body:

{
"mpbid": "FFFF000000",
"memoryMapVersion": 1
}

You will get a response containing the sequence ID used for future calls:

{
"mpbid": "FFFF000000",
"sequenceId": 1234,
"lastSequentialReadApplication": 0,
"lastRealtimeReadApplication": 0
}

Upload Data Logs

With that sequence ID, upload your data logs using POSTs to the buffered data endpoint, filling in MPBID/sequenceID with the correct values.

https://tooldata-api.milwaukeetool.com/buffered/v1/{mpbid}/{sequenceId}

Sample body:

{
"mpbid": "FFFF000000",
"generation": "4",
"dataType": "sequential",
"sequenceId": 1234,
"userId": "adam.irmischer",
"source": "QuickLink-Web",
"timestamp": 123456890,
"totalEvents": 3,
"variableDefinitions": [
{
"id" : 156,
"length": 1
},
{
"id" : 157,
"length": 1
},
{
"id" : 158,
"length": 1
},
{
"id" : 159,
"length": 1
},
{
"id" : 160,
"length": 2
}
],
"data": [
{
"applicationId": 123,
"data": [22, 34, 156, 47, 23, 199]
},
{
"applicationId": 124,
"data": [22, 34, 156, 47, 23, 199]
},
{
"applicationId": 125,
"data": [22, 34, 156, 47, 23, 199]
}
]
}

The data array for each application is a set of bytes, ordered by the sequence of variable definitions. You should have a number of entries for each application matching the total length fields across the set of variable definitions.

Upload Limitations

Each individual call to upload data logs is limited to 10 MB. If you need to upload additional data, you will need to break that up into multiple calls.

Finalize Data Log Upload

Once you have finished uploading data, you must make a PUT call to the v1/buffered/create endpoint to finalize the data upload session.

This will trigger processing of the data. If this is not called, the session will remain open until the call is made!

https://tooldata-api.milwaukeetool.com/tooldata/v1/buffered/create

Sample body:

{
"mpbid": "FFFF000000",
"sequenceId": 1234
}