Skip to content

Traccar (6.10.0)

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. For production use you can install your own server or get a subscription service.

Download OpenAPI description
Overview
Languages
Servers
Mock server
https://docs2.mygpsapi.com/_mock/openapi
Doha Dynamics API (Production)
https://mygpsapi.com/api

Server

Server information

Operations

Session

User session management

Operations

Devices

Device management

Operations

Groups

Group management

Operations

Users

User management

Operations

Permissions

User permissions and other object linking

Operations

Positions

Retrieving raw location information

Operations

Events

Retrieving event information

Operations

Reports

Reports generation

Operations

Notifications

User notifications management

Operations

Geofences

Geofence management

Operations

Fetch a list of Geofences

Request

Without params, it returns a list of Geofences the user has access to

Security
BasicAuth or ApiKey
Query
allboolean

Can only be used by admins or managers to fetch all entities

userIdinteger

Standard users can use this only with their own userId

deviceIdinteger

Standard users can use this only with _deviceId_s, they have access to

groupIdinteger

Standard users can use this only with _groupId_s, they have access to

refreshboolean
curl -i -X GET \
  -u <username>:<password> \
  'https://docs2.mygpsapi.com/_mock/openapi/geofences?all=true&userId=0&deviceId=0&groupId=0&refresh=true'

Responses

OK

Bodyapplication/jsonArray [
idinteger(int64)
namestring
descriptionstring
areastring
calendarIdinteger(int64)
attributesobject
]
Response
application/json
[ { "id": 0, "name": "string", "description": "string", "area": "string", "calendarId": 0, "attributes": {} } ]

Create a Geofence

Request

Security
BasicAuth or ApiKey
Bodyapplication/jsonrequired
idinteger(int64)
namestring
descriptionstring
areastring
calendarIdinteger(int64)
attributesobject
curl -i -X POST \
  -u <username>:<password> \
  https://docs2.mygpsapi.com/_mock/openapi/geofences \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 0,
    "name": "string",
    "description": "string",
    "area": "string",
    "calendarId": 0,
    "attributes": {}
  }'

Responses

OK

Bodyapplication/json
idinteger(int64)
namestring
descriptionstring
areastring
calendarIdinteger(int64)
attributesobject
Response
application/json
{ "id": 0, "name": "string", "description": "string", "area": "string", "calendarId": 0, "attributes": {} }

Update a Geofence

Request

Security
BasicAuth or ApiKey
Path
idintegerrequired
Bodyapplication/jsonrequired
idinteger(int64)
namestring
descriptionstring
areastring
calendarIdinteger(int64)
attributesobject
curl -i -X PUT \
  -u <username>:<password> \
  'https://docs2.mygpsapi.com/_mock/openapi/geofences/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 0,
    "name": "string",
    "description": "string",
    "area": "string",
    "calendarId": 0,
    "attributes": {}
  }'

Responses

OK

Bodyapplication/json
idinteger(int64)
namestring
descriptionstring
areastring
calendarIdinteger(int64)
attributesobject
Response
application/json
{ "id": 0, "name": "string", "description": "string", "area": "string", "calendarId": 0, "attributes": {} }

Delete a Geofence

Request

Security
BasicAuth or ApiKey
Path
idintegerrequired
curl -i -X DELETE \
  -u <username>:<password> \
  'https://docs2.mygpsapi.com/_mock/openapi/geofences/{id}'

Responses

No Content

Body

Commands

Sending commands to devices and stored command management

Operations

Attributes

Computed attributes management

Operations

Drivers

Drivers management

Operations

Maintenance

Maintenance management

Operations

Calendars

Calendar management

Operations

Statistics

Retrieving server statistics

Operations