IotHub
  1. device
IotHub
  • README
  • Update Record
  • token
    • createToken
      POST
    • destroyToken
      POST
  • customer
    • customerPage
      POST
    • customerTree
      POST
  • device
    • command
      • commandSend
      • commandInfoList
      • cutOilElectric
      • getConfig
    • devicePage
      POST
    • deviceTypes
      POST
    • deviceTypeInfo
      POST
    • deviceDataByDeviceIds
      POST
    • deviceDataByCustomerId
      POST
    • deviceTripInfoByTripId
      POST
    • deviceTripsByDeviceId
      POST
    • expandInfoByDeviceId
      POST
    • saveDeviceChannelName
      POST
  • fence
    • fencePage
      POST
    • fenceInfo
      POST
    • addFence
      POST
    • saveFence
      POST
    • delFence
      POST
    • fenceDevices
      POST
    • fenceDeviceUpdate
      POST
    • fenceDeviceDel
      POST
    • fenceDeviceAdd
      POST
  • push
    • README
  • video
    • H5 page
    • H5 Page-V2
    • liveVideo
    • playBackList
    • historicalUpload
    • playBack
    • replaySet
    • taskPage
    • taskDelete
    • getNodes
  • alarm
    • alarmTypeList
    • alarmFilePage
    • alarmFileByAlarmId
    • alarmHistoryPage
    • alarmPageByUser
  • audio
    • README
    • talk
    • talkPlus
  • gallery
    • filePageV2
    • filePage
    • deleteFile
    • capture
    • capturePage
  • fleet
    • faceRecordPage
  • gps
    • historyData
  • Protocol Analysis
    POST
  1. device

deviceTripsByDeviceId

Singapore
https://mettahub.mettaxiot.com/gps
Singapore
https://mettahub.mettaxiot.com/gps
POST
/v2/openapi/device/gpsTrip

Request

Header Params
Authorization
string 
required
Body Params application/json
deviceId
string  | null 
required
start
string  | null 
required
UTC = 0 yyyy-MM-dd HH:mm:ss
end
string  | null 
required
UTC = 0 yyyy-MM-dd HH:mm:ss
type
string  | null 
optional
1 gps 2lbs 3wifi
Can be used multiple times, separated can be empty, default all if not passed
Example
{
    "deviceId": "string",
    "start": "string",
    "end": "string",
    "type": "string"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mettahub.mettaxiot.com/gps/v2/openapi/device/gpsTrip' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "deviceId": "string",
    "start": "string",
    "end": "string",
    "type": "string"
}'

Responses

🟢200Success
application/json
Body
code
integer  | null 
optional
data
object (ApiDeviceGpsTripVO) 
optional
totalMileage
number  | null 
optional
totalTime
integer  | null 
optional
avgSpeed
number  | null 
optional
maxSpeed
number  | null 
optional
deviceData
array[object (ApiDeviceTripVO) {13}]  | null 
optional
msg
string  | null 
optional
Example
{
  "code": 0,
  "data": {
    "totalMileage": 0.0,
    "totalTime": 0,
    "avgSpeed": 0.0,
    "maxSpeed": 0.0,
    "deviceData": [
      {
        "tripId": "",
        "deviceId": "",
        "startTime": "",
        "startLat": 0.0,
        "startLon": 0.0,
        "pointType": "",
        "endTime": "",
        "endLat": 0.0,
        "endLon": 0.0,
        "totalTime": 0,
        "totalMileage": 0.0,
        "avgSpeed": 0.0,
        "maxSpeed": 0.0
      }
    ]
  },
  "msg": ""
}
Modified at 2025-06-17 03:08:51
Previous
deviceTripInfoByTripId
Next
expandInfoByDeviceId
Built with