API Pengguna

logo-trackgps

Dokumentasi lengkap API dan parameter data untuk mengakses dan mengelola informasi pada aplikasi server GPS Tracking System trackgps.id.

Alert
Authentication
Command
Custom Event
Device
Device Media
Driver
Event
Geofence
GPRS Template
History
Map Icon
Report
Route
Sensor
Service
Sharing
SMS Template
Task

API Alerts

GET List Protocols

Mengambil seluruh data device protocol.

STRUKTUR PERINTAH
Method GET
Command get_protocols
Query Parameters
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/get_protocols?lang=[lang]&user_api_hash=[user_api_hash]
Contoh Respon
              
                                {
                                  "0": {
                                    "id": 0,
                                    "value": {
                                      "type": 1,
                                      "items": [
                                        {
                                          "id": "osmand",
                                          "value": "osmand"
                                        }
                                      ]
                                    }
                                  },
                                  "1": {
                                    "id": 1,
                                    "value": {
                                      "type": 2,
                                      "items": []
                                    }
                                  },
                                  "status": 1
                                }
                              

GET List Alerts

Mengambil seluruh data alerts.

STRUKTUR PERINTAH
Method GET
Command get_alerts
Query Parameters
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/get_alerts?lang=[lang]&user_api_hash[user_api_hash]
Contoh Respon
                                {
                                  "items": {
                                    "alerts": [
                                      {
                                        "id": 1,
                                        "name": "Test event",
                                        "email": "",
                                        "active": 1,
                                        "devices": [
                                          3
                                        ],
                                        "drivers": [],
                                        "user_id": 2,
                                        "ac_alarm": "0",
                                        "geofences": [
                                          1,
                                          2
                                        ],
                                        "created_at": "2016-04-29 17:34:07",
                                        "updated_at": "2016-04-29 19:06:23",
                                        "mobile_phone": "",
                                        "events_custom": [],
                                        "overspeed_speed": "110",
                                        "overspeed_distance": "1"
                                      }
                                    ]
                                  },
                                  "status": 1
                                }
                              

GET Add Alert Data

Mengambil data untuk membuat alerts.

STRUKTUR PERINTAH
Method GET
Command add_alert_data
Query Parameters
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/add_alert_data?lang=[lang]&user_api_hash[user_api_hash]
Contoh Respon
                                {
                                  "status": 1,
                                  "devices": [
                                    {
                                      "id": 3,
                                      "value": "Device name"
                                    }
                                  ],
                                  "drivers": [
                                    {
                                      "id": 1,
                                      "value": "Drive first"
                                    },
                                    {
                                      "id": 2,
                                      "value": "Second drive name"
                                    }
                                  ],
                                  "geofences": [
                                    {
                                      "id": 1,
                                      "value": "Test geo"
                                    }
                                  ],
                                  "alert_zones": [
                                    {
                                      "id": 1,
                                      "value": "Zone in"
                                    },
                                    {
                                      "id": 2,
                                      "value": "Zone out"
                                    }
                                  ],
                                  "event_types": [
                                    {
                                      "id": 1,
                                      "value": "Custom events"
                                    },
                                    {
                                      "id": 2,
                                      "value": "System events"
                                    }
                                  ],
                                  "alert_distance": [
                                    {
                                      "id": 1,
                                      "value": "km"
                                    },
                                    {
                                      "id": 2,
                                      "value": "mi"
                                    }
                                  ],
                                  "alert_fuel_type": [
                                    {
                                      "id": 1,
                                      "value": "L"
                                    },
                                    {
                                      "id": 2,
                                      "value": "Gal"
                                    }
                                  ],
                                  "event_protocols": [
                                    {
                                      "id": "-",
                                      "value": "- Protocol -"
                                    }
                                  ]
                                }
                              

POST Add Alert

Membuat data alert.

STRUKTUR PERINTAH
Method POST
Command add_alert
Query Parameters
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/add_alert?lang=[lang]&user_api_hash[user_api_hash]
Contoh Body
                                {
                                  "active": 0,
                                  "type": "string",
                                  "name": "string",
                                  "schedules": {},
                                  "notifications": {
                                    "color": {
                                      "active": 0,
                                      "input": "string"
                                    },
                                    "silent": {
                                      "active": 0,
                                      "input": 0
                                    },
                                    "sound": {
                                      "active": 0,
                                      "input": "string"
                                    },
                                    "popup": {
                                      "active": 0,
                                      "input": 0
                                    },
                                    "push": {
                                      "active": 0
                                    },
                                    "email": {
                                      "active": 0,
                                      "input": "string"
                                    },
                                    "webhook": {
                                      "active": 0,
                                      "input": "string"
                                    }
                                  },
                                  "command": {
                                    "active": 0,
                                    "type": "string"
                                  },
                                  "zone": 0,
                                  "zones": [
                                    0
                                  ],
                                  "drivers": [
                                    0
                                  ],
                                  "events_custom": [
                                    0
                                  ],
                                  "geofences": [
                                    0
                                  ],
                                  "pois": [
                                    0
                                  ],
                                  "overspeed": 0,
                                  "stop_duration": 0,
                                  "idle_duration": 0,
                                  "ignition_duration": 0,
                                  "offline_duration": 0,
                                  "move_duration": 0,
                                  "min_parking_duration": 0,
                                  "distance": 0,
                                  "distance_tolerance": 0
                                }
                              
