Get all vehicles Details from GPS vendor multi-level API

Introduction

This API is used to get the vehicle location data from the GPS vendor for multiple levels (pages) based on the index or page number it is used to debug GPS tracking issues for Loconav and Wheelseye.

Add Vehicle Locations API End Point

DO not use this API on production it will run the loop unitil all pages or level not complete and it will consume more memory of system.

Request

Request Parameters

Name

Type

Location

Description

Example

Name

Type

Location

Description

Example

Authorization

string

headers

JWT token required to authenticate API call.

Authorization: Bearer eyJhbGciOiJIUzI1Ni

Input body attributes

Name

Type

Required

Description

Example

Name

Type

Required

Description

Example

url

String

True

GPS Vendor URL withaout pageno. or index details

“https://loconav.com/api/v3/device/all_devices”

method

String

True

Http method of above URL

“GET“

headers

Object

Optional

Http header’s can pass Authorization details

{
"Content-Type": "application/json"
}

query

Object

Optional

It is an onject which contain the all pagination details

{

"key_1": "start_index",

"key_2": "end_index",

"page_size": 100
}

key_1

String

True

name of 1st index. like page_No,

"key_1": "start_index",

key_2

String

Optional

Name of 2nd index in case of two index API like start_index, end_index

"key_2": "end_index",

page_size

Number

True

The number of record you need in per level default 100

"page_size": 100

dataPath

String

Optional

Path of location data Object with comma (.) seprated if response is in array pass it as empty (““)

"dataPath": "data.list"

Request Body

There are two request payloads based on the Vendor API behavior given below

  1. Single query params like pageNo.

  2. Multiple query params like start_index and end index

Single query params:-

Example Request Body
{ "url": "https://api.wheelseye.com/currentLoc?accessToken=5d3f8dcc-5e2a-48c8-ab20-9f4c14a922fd&isLocationReq=true", "method": "GET", "headers": {}, "query": { "key_1": "pageNo", "page_size": 0 }, "dataPath": "data.list" }

Multiple query params:-

Example Request Body
{ "url": "https://loconav.com/api/v3/device/all_devices", "method": "GET", "headers": { "Authorization": "uph_sQE9ZeGAxvrDWTkz" }, "query": { "key_1": "start_index", "key_2": "end_index", "page_size": 100 }, "dataPath": "" }

Postman collection

Please find the link given below for the postman collection click Here …

High-Level Process Flow

  1. The API accepts data in array as well as object format an array of vehicles and their last known locations

  2. API insert data of the vehicles and their last known locations in a temporary table

  3. The location data in a temporary table is consumed by FT Location Service.

Responses

Status Code - 200

[ { "vehicleNumber": "RJ14GJ6524", "deviceNumber": "358735072291270", "vendorCode": "WE419130", "venndorName": "Mustak Khan", "latitude": 16.41063888888889, "longitude": 74.37263555555555, "speed": 31, "createdDate": 1668073949, "createdDateReadable": "10 Nov, 2022, 03:22 PM", "location": "PARVATI NANDAN, NIPANI BYPASS, PRATIBHA NAGAR, NIPANI, KARNATAKA. 122 M FROM SBM TOILET, PIN-591237 (INDIA)", "provider": "WHEELSEYE", "vehicleType": "Open", "ignition": true, "dttime": "10 Nov, 2022, 03:22 PM", "dttimeInEpoch": 1668073949, "angle": 196, "chargeOn": true, "accurate": false }, { "vehicleNumber": "RJ14GJ4727", "deviceNumber": "358735072788135", "vendorCode": "WE419130", "venndorName": "Mustak Khan", "latitude": 34.229637777777775, "longitude": 74.49639111111111, "speed": 0, "createdDate": 1668073930, "createdDateReadable": "10 Nov, 2022, 03:22 PM", "location": "NH 1, RENJI, KHOIE, BARAMULLA DISTRICT, JAMMU & KASHMIR. 206 M FROM COMMON SERVICE CENTRE, PIN-193201 (INDIA)", "provider": "WHEELSEYE", "vehicleType": "Open", "ignition": false, "dttime": "10 Nov, 2022, 03:22 PM", "dttimeInEpoch": 1668073930, "angle": 125, "chargeOn": true, "accurate": false }......]

 

 

Post your questions in the comment box to get answers from the experts who watch this page.

For engineering support: visit FT Support