# Traccar Traccar GPS tracking server API documentation. To use the API you need to have a server instance. For testing purposes you can use one of free [demo servers](https://www.traccar.org/demo-server/). For production use you can install your own server or get a [subscription service](https://www.traccar.org/product/tracking-server/). Version: 6.10.0 License: Apache 2.0 ## Servers Doha Dynamics API (Production) ``` https://mygpsapi.com/api ``` Variables: - `host` Default: "localhost" - `port` Default: "8082" Enum: "8082", "80" ## Security ### BasicAuth Type: http Scheme: basic ### ApiKey Type: http Scheme: bearer ## Download OpenAPI description [Traccar](https://docs2.mygpsapi.com/_bundle/openapi.yaml) ## Server Server information ### Fetch Server information - [GET /server](https://docs2.mygpsapi.com/openapi/server/paths/~1server/get.md) ### Update Server information - [PUT /server](https://docs2.mygpsapi.com/openapi/server/paths/~1server/put.md) ## Session User session management ### Fetch Session information - [GET /session](https://docs2.mygpsapi.com/openapi/session/paths/~1session/get.md) ### Create a new Session - [POST /session](https://docs2.mygpsapi.com/openapi/session/paths/~1session/post.md) ### Close the Session - [DELETE /session](https://docs2.mygpsapi.com/openapi/session/paths/~1session/delete.md) ### Fetch Session information - [GET /session/openid/auth](https://docs2.mygpsapi.com/openapi/session/paths/~1session~1openid~1auth/get.md) ### OpenID Callback - [GET /session/openid/callback](https://docs2.mygpsapi.com/openapi/session/paths/~1session~1openid~1callback/get.md) ## Devices Device management ### Fetch a list of Devices - [GET /devices](https://docs2.mygpsapi.com/openapi/devices/paths/~1devices/get.md): Without any params, returns a list of the user's devices ### Create a Device - [POST /devices](https://docs2.mygpsapi.com/openapi/devices/paths/~1devices/post.md) ### Update a Device - [PUT /devices/{id}](https://docs2.mygpsapi.com/openapi/devices/paths/~1devices~1%7Bid%7D/put.md) ### Delete a Device - [DELETE /devices/{id}](https://docs2.mygpsapi.com/openapi/devices/paths/~1devices~1%7Bid%7D/delete.md) ### Update total distance and hours of the Device - [PUT /devices/{id}/accumulators](https://docs2.mygpsapi.com/openapi/devices/paths/~1devices~1%7Bid%7D~1accumulators/put.md) ## Groups Group management ### Fetch a list of Groups - [GET /groups](https://docs2.mygpsapi.com/openapi/groups/paths/~1groups/get.md): Without any params, returns a list of the Groups the user belongs to ### Create a Group - [POST /groups](https://docs2.mygpsapi.com/openapi/groups/paths/~1groups/post.md) ### Update a Group - [PUT /groups/{id}](https://docs2.mygpsapi.com/openapi/groups/paths/~1groups~1%7Bid%7D/put.md) ### Delete a Group - [DELETE /groups/{id}](https://docs2.mygpsapi.com/openapi/groups/paths/~1groups~1%7Bid%7D/delete.md) ## Users User management ### Fetch a list of Users - [GET /users](https://docs2.mygpsapi.com/openapi/users/paths/~1users/get.md) ### Create a User - [POST /users](https://docs2.mygpsapi.com/openapi/users/paths/~1users/post.md) ### Update a User - [PUT /users/{id}](https://docs2.mygpsapi.com/openapi/users/paths/~1users~1%7Bid%7D/put.md) ### Delete a User - [DELETE /users/{id}](https://docs2.mygpsapi.com/openapi/users/paths/~1users~1%7Bid%7D/delete.md) ## Permissions User permissions and other object linking ### Link an Object to another Object - [POST /permissions](https://docs2.mygpsapi.com/openapi/permissions/paths/~1permissions/post.md) ### Unlink an Object from another Object - [DELETE /permissions](https://docs2.mygpsapi.com/openapi/permissions/paths/~1permissions/delete.md) ## Positions Retrieving raw location information ### Fetches a list of Positions - [GET /positions](https://docs2.mygpsapi.com/openapi/positions/paths/~1positions/get.md): We strongly recommend using Traccar WebSocket API instead of periodically polling positions endpoint. Without any params, it returns a list of last known positions for all the user's Devices. _from_ and _to_ fields are not required with _id_. ### Deletes all the Positions of a device in the time span specified - [DELETE /positions](https://docs2.mygpsapi.com/openapi/positions/paths/~1positions/delete.md) ### Delete a Position - [DELETE /positions/{id}](https://docs2.mygpsapi.com/openapi/positions/paths/~1positions~1%7Bid%7D/delete.md) ## Events Retrieving event information ### /events/{id} - [GET /events/{id}](https://docs2.mygpsapi.com/openapi/events/paths/~1events~1%7Bid%7D/get.md) ## Reports Reports generation ### Fetch a list of Positions within the time period for the Devices or Groups - [GET /reports/route](https://docs2.mygpsapi.com/openapi/reports/paths/~1reports~1route/get.md): At least one _deviceId_ or one _groupId_ must be passed ### Fetch a list of Events within the time period for the Devices or Groups - [GET /reports/events](https://docs2.mygpsapi.com/openapi/reports/paths/~1reports~1events/get.md): At least one _deviceId_ or one _groupId_ must be passed ### Fetch a list of ReportSummary within the time period for the Devices or Groups - [GET /reports/summary](https://docs2.mygpsapi.com/openapi/reports/paths/~1reports~1summary/get.md): At least one _deviceId_ or one _groupId_ must be passed ### Fetch a list of ReportTrips within the time period for the Devices or Groups - [GET /reports/trips](https://docs2.mygpsapi.com/openapi/reports/paths/~1reports~1trips/get.md): At least one _deviceId_ or one _groupId_ must be passed ### Fetch a list of ReportStops within the time period for the Devices or Groups - [GET /reports/stops](https://docs2.mygpsapi.com/openapi/reports/paths/~1reports~1stops/get.md): At least one _deviceId_ or one _groupId_ must be passed ## Notifications User notifications management ### Fetch a list of Notifications - [GET /notifications](https://docs2.mygpsapi.com/openapi/notifications/paths/~1notifications/get.md): Without params, it returns a list of Notifications the user has access to ### Create a Notification - [POST /notifications](https://docs2.mygpsapi.com/openapi/notifications/paths/~1notifications/post.md) ### Update a Notification - [PUT /notifications/{id}](https://docs2.mygpsapi.com/openapi/notifications/paths/~1notifications~1%7Bid%7D/put.md) ### Delete a Notification - [DELETE /notifications/{id}](https://docs2.mygpsapi.com/openapi/notifications/paths/~1notifications~1%7Bid%7D/delete.md) ### Fetch a list of available Notification types - [GET /notifications/types](https://docs2.mygpsapi.com/openapi/notifications/paths/~1notifications~1types/get.md) ### Send test notification to current user via Email and SMS - [POST /notifications/test](https://docs2.mygpsapi.com/openapi/notifications/paths/~1notifications~1test/post.md) ## Geofences Geofence management ### Fetch a list of Geofences - [GET /geofences](https://docs2.mygpsapi.com/openapi/geofences/paths/~1geofences/get.md): Without params, it returns a list of Geofences the user has access to ### Create a Geofence - [POST /geofences](https://docs2.mygpsapi.com/openapi/geofences/paths/~1geofences/post.md) ### Update a Geofence - [PUT /geofences/{id}](https://docs2.mygpsapi.com/openapi/geofences/paths/~1geofences~1%7Bid%7D/put.md) ### Delete a Geofence - [DELETE /geofences/{id}](https://docs2.mygpsapi.com/openapi/geofences/paths/~1geofences~1%7Bid%7D/delete.md) ## Commands Sending commands to devices and stored command management ### Fetch a list of Saved Commands - [GET /commands](https://docs2.mygpsapi.com/openapi/commands/paths/~1commands/get.md): Without params, it returns a list of Saved Commands the user has access to ### Create a Saved Command - [POST /commands](https://docs2.mygpsapi.com/openapi/commands/paths/~1commands/post.md) ### Update a Saved Command - [PUT /commands/{id}](https://docs2.mygpsapi.com/openapi/commands/paths/~1commands~1%7Bid%7D/put.md) ### Delete a Saved Command - [DELETE /commands/{id}](https://docs2.mygpsapi.com/openapi/commands/paths/~1commands~1%7Bid%7D/delete.md) ### Fetch a list of Saved Commands supported by Device at the moment - [GET /commands/send](https://docs2.mygpsapi.com/openapi/commands/paths/~1commands~1send/get.md): Return a list of saved commands linked to Device and its groups, filtered by current Device protocol support ### Dispatch commands to device - [POST /commands/send](https://docs2.mygpsapi.com/openapi/commands/paths/~1commands~1send/post.md): Dispatch a new command or Saved Command if _body.id_ set ### Fetch a list of available Commands for the Device or all possible Commands if Device ommited - [GET /commands/types](https://docs2.mygpsapi.com/openapi/commands/paths/~1commands~1types/get.md) ## Attributes Computed attributes management ### Fetch a list of Attributes - [GET /attributes/computed](https://docs2.mygpsapi.com/openapi/attributes/paths/~1attributes~1computed/get.md): Without params, it returns a list of Attributes the user has access to ### Create an Attribute - [POST /attributes/computed](https://docs2.mygpsapi.com/openapi/attributes/paths/~1attributes~1computed/post.md) ### Update an Attribute - [PUT /attributes/computed/{id}](https://docs2.mygpsapi.com/openapi/attributes/paths/~1attributes~1computed~1%7Bid%7D/put.md) ### Delete an Attribute - [DELETE /attributes/computed/{id}](https://docs2.mygpsapi.com/openapi/attributes/paths/~1attributes~1computed~1%7Bid%7D/delete.md) ## Drivers Drivers management ### Fetch a list of Drivers - [GET /drivers](https://docs2.mygpsapi.com/openapi/drivers/paths/~1drivers/get.md): Without params, it returns a list of Drivers the user has access to ### Create a Driver - [POST /drivers](https://docs2.mygpsapi.com/openapi/drivers/paths/~1drivers/post.md) ### Update a Driver - [PUT /drivers/{id}](https://docs2.mygpsapi.com/openapi/drivers/paths/~1drivers~1%7Bid%7D/put.md) ### Delete a Driver - [DELETE /drivers/{id}](https://docs2.mygpsapi.com/openapi/drivers/paths/~1drivers~1%7Bid%7D/delete.md) ## Maintenance Maintenance management ### Fetch a list of Maintenance - [GET /maintenance](https://docs2.mygpsapi.com/openapi/maintenance/paths/~1maintenance/get.md): Without params, it returns a list of Maintenance the user has access to ### Create a Maintenance - [POST /maintenance](https://docs2.mygpsapi.com/openapi/maintenance/paths/~1maintenance/post.md) ### Update a Maintenance - [PUT /maintenance/{id}](https://docs2.mygpsapi.com/openapi/maintenance/paths/~1maintenance~1%7Bid%7D/put.md) ### Delete a Maintenance - [DELETE /maintenance/{id}](https://docs2.mygpsapi.com/openapi/maintenance/paths/~1maintenance~1%7Bid%7D/delete.md) ## Calendars Calendar management ### Fetch a list of Calendars - [GET /calendars](https://docs2.mygpsapi.com/openapi/calendars/paths/~1calendars/get.md): Without params, it returns a list of Calendars the user has access to ### Create a Calendar - [POST /calendars](https://docs2.mygpsapi.com/openapi/calendars/paths/~1calendars/post.md) ### Update a Calendar - [PUT /calendars/{id}](https://docs2.mygpsapi.com/openapi/calendars/paths/~1calendars~1%7Bid%7D/put.md) ### Delete a Calendar - [DELETE /calendars/{id}](https://docs2.mygpsapi.com/openapi/calendars/paths/~1calendars~1%7Bid%7D/delete.md) ## Statistics Retrieving server statistics ### Fetch server Statistics - [GET /statistics](https://docs2.mygpsapi.com/openapi/statistics/paths/~1statistics/get.md)