Contoh Respon
                                {
                                  "status": 1
                                }
                              

GET Edit Alert Data

Mengambil data untuk mengedit alerts.

STRUKTUR PERINTAH
Method GET
Command add_alert_data
Query Parameters
alert_id integer
required
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/edit_alert_data?alert_id=[alert_id]⟨=[lang]&user_api_hash[user_api_hash]
Contoh Respon
                                  {
                                    "item": {
                                      "id": 0,
                                      "user_id": 0,
                                      "active": 0,
                                      "name": "string",
                                      "type": "string",
                                      "created_at": "string",
                                      "updated_at": "string",
                                      "devices": [
                                        0
                                      ],
                                      "drivers": [
                                        0
                                      ],
                                      "geofences": [
                                        0
                                      ],
                                      "events_custom": [
                                        0
                                      ],
                                      "zone": 0,
                                      "zones": [
                                        {}
                                      ],
                                      "schedule": true,
                                      "schedules": [
                                        {
                                          "id": "string",
                                          "title": "string",
                                          "items": [
                                            {
                                              "id": "string",
                                              "title": "string",
                                              "active": true
                                            }
                                          ]
                                        }
                                      ],
                                      "notifications": {
                                        "sound": {
                                          "active": true
                                        },
                                        "push": {
                                          "active": true
                                        },
                                        "email": {
                                          "active": true,
                                          "input": "string"
                                        },
                                        "sms": {
                                          "active": true,
                                          "input": "string"
                                        },
                                        "webhook": {
                                          "active": true,
                                          "input": "string"
                                        }
                                      },
                                      "command": {
                                        "active": true,
                                        "type": "string",
                                        "key": "string"
                                      }
                                    },
                                    "devices": [
                                      {
                                        "id": 0,
                                        "value": "string"
                                      }
                                    ],
                                    "geofences": [
                                      {
                                        "id": 0,
                                        "value": "string"
                                      }
                                    ],
                                    "alert_zones": [
                                      {
                                        "id": 0,
                                        "value": "string"
                                      }
                                    ],
                                    "types": [
                                      {
                                        "type": "string",
                                        "title": "string",
                                        "attributes": [
                                          {
                                            "name": "string",
                                            "type": "integer",
                                            "title": "string",
                                            "default": "string",
                                            "options": [
                                              {
                                                "id": "string",
                                                "value": "string"
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ],
                                    "notifications": [
                                      {
                                        "name": "string",
                                        "active": true,
                                        "title": "string",
                                        "input": "string",
                                        "description": "string"
                                      }
                                    ],
                                    "schedules": [
                                      {
                                        "id": "monday",
                                        "title": "string",
                                        "items": [
                                          {
                                            "id": "string",
                                            "title": "string",
                                            "active": true
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                

POST Edit Alert

Mengedit/Mengubah data alert.

STRUKTUR PERINTAH
Method POST
Command edit_alert
Query Parameters
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/edit_alert?lang=[lang]&user_api_hash[user_api_hash]
Contoh Body
                                  {
                                    "id": 0,
                                    "active": 0,
                                    "type": "string",
                                    "name": "string",
                                    "schedules": {},
                                    "notifications": {
                                      "color": {
                                        "active": 0,
                                        "input": "string"
                                      },
                                      "silent": {
                                        "active": 0,
                                        "input": 0
                                      },
                                      "sound": {
                                        "active": 0,
                                        "input": "string"
                                      },
                                      "popup": {
                                        "active": 0,
                                        "input": 0
                                      },
                                      "push": {
                                        "active": 0
                                      },
                                      "email": {
                                        "active": 0,
                                        "input": "string"
                                      },
                                      "webhook": {
                                        "active": 0,
                                        "input": "string"
                                      }
                                    },
                                    "command": {
                                      "active": 0,
                                      "type": "string"
                                    },
                                    "zone": 0,
                                    "zones": [
                                      0
                                    ],
                                    "drivers": [
                                      0
                                    ],
                                    "events_custom": [
                                      0
                                    ],
                                    "geofences": [
                                      0
                                    ],
                                    "pois": [
                                      0
                                    ],
                                    "overspeed": 0,
                                    "stop_duration": 0,
                                    "idle_duration": 0,
                                    "ignition_duration": 0,
                                    "offline_duration": 0,
                                    "move_duration": 0,
                                    "min_parking_duration": 0,
                                    "distance": 0,
                                    "distance_tolerance": 0
                                  }
                                
Contoh Respon
                                  {
                                    "status": 1
                                  }
                                

GET Destroy Alert

Menghapus data alert

STRUKTUR PERINTAH
Method GET
Command destroy_alert
Query Parameters
alert_id integer
required
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/destroy_alert?alert_id=[alert_id]⟨=[lang]&user_api_hash[user_api_hash]
Contoh Respon
                                  {
                                    "status": 1
                                  }
                                

GET Change Active Alert

Mengganti active status untuk data alert

STRUKTUR PERINTAH
Method GET
Command change_active_alert
Query Parameters
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/change_active_alert?lang=[lang]&user_api_hash[user_api_hash]
Contoh Body
                                  {
                                    "id": 0,
                                    "active": true
                                  }
                                
Contoh Respon
                                  Success
                                

GET Custom Events By Device

Mendapatkan custom events dari perangkat

STRUKTUR PERINTAH
Method GET
Command get_custom_events_by_device
Query Parameters
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/get_custom_events_by_device?lang=[lang]&user_api_hash=[user_api_hash]
Contoh Body
                                  {
                                    "devices": [0]
                                  }
                                
Contoh Respon
                                  [
                                    {
                                      "key": "string",
                                      "name": "string",
                                      "items": [
                                        {
                                          "id": 0,
                                          "value": "string"
                                        }
                                      ]
                                    }
                                  ]
                                

GET Set Alert Devices

Mengatur alert untuk perangkat

STRUKTUR PERINTAH
Method GET
Command set_alert_devices
Query Parameters
alert_id integer
required
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/set_alert_devices?alert_id=[alert_id]⟨=[lang]&user_api_hash=[user_api_hash]
Contoh Body
                                  {
                                    "devices": [0]
                                  }
                                
Contoh Respon
                                  Success
                                

GET Device Alerts

Mengambil data alert untuk perangkat tertentu

STRUKTUR PERINTAH
Method GET
Command devices/{device_id}/alerts
Path Parameters
device_id integer
required
Query Parameters
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/devices/{device_id}/alerts?lang=[lang]&user_api_hash=[user_api_hash]
Contoh Respon
                                  {
                                    "data": [
                                      {
                                        "id": 1,
                                        "name": "overspeed",
                                        "active": true,
                                        "date_to": null,
                                        "date_from": null
                                      }
                                    ],
                                    "pagination": {
                                      "total": 1,
                                      "per_page": 15,
                                      "last_page": 1,
                                      "current_page": 1
                                    }
                                  }
                                

POST Set Active Alerts

Mengatur kapan alert aktif dari atau/hingga

STRUKTUR PERINTAH
Method POST
Command devices/{device_id}/alerts/{alert_id}/time_period
Path Parameters
alert_id integer
required
device_id integer
required
Query Parameters
lang string
required
user_api_hash string
required
Struktur https://trackgps.id/api/devices/{device_id}/alerts/{alert_id}/time_period?lang=[lang]&user_api_hash=[user_api_hash]
Contoh Body
                                  {
                                    "date_from": "string",
                                    "date_to": "string"
                                  }
                                
Contoh Respon
                                  {
                                    "status": 1
                                  }
                                

GET Events by Protocol

Mengambil data event berdasarkan protokol

STRUKTUR PERINTAH
Method GET
Command get_events_by_protocol
Query Parameters
lang string
required
protocol string
required
type integer
required
user_api_hash string
required
Struktur https://trackgps.id/api/get_events_by_protocol?lang=[lang]&protocol=[protocol]&type=[type]&user_api_hash=[user_api_hash]
Contoh Respon
                                  {
                                    "0": {
                                      "id": 0,
                                      "title": {
                                        "id": 2,
                                        "title": "test",
                                        "value": "test"
                                      },
                                      "value": {
                                        "id": 2,
                                        "title": "test",
                                        "value": "test"
                                      }
                                    },
                                    "status": 1
                                  }
                                

GET Alert Types With Input Fields

Mengambil Jenis Alert Dengan Kolom Input Yang Diperlukan

STRUKTUR PERINTAH
Method GET
Command get_alerts_attributes
Query Parameters
Lang String
Required
User API Hash String
Required
Struktur https://trackgps.id/api/get_alerts_attributes?lang=[lang]&user_api_hash=[user_api_hash]
Contoh Respon
                                  {
                                    "status": 0,
                                    "types": [
                                      {
                                        "name": "string",
                                        "type": "string",
                                        "title": "string",
                                        "options": [
                                          {
                                            "id": "string",
                                            "title": "string"
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                

GET Alert Commands

Mengambil perintah alert

STRUKTUR PERINTAH
Method GET
Command get_alerts_commands
Query Parameters
Lang String
Required
User API Hash String
Required
Struktur https://trackgps.id/api/get_alerts_commands?lang=[lang]&user_api_hash=[user_api_hash]
Contoh Body
                                  {
                                    "alert_id": 0,
                                    "devices": [0],
                                    "selected_devices": [0]
                                  }
                                
Contoh Respon
                                  {
                                    "status": 200
                                  }
                                

GET Alerts Summary

Mengambil Ringkasan alert

STRUKTUR PERINTAH
Method GET
Command get_alerts_summary
Query Parameters
Lang String
Required
User API Hash String
Required
Struktur https://trackgps.id/api/get_alerts_summary?lang=[lang]&user_api_hash=[user_api_hash]
Contoh Respon
                                  {
                                    "status": 200,
                                    "message": "OK"
                                  }