All URIs are relative to http://demo.traccar.org/api
Method | HTTP request | Description |
---|---|---|
attributesComputedGet | GET /attributes/computed | Fetch a list of Attributes |
attributesComputedIdDelete | DELETE /attributes/computed/{id} | Delete an Attribute |
attributesComputedIdPut | PUT /attributes/computed/{id} | Update an Attribute |
attributesComputedPost | POST /attributes/computed | Create an Attribute |
calendarsGet | GET /calendars | Fetch a list of Calendars |
calendarsIdDelete | DELETE /calendars/{id} | Delete a Calendar |
calendarsIdPut | PUT /calendars/{id} | Update a Calendar |
calendarsPost | POST /calendars | Create a Calendar |
commandsGet | GET /commands | Fetch a list of Saved Commands |
commandsIdDelete | DELETE /commands/{id} | Delete a Saved Command |
commandsIdPut | PUT /commands/{id} | Update a Saved Command |
commandsPost | POST /commands | Create a Saved Command |
commandsSendGet | GET /commands/send | Fetch a list of Saved Commands supported by Device at the moment |
commandsSendPost | POST /commands/send | Dispatch commands to device |
commandsTypesGet | GET /commands/types | Fetch a list of available Commands for the Device or all possible Commands if Device ommited |
devicesGet | GET /devices | Fetch a list of Devices |
devicesIdDelete | DELETE /devices/{id} | Delete a Device |
devicesIdDistancePut | PUT /devices/{id}/distance | Update the distance counter of the Device |
devicesIdPut | PUT /devices/{id} | Update a Device |
devicesPost | POST /devices | Create a Device |
driversGet | GET /drivers | Fetch a list of Drivers |
driversIdDelete | DELETE /drivers/{id} | Delete a Driver |
driversIdPut | PUT /drivers/{id} | Update a Driver |
driversPost | POST /drivers | Create a Driver |
eventsIdGet | GET /events/{id} | |
geofencesGet | GET /geofences | Fetch a list of Geofences |
geofencesIdDelete | DELETE /geofences/{id} | Delete a Geofence |
geofencesIdPut | PUT /geofences/{id} | Update a Geofence |
geofencesPost | POST /geofences | Create a Geofence |
groupsGet | GET /groups | Fetch a list of Groups |
groupsIdDelete | DELETE /groups/{id} | Delete a Group |
groupsIdPut | PUT /groups/{id} | Update a Group |
groupsPost | POST /groups | Create a Group |
maintenancesGet | GET /maintenances | Fetch a list of Maintenances |
maintenancesIdDelete | DELETE /maintenances/{id} | Delete a Maintenance |
maintenancesIdPut | PUT /maintenances/{id} | Update a Maintenance |
maintenancesPost | POST /maintenances | Create a Maintenance |
notificationsGet | GET /notifications | Fetch a list of Notifications |
notificationsIdDelete | DELETE /notifications/{id} | Delete a Notification |
notificationsIdPut | PUT /notifications/{id} | Update a Notification |
notificationsPost | POST /notifications | Create a Notification |
notificationsTestPost | POST /notifications/test | Send test notification to current user via Email and SMS |
notificationsTypesGet | GET /notifications/types | Fetch a list of available Notification types |
permissionsDelete | DELETE /permissions | Unlink an Object from another Object |
permissionsPost | POST /permissions | Link an Object to another Object |
positionsGet | GET /positions | Fetches a list of Positions |
reportsEventsGet | GET /reports/events | Fetch a list of Events within the time period for the Devices or Groups |
reportsRouteGet | GET /reports/route | Fetch a list of Positions within the time period for the Devices or Groups |
reportsStopsGet | GET /reports/stops | Fetch a list of ReportStops within the time period for the Devices or Groups |
reportsSummaryGet | GET /reports/summary | Fetch a list of ReportSummary within the time period for the Devices or Groups |
reportsTripsGet | GET /reports/trips | Fetch a list of ReportTrips within the time period for the Devices or Groups |
serverGet | GET /server | Fetch Server information |
serverPut | PUT /server | Update Server information |
sessionDelete | DELETE /session | Close the Session |
sessionGet | GET /session | Fetch Session information |
sessionPost | POST /session | Create a new Session |
statisticsGet | GET /statistics | Fetch server Statistics |
usersGet | GET /users | Fetch a list of Users |
usersIdDelete | DELETE /users/{id} | Delete a User |
usersIdPut | PUT /users/{id} | Update a User |
usersPost | POST /users | Create a User |
[Attribute] attributesComputedGet(opts)
Fetch a list of Attributes
Without params, it returns a list of Attributes the user has access to
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'all': true, // Boolean | Can only be used by admins or managers to fetch all entities
'userId': 56, // Number | Standard users can use this only with their own _userId_
'deviceId': 56, // Number | Standard users can use this only with _deviceId_s, they have access to
'groupId': 56, // Number | Standard users can use this only with _groupId_s, they have access to
'refresh': true // Boolean |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.attributesComputedGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
all | Boolean | Can only be used by admins or managers to fetch all entities | [optional] |
userId | Number | Standard users can use this only with their own userId | [optional] |
deviceId | Number | Standard users can use this only with _deviceId_s, they have access to | [optional] |
groupId | Number | Standard users can use this only with _groupId_s, they have access to | [optional] |
refresh | Boolean | [optional] |
- Content-Type: application/json
- Accept: application/json
attributesComputedIdDelete(id)
Delete an Attribute
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.attributesComputedIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Attribute attributesComputedIdPut(id, body)
Update an Attribute
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.Attribute(); // Attribute |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.attributesComputedIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | Attribute |
- Content-Type: application/json
- Accept: application/json
Attribute attributesComputedPost(body)
Create an Attribute
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Attribute(); // Attribute |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.attributesComputedPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Attribute |
- Content-Type: application/json
- Accept: application/json
[Calendar] calendarsGet(opts)
Fetch a list of Calendars
Without params, it returns a list of Calendars the user has access to
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'all': true, // Boolean | Can only be used by admins or managers to fetch all entities
'userId': 56 // Number | Standard users can use this only with their own _userId_
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.calendarsGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
all | Boolean | Can only be used by admins or managers to fetch all entities | [optional] |
userId | Number | Standard users can use this only with their own userId | [optional] |
- Content-Type: application/json
- Accept: application/json
calendarsIdDelete(id)
Delete a Calendar
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.calendarsIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Calendar calendarsIdPut(id, body)
Update a Calendar
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.Calendar(); // Calendar |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.calendarsIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | Calendar |
- Content-Type: application/json
- Accept: application/json
Calendar calendarsPost(body)
Create a Calendar
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Calendar(); // Calendar |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.calendarsPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Calendar |
- Content-Type: application/json
- Accept: application/json
[Command] commandsGet(opts)
Fetch a list of Saved Commands
Without params, it returns a list of Drivers the user has access to
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'all': true, // Boolean | Can only be used by admins or managers to fetch all entities
'userId': 56, // Number | Standard users can use this only with their own _userId_
'deviceId': 56, // Number | Standard users can use this only with _deviceId_s, they have access to
'groupId': 56, // Number | Standard users can use this only with _groupId_s, they have access to
'refresh': true // Boolean |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.commandsGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
all | Boolean | Can only be used by admins or managers to fetch all entities | [optional] |
userId | Number | Standard users can use this only with their own userId | [optional] |
deviceId | Number | Standard users can use this only with _deviceId_s, they have access to | [optional] |
groupId | Number | Standard users can use this only with _groupId_s, they have access to | [optional] |
refresh | Boolean | [optional] |
- Content-Type: application/json
- Accept: application/json
commandsIdDelete(id)
Delete a Saved Command
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.commandsIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Command commandsIdPut(id, body)
Update a Saved Command
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.Command(); // Command |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.commandsIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | Command |
- Content-Type: application/json
- Accept: application/json
Command commandsPost(body)
Create a Saved Command
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Command(); // Command |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.commandsPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Command |
- Content-Type: application/json
- Accept: application/json
[Command] commandsSendGet(opts)
Fetch a list of Saved Commands supported by Device at the moment
Return a list of saved commands linked to Device and its groups, filtered by current Device protocol support
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'deviceId': 56 // Number | Standard users can use this only with _deviceId_s, they have access to
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.commandsSendGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
deviceId | Number | Standard users can use this only with _deviceId_s, they have access to | [optional] |
- Content-Type: application/json
- Accept: application/json
Command commandsSendPost(body)
Dispatch commands to device
Dispatch a new command or Saved Command if body.id set
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Command(); // Command |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.commandsSendPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Command |
- Content-Type: application/json
- Accept: application/json
[CommandType] commandsTypesGet(opts)
Fetch a list of available Commands for the Device or all possible Commands if Device ommited
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'deviceId': 56, // Number |
'textChannel': true // Boolean |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.commandsTypesGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
deviceId | Number | [optional] | |
textChannel | Boolean | [optional] |
- Content-Type: application/json
- Accept: application/json
[Device] devicesGet(opts)
Fetch a list of Devices
Without any params, returns a list of the user's devices
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'all': true, // Boolean | Can only be used by admins or managers to fetch all entities
'userId': 56, // Number | Standard users can use this only with their own _userId_
'id': 56, // Number | To fetch one or more devices. Multiple params can be passed like `id=31&id=42`
'uniqueId': "uniqueId_example" // String | To fetch one or more devices. Multiple params can be passed like `uniqueId=333331&uniqieId=44442`
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.devicesGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
all | Boolean | Can only be used by admins or managers to fetch all entities | [optional] |
userId | Number | Standard users can use this only with their own userId | [optional] |
id | Number | To fetch one or more devices. Multiple params can be passed like `id=31&id=42` | [optional] |
uniqueId | String | To fetch one or more devices. Multiple params can be passed like `uniqueId=333331&uniqieId=44442` | [optional] |
- Content-Type: application/json
- Accept: application/json
devicesIdDelete(id)
Delete a Device
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.devicesIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
devicesIdDistancePut(id, body)
Update the distance counter of the Device
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.DeviceTotalDistance(); // DeviceTotalDistance |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.devicesIdDistancePut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | DeviceTotalDistance |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Device devicesIdPut(id, body)
Update a Device
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.Device(); // Device |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.devicesIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | Device |
- Content-Type: application/json
- Accept: application/json
Device devicesPost(body)
Create a Device
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Device(); // Device |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.devicesPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Device |
- Content-Type: application/json
- Accept: application/json
[Driver] driversGet(opts)
Fetch a list of Drivers
Without params, it returns a list of Drivers the user has access to
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'all': true, // Boolean | Can only be used by admins or managers to fetch all entities
'userId': 56, // Number | Standard users can use this only with their own _userId_
'deviceId': 56, // Number | Standard users can use this only with _deviceId_s, they have access to
'groupId': 56, // Number | Standard users can use this only with _groupId_s, they have access to
'refresh': true // Boolean |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.driversGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
all | Boolean | Can only be used by admins or managers to fetch all entities | [optional] |
userId | Number | Standard users can use this only with their own userId | [optional] |
deviceId | Number | Standard users can use this only with _deviceId_s, they have access to | [optional] |
groupId | Number | Standard users can use this only with _groupId_s, they have access to | [optional] |
refresh | Boolean | [optional] |
- Content-Type: application/json
- Accept: application/json
driversIdDelete(id)
Delete a Driver
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.driversIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Driver driversIdPut(id, body)
Update a Driver
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.Driver(); // Driver |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.driversIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | Driver |
- Content-Type: application/json
- Accept: application/json
Driver driversPost(body)
Create a Driver
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Driver(); // Driver |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.driversPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Driver |
- Content-Type: application/json
- Accept: application/json
Event eventsIdGet(id)
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.eventsIdGet(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
- Content-Type: application/json
- Accept: application/json
[Geofence] geofencesGet(opts)
Fetch a list of Geofences
Without params, it returns a list of Geofences the user has access to
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'all': true, // Boolean | Can only be used by admins or managers to fetch all entities
'userId': 56, // Number | Standard users can use this only with their own _userId_
'deviceId': 56, // Number | Standard users can use this only with _deviceId_s, they have access to
'groupId': 56, // Number | Standard users can use this only with _groupId_s, they have access to
'refresh': true // Boolean |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.geofencesGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
all | Boolean | Can only be used by admins or managers to fetch all entities | [optional] |
userId | Number | Standard users can use this only with their own userId | [optional] |
deviceId | Number | Standard users can use this only with _deviceId_s, they have access to | [optional] |
groupId | Number | Standard users can use this only with _groupId_s, they have access to | [optional] |
refresh | Boolean | [optional] |
- Content-Type: application/json
- Accept: application/json
geofencesIdDelete(id)
Delete a Geofence
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.geofencesIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Geofence geofencesIdPut(id, body)
Update a Geofence
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.Geofence(); // Geofence |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.geofencesIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | Geofence |
- Content-Type: application/json
- Accept: application/json
Geofence geofencesPost(body)
Create a Geofence
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Geofence(); // Geofence |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.geofencesPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Geofence |
- Content-Type: application/json
- Accept: application/json
[Group] groupsGet(opts)
Fetch a list of Groups
Without any params, returns a list of the Groups the user belongs to
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'all': true, // Boolean | Can only be used by admins or managers to fetch all entities
'userId': 56 // Number | Standard users can use this only with their own _userId_
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.groupsGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
all | Boolean | Can only be used by admins or managers to fetch all entities | [optional] |
userId | Number | Standard users can use this only with their own userId | [optional] |
- Content-Type: application/json
- Accept: application/json
groupsIdDelete(id)
Delete a Group
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.groupsIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Group groupsIdPut(id, body)
Update a Group
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.Group(); // Group |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.groupsIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | Group |
- Content-Type: application/json
- Accept: application/json
Group groupsPost(body)
Create a Group
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Group(); // Group |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.groupsPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Group |
- Content-Type: application/json
- Accept: application/json
[Maintenance] maintenancesGet(opts)
Fetch a list of Maintenances
Without params, it returns a list of Maintenances the user has access to
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'all': true, // Boolean | Can only be used by admins or managers to fetch all entities
'userId': 56, // Number | Standard users can use this only with their own _userId_
'deviceId': 56, // Number | Standard users can use this only with _deviceId_s, they have access to
'groupId': 56, // Number | Standard users can use this only with _groupId_s, they have access to
'refresh': true // Boolean |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.maintenancesGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
all | Boolean | Can only be used by admins or managers to fetch all entities | [optional] |
userId | Number | Standard users can use this only with their own userId | [optional] |
deviceId | Number | Standard users can use this only with _deviceId_s, they have access to | [optional] |
groupId | Number | Standard users can use this only with _groupId_s, they have access to | [optional] |
refresh | Boolean | [optional] |
- Content-Type: application/json
- Accept: application/json
maintenancesIdDelete(id)
Delete a Maintenance
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.maintenancesIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Maintenance maintenancesIdPut(id, body)
Update a Maintenance
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.Maintenance(); // Maintenance |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.maintenancesIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | Maintenance |
- Content-Type: application/json
- Accept: application/json
Maintenance maintenancesPost(body)
Create a Maintenance
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Maintenance(); // Maintenance |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.maintenancesPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Maintenance |
- Content-Type: application/json
- Accept: application/json
[Notification] notificationsGet(opts)
Fetch a list of Notifications
Without params, it returns a list of Notifications the user has access to
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'all': true, // Boolean | Can only be used by admins or managers to fetch all entities
'userId': 56, // Number | Standard users can use this only with their own _userId_
'deviceId': 56, // Number | Standard users can use this only with _deviceId_s, they have access to
'groupId': 56, // Number | Standard users can use this only with _groupId_s, they have access to
'refresh': true // Boolean |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.notificationsGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
all | Boolean | Can only be used by admins or managers to fetch all entities | [optional] |
userId | Number | Standard users can use this only with their own userId | [optional] |
deviceId | Number | Standard users can use this only with _deviceId_s, they have access to | [optional] |
groupId | Number | Standard users can use this only with _groupId_s, they have access to | [optional] |
refresh | Boolean | [optional] |
- Content-Type: application/json
- Accept: application/json
notificationsIdDelete(id)
Delete a Notification
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.notificationsIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Notification notificationsIdPut(id, body)
Update a Notification
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.Notification(); // Notification |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.notificationsIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | Notification |
- Content-Type: application/json
- Accept: application/json
Notification notificationsPost(body)
Create a Notification
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Notification(); // Notification |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.notificationsPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Notification |
- Content-Type: application/json
- Accept: application/json
notificationsTestPost()
Send test notification to current user via Email and SMS
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.notificationsTestPost(callback);
This endpoint does not need any parameter.
null (empty response body)
- Content-Type: application/json
- Accept: application/json
[NotificationType] notificationsTypesGet()
Fetch a list of available Notification types
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.notificationsTypesGet(callback);
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
permissionsDelete(body)
Unlink an Object from another Object
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Permission(); // Permission |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.permissionsDelete(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Permission |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
Permission permissionsPost(body)
Link an Object to another Object
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Permission(); // Permission |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.permissionsPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Permission |
- Content-Type: application/json
- Accept: application/json
[Position] positionsGet(opts)
Fetches a list of Positions
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
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'deviceId': 56, // Number | _deviceId_ is optional, but requires the _from_ and _to_ parameters when used
'from': new Date("2013-10-20T19:20:30+01:00"), // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
'to': new Date("2013-10-20T19:20:30+01:00"), // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
'id': 56 // Number | To fetch one or more positions. Multiple params can be passed like `id=31&id=42`
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.positionsGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
deviceId | Number | deviceId is optional, but requires the from and to parameters when used | [optional] |
from | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | [optional] |
to | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | [optional] |
id | Number | To fetch one or more positions. Multiple params can be passed like `id=31&id=42` | [optional] |
- Content-Type: application/json, text/csv, application/gpx+xml
- Accept: application/json, text/csv, application/gpx+xml
[Event] reportsEventsGet(from, to, opts)
Fetch a list of Events within the time period for the Devices or Groups
At least one deviceId or one groupId must be passed
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var from = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var to = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var opts = {
'deviceId': [3.4], // [Number] |
'groupId': [3.4], // [Number] |
'type': ["type_example"] // [String] | % can be used to return events of all types
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.reportsEventsGet(from, to, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
from | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
to | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
deviceId | [Number] | [optional] | |
groupId | [Number] | [optional] | |
type | [String] | % can be used to return events of all types | [optional] |
- Content-Type: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- Accept: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
[Position] reportsRouteGet(from, to, opts)
Fetch a list of Positions within the time period for the Devices or Groups
At least one deviceId or one groupId must be passed
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var from = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var to = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var opts = {
'deviceId': [3.4], // [Number] |
'groupId': [3.4] // [Number] |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.reportsRouteGet(from, to, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
from | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
to | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
deviceId | [Number] | [optional] | |
groupId | [Number] | [optional] |
- Content-Type: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- Accept: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
[ReportStops] reportsStopsGet(from, to, opts)
Fetch a list of ReportStops within the time period for the Devices or Groups
At least one deviceId or one groupId must be passed
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var from = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var to = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var opts = {
'deviceId': [3.4], // [Number] |
'groupId': [3.4] // [Number] |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.reportsStopsGet(from, to, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
from | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
to | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
deviceId | [Number] | [optional] | |
groupId | [Number] | [optional] |
- Content-Type: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- Accept: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
[ReportSummary] reportsSummaryGet(from, to, opts)
Fetch a list of ReportSummary within the time period for the Devices or Groups
At least one deviceId or one groupId must be passed
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var from = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var to = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var opts = {
'deviceId': [3.4], // [Number] |
'groupId': [3.4] // [Number] |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.reportsSummaryGet(from, to, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
from | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
to | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
deviceId | [Number] | [optional] | |
groupId | [Number] | [optional] |
- Content-Type: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- Accept: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
[ReportTrips] reportsTripsGet(from, to, opts)
Fetch a list of ReportTrips within the time period for the Devices or Groups
At least one deviceId or one groupId must be passed
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var from = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var to = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var opts = {
'deviceId': [3.4], // [Number] |
'groupId': [3.4] // [Number] |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.reportsTripsGet(from, to, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
from | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
to | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
deviceId | [Number] | [optional] | |
groupId | [Number] | [optional] |
- Content-Type: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- Accept: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Server serverGet()
Fetch Server information
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.serverGet(callback);
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
Server serverPut(body)
Update Server information
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.Server(); // Server |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.serverPut(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | Server |
- Content-Type: application/json
- Accept: application/json
sessionDelete()
Close the Session
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.sessionDelete(callback);
This endpoint does not need any parameter.
null (empty response body)
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
User sessionGet(opts)
Fetch Session information
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'token': "token_example" // String |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.sessionGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
token | String | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
User sessionPost(email, password)
Create a new Session
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var email = "email_example"; // String |
var password = "password_example"; // String |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.sessionPost(email, password, callback);
Name | Type | Description | Notes |
---|---|---|---|
String | |||
password | String |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Statistics] statisticsGet(from, to)
Fetch server Statistics
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var from = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var to = new Date("2013-10-20T19:20:30+01:00"); // Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.statisticsGet(from, to, callback);
Name | Type | Description | Notes |
---|---|---|---|
from | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` | |
to | Date | in IS0 8601 format. eg. `1963-11-22T18:30:00Z` |
- Content-Type: application/json
- Accept: application/json
[User] usersGet(opts)
Fetch a list of Users
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var opts = {
'userId': "userId_example" // String | Can only be used by admin or manager users
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.usersGet(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
userId | String | Can only be used by admin or manager users | [optional] |
- Content-Type: application/json
- Accept: application/json
usersIdDelete(id)
Delete a User
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.usersIdDelete(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
User usersIdPut(id, body)
Update a User
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var id = 56; // Number |
var body = new Traccar.User(); // User |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.usersIdPut(id, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | Number | ||
body | User |
- Content-Type: application/json
- Accept: application/json
User usersPost(body)
Create a User
var Traccar = require('traccar');
var defaultClient = Traccar.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';
var apiInstance = new Traccar.DefaultApi();
var body = new Traccar.User(); // User |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.usersPost(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | User |
- Content-Type: application/json
- Accept: application/json