Contents

  1. General
  2. API methods
  3. Samples

General

General principle for clients is that the schema files are documentation over the data rather than a strict schema e.g. the clients need to handle new properties and the fact that enums could have values not matching schema.

Uses standard basic-auth for authorization

Additional api:s that may be needed Vehicles api
Retrive vehicles

API methods

/v1/SignalLogger/Records/TimeRangeAndVehicles

HTTP-method: POST
Gets file metadata (refered to as record)
Input:

    {
        "From": [required] Timestamp
        "To": [required] Timestamp
        "AllVehicles": boolean
        "Vehicles": array of strings, identifing vehicle filter (default: external-id)
    }
    
Response:

    {
        "Data":  array of SignalLoggerRecord
    }
    

/v1/SignalLogger/Records/Data

HTTP-method: POST
Expands files/records giving all the signals in it as json.
Input:

    {
        "Ids":  [required] array of strings
    }
Response:

    {
        "Data":  array of SignalLoggerData
    }

/v1/SignalLogger/Data/{id}

HTTP-method: GET/POST
Gets a single file as csv string (response type: text)

Simplified samples

SignalLoggerVehicleRecords


{
    "Data":  [
        {
            "Vehicle":  {
                            "ExternalId":  "1841"
                        },
            "Company":  {
                            "ExternalId":  "100000"
                        },
            "Records":  [
                            {
                                "Id":  "signals#3470299998#1600155382264#0#v1.log",
                                "Header":  {
                                            "SequenceNumber":  0,
                                            "StartTimestamp":  "2020-09-15T07:36:22.263+02:00",
                                            "EndTimestamp":  "2020-09-15T07:39:26.437+02:00"
                                        }
                            },
                            {
                                "Id":  "signals#3470299998#1600155567507#1#v1.log",
                                "Header":  {
                                            "SequenceNumber":  1,
                                            "StartTimestamp":  "2020-09-15T07:39:27.507+02:00",
                                            "EndTimestamp":  "2020-09-15T07:45:46.807+02:00"
                                        }
                            }
            ]
        }
    ]
}

SignalLoggerData


{
    "Data": [
        {
			"Id": "signals#3470299998#1600155382264#0#v1.log",
			"Header": {
				"SequenceNumber": 0,
				"StartTimestamp": "2020-09-15T07:36:22.263+02:00",
				"EndTimestamp": "2020-09-15T07:39:26.437+02:00"
			},
			"Vehicle": {
				"ExternalId": "1841"
			},
			"Company": {
				"ExternalId": "100000"
			},
			"Entries": [
				{
					"Timestamp": "2020-09-15T07:36:22.265+02:00",
					"Signals": [
						{
							"Name": "ABS_EBSAmberWarningSignal",
							"Value": "-1.0"
						},
						{
							"Name": "ATC_ASRInformationSignal",
							"Value": "-1.0"
						},
						{
							"Name": "HghRslutionTotalVehicleDistance",
							"Value": "-1.0"
						},
						{
							"Name": "RunMasterSw",
							"Value": "-1.0"
						},
						{
							"Name": "HvacPwr2",
							"Value": "-1.0"
						}
					]
				},
				{
					"Timestamp": "2020-09-15T07:39:26.436+02:00",
					"Signals": [
						{
							"Name": "UsureFrein",
							"Value": "-112.0"
						}
					]
				}
			]
		}
	]
}