IotHub
  1. device
IotHub
  • README
  • 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
    • deviceTraffic
      POST
    • deviceSensorData
      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&Webhook
    • README
  • video
    • H5 page
    • H5 Page-V2
    • history
      • README
      • playBackList
      • historicalUpload
      • playBack
      • replaySet
      • taskPage
      • taskStop
      • taskDelete
    • live
      • liveVideo
      • liveVideoControl
    • getNodes
  • alarm
    • Alert Types
    • alarmTypeList
    • alarmFilePage
    • alarmFileByAlarmId
    • alarmHistoryPage
    • alarmPageByUser
  • audio
    • README
    • talk「Deprecated」
    • talkPlus
  • gallery
    • filePageV2
    • filePage
    • deleteFile
    • capture
    • capturePage
    • captureRecord
  • fleet
    • faceRecordPage
    • rfidPage
  • gps
    • historyData
  • Protocol Analysis
    POST
  1. device

deviceTripsByDeviceId

POST
/v2/openapi/device/gpsTrip

Request

Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Header Params

Body Params application/json

Example
{
    "deviceId": "string",
    "start": "string",
    "end": "string",
    "type": "string"
}

Request Code 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: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "deviceId": "string",
    "start": "string",
    "end": "string",
    "type": "string"
}'

Responses

🟢200Success
application/json
Body

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-11-06 09:29:50
Previous
deviceTripInfoByTripId
Next
deviceTraffic
Built with