traccar v0.1.3 Traccar.Api.Default
API calls for all endpoints tagged Default
.
Link to this section Summary
Functions
Fetch a list of Attributes Without params, it returns a list of Attributes the user has access to
Delete an Attribute
Update an Attribute
Create an Attribute
Fetch a list of Calendars Without params, it returns a list of Calendars the user has access to
Delete a Calendar
Update a Calendar
Create a Calendar
Fetch a list of Saved Commands Without params, it returns a list of Drivers the user has access to
Delete a Saved Command
Update a Saved Command
Create a Saved Command
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
Dispatch commands to device 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
Fetch a list of Devices Without any params, returns a list of the user's devices
Delete a Device
Update the distance counter of the Device
Update a Device
Create a Device
Fetch a list of Drivers Without params, it returns a list of Drivers the user has access to
Delete a Driver
Update a Driver
Create a Driver
Parameters
Fetch a list of Geofences Without params, it returns a list of Geofences the user has access to
Delete a Geofence
Update a Geofence
Create a Geofence
Fetch a list of Groups Without any params, returns a list of the Groups the user belongs to
Delete a Group
Update a Group
Create a Group
Fetch a list of Maintenances Without params, it returns a list of Maintenances the user has access to
Delete a Maintenance
Update a Maintenance
Create a Maintenance
Fetch a list of Notifications Without params, it returns a list of Notifications the user has access to
Delete a Notification
Update a Notification
Create a Notification
Send test notification to current user via Email and SMS
Fetch a list of available Notification types
Unlink an Object from another Object
Link an Object to another Object
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
Fetch a list of Events within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Fetch a list of Positions within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Fetch a list of ReportStops within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Fetch a list of ReportSummary within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Fetch a list of ReportTrips within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Fetch Server information
Update Server information
Close the Session
Fetch Session information
Create a new Session
Fetch server Statistics
Fetch a list of Users
Delete a User
Update a User
Create a User
Link to this section Functions
attributes_computed_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Attribute.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Attributes Without params, it returns a list of Attributes the user has access to
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :all (boolean()): Can only be used by admins or managers to fetch all entities
- :userid (integer()): Standard users can use this only with their own _userId
- :device_id (integer()): Standard users can use this only with _deviceId_s, they have access to
- :group_id (integer()): Standard users can use this only with _groupId_s, they have access to
- :refresh (boolean()):
Returns
{:ok, [%Attribute{}, …]} on success {:error, info} on failure
attributes_computed_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete an Attribute
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
attributes_computed_id_put( Tesla.Env.client(), integer(), Traccar.Model.Attribute.t(), keyword() ) :: {:ok, Traccar.Model.Attribute.t()} | {:error, Tesla.Env.t()}
Update an Attribute
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (Attribute):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Attribute{}} on success {:error, info} on failure
attributes_computed_post( Tesla.Env.client(), Traccar.Model.Attribute.t(), keyword() ) :: {:ok, Traccar.Model.Attribute.t()} | {:error, Tesla.Env.t()}
Create an Attribute
Parameters
- connection (Traccar.Connection): Connection to server
- body (Attribute):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Attribute{}} on success {:error, info} on failure
calendars_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Calendar.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Calendars Without params, it returns a list of Calendars the user has access to
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :all (boolean()): Can only be used by admins or managers to fetch all entities
- :userid (integer()): Standard users can use this only with their own _userId
Returns
{:ok, [%Calendar{}, …]} on success {:error, info} on failure
calendars_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a Calendar
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
calendars_id_put( Tesla.Env.client(), integer(), Traccar.Model.Calendar.t(), keyword() ) :: {:ok, Traccar.Model.Calendar.t()} | {:error, Tesla.Env.t()}
Update a Calendar
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (Calendar):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Calendar{}} on success {:error, info} on failure
calendars_post(Tesla.Env.client(), Traccar.Model.Calendar.t(), keyword()) :: {:ok, Traccar.Model.Calendar.t()} | {:error, Tesla.Env.t()}
Create a Calendar
Parameters
- connection (Traccar.Connection): Connection to server
- body (Calendar):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Calendar{}} on success {:error, info} on failure
commands_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Command.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Saved Commands Without params, it returns a list of Drivers the user has access to
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :all (boolean()): Can only be used by admins or managers to fetch all entities
- :userid (integer()): Standard users can use this only with their own _userId
- :device_id (integer()): Standard users can use this only with _deviceId_s, they have access to
- :group_id (integer()): Standard users can use this only with _groupId_s, they have access to
- :refresh (boolean()):
Returns
{:ok, [%Command{}, …]} on success {:error, info} on failure
commands_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a Saved Command
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
commands_id_put( Tesla.Env.client(), integer(), Traccar.Model.Command.t(), keyword() ) :: {:ok, Traccar.Model.Command.t()} | {:error, Tesla.Env.t()}
Update a Saved Command
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (Command):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Command{}} on success {:error, info} on failure
commands_post(Tesla.Env.client(), Traccar.Model.Command.t(), keyword()) :: {:ok, Traccar.Model.Command.t()} | {:error, Tesla.Env.t()}
Create a Saved Command
Parameters
- connection (Traccar.Connection): Connection to server
- body (Command):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Command{}} on success {:error, info} on failure
commands_send_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Command.t()]} | {:error, Tesla.Env.t()}
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
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :device_id (integer()): Standard users can use this only with _deviceId_s, they have access to
Returns
{:ok, [%Command{}, …]} on success {:error, info} on failure
commands_send_post(Tesla.Env.client(), Traccar.Model.Command.t(), keyword()) :: {:ok, Traccar.Model.Command.t()} | {:error, Tesla.Env.t()}
Dispatch commands to device Dispatch a new command or Saved Command if body.id set
Parameters
- connection (Traccar.Connection): Connection to server
- body (Command):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Command{}} on success {:error, info} on failure
commands_types_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.CommandType.t()]} | {:error, Tesla.Env.t()}
Fetch a list of available Commands for the Device or all possible Commands if Device ommited
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :device_id (integer()):
- :text_channel (boolean()):
Returns
{:ok, [%CommandType{}, …]} on success {:error, info} on failure
devices_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Device.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Devices Without any params, returns a list of the user's devices
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :all (boolean()): Can only be used by admins or managers to fetch all entities
- :userid (integer()): Standard users can use this only with their own _userId
- :id (integer()): To fetch one or more devices. Multiple params can be passed like `id=31&id=42`
- :unique_id (String.t): To fetch one or more devices. Multiple params can be passed like `uniqueId=333331&uniqieId=44442`
Returns
{:ok, [%Device{}, …]} on success {:error, info} on failure
devices_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a Device
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
devices_id_distance_put( Tesla.Env.client(), integer(), Traccar.Model.DeviceTotalDistance.t(), keyword() ) :: {:ok, nil} | {:error, Tesla.Env.t()}
Update the distance counter of the Device
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (DeviceTotalDistance):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
devices_id_put( Tesla.Env.client(), integer(), Traccar.Model.Device.t(), keyword() ) :: {:ok, Traccar.Model.Device.t()} | {:error, Tesla.Env.t()}
Update a Device
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (Device):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Device{}} on success {:error, info} on failure
devices_post(Tesla.Env.client(), Traccar.Model.Device.t(), keyword()) :: {:ok, Traccar.Model.Device.t()} | {:error, Tesla.Env.t()}
Create a Device
Parameters
- connection (Traccar.Connection): Connection to server
- body (Device):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Device{}} on success {:error, info} on failure
drivers_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Driver.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Drivers Without params, it returns a list of Drivers the user has access to
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :all (boolean()): Can only be used by admins or managers to fetch all entities
- :userid (integer()): Standard users can use this only with their own _userId
- :device_id (integer()): Standard users can use this only with _deviceId_s, they have access to
- :group_id (integer()): Standard users can use this only with _groupId_s, they have access to
- :refresh (boolean()):
Returns
{:ok, [%Driver{}, …]} on success {:error, info} on failure
drivers_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a Driver
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
drivers_id_put( Tesla.Env.client(), integer(), Traccar.Model.Driver.t(), keyword() ) :: {:ok, Traccar.Model.Driver.t()} | {:error, Tesla.Env.t()}
Update a Driver
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (Driver):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Driver{}} on success {:error, info} on failure
drivers_post(Tesla.Env.client(), Traccar.Model.Driver.t(), keyword()) :: {:ok, Traccar.Model.Driver.t()} | {:error, Tesla.Env.t()}
Create a Driver
Parameters
- connection (Traccar.Connection): Connection to server
- body (Driver):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Driver{}} on success {:error, info} on failure
events_id_get(Tesla.Env.client(), integer(), keyword()) :: {:ok, Traccar.Model.Event.t()} | {:error, Tesla.Env.t()}
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Event{}} on success {:error, info} on failure
geofences_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Geofence.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Geofences Without params, it returns a list of Geofences the user has access to
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :all (boolean()): Can only be used by admins or managers to fetch all entities
- :userid (integer()): Standard users can use this only with their own _userId
- :device_id (integer()): Standard users can use this only with _deviceId_s, they have access to
- :group_id (integer()): Standard users can use this only with _groupId_s, they have access to
- :refresh (boolean()):
Returns
{:ok, [%Geofence{}, …]} on success {:error, info} on failure
geofences_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a Geofence
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
geofences_id_put( Tesla.Env.client(), integer(), Traccar.Model.Geofence.t(), keyword() ) :: {:ok, Traccar.Model.Geofence.t()} | {:error, Tesla.Env.t()}
Update a Geofence
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (Geofence):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Geofence{}} on success {:error, info} on failure
geofences_post(Tesla.Env.client(), Traccar.Model.Geofence.t(), keyword()) :: {:ok, Traccar.Model.Geofence.t()} | {:error, Tesla.Env.t()}
Create a Geofence
Parameters
- connection (Traccar.Connection): Connection to server
- body (Geofence):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Geofence{}} on success {:error, info} on failure
groups_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Group.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Groups Without any params, returns a list of the Groups the user belongs to
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :all (boolean()): Can only be used by admins or managers to fetch all entities
- :userid (integer()): Standard users can use this only with their own _userId
Returns
{:ok, [%Group{}, …]} on success {:error, info} on failure
groups_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a Group
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
groups_id_put(Tesla.Env.client(), integer(), Traccar.Model.Group.t(), keyword()) :: {:ok, Traccar.Model.Group.t()} | {:error, Tesla.Env.t()}
Update a Group
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (Group):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Group{}} on success {:error, info} on failure
groups_post(Tesla.Env.client(), Traccar.Model.Group.t(), keyword()) :: {:ok, Traccar.Model.Group.t()} | {:error, Tesla.Env.t()}
Create a Group
Parameters
- connection (Traccar.Connection): Connection to server
- body (Group):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Group{}} on success {:error, info} on failure
maintenances_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Maintenance.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Maintenances Without params, it returns a list of Maintenances the user has access to
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :all (boolean()): Can only be used by admins or managers to fetch all entities
- :userid (integer()): Standard users can use this only with their own _userId
- :device_id (integer()): Standard users can use this only with _deviceId_s, they have access to
- :group_id (integer()): Standard users can use this only with _groupId_s, they have access to
- :refresh (boolean()):
Returns
{:ok, [%Maintenance{}, …]} on success {:error, info} on failure
maintenances_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a Maintenance
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
maintenances_id_put( Tesla.Env.client(), integer(), Traccar.Model.Maintenance.t(), keyword() ) :: {:ok, Traccar.Model.Maintenance.t()} | {:error, Tesla.Env.t()}
Update a Maintenance
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (Maintenance):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Maintenance{}} on success {:error, info} on failure
maintenances_post(Tesla.Env.client(), Traccar.Model.Maintenance.t(), keyword()) :: {:ok, Traccar.Model.Maintenance.t()} | {:error, Tesla.Env.t()}
Create a Maintenance
Parameters
- connection (Traccar.Connection): Connection to server
- body (Maintenance):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Maintenance{}} on success {:error, info} on failure
notifications_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Notification.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Notifications Without params, it returns a list of Notifications the user has access to
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :all (boolean()): Can only be used by admins or managers to fetch all entities
- :userid (integer()): Standard users can use this only with their own _userId
- :device_id (integer()): Standard users can use this only with _deviceId_s, they have access to
- :group_id (integer()): Standard users can use this only with _groupId_s, they have access to
- :refresh (boolean()):
Returns
{:ok, [%Notification{}, …]} on success {:error, info} on failure
notifications_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a Notification
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
notifications_id_put( Tesla.Env.client(), integer(), Traccar.Model.Notification.t(), keyword() ) :: {:ok, Traccar.Model.Notification.t()} | {:error, Tesla.Env.t()}
Update a Notification
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (Notification):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Notification{}} on success {:error, info} on failure
notifications_post( Tesla.Env.client(), Traccar.Model.Notification.t(), keyword() ) :: {:ok, Traccar.Model.Notification.t()} | {:error, Tesla.Env.t()}
Create a Notification
Parameters
- connection (Traccar.Connection): Connection to server
- body (Notification):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Notification{}} on success {:error, info} on failure
notifications_test_post(Tesla.Env.client(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Send test notification to current user via Email and SMS
Parameters
- connection (Traccar.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
notifications_types_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.NotificationType.t()]} | {:error, Tesla.Env.t()}
Fetch a list of available Notification types
Parameters
- connection (Traccar.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, [%NotificationType{}, …]} on success {:error, info} on failure
permissions_delete(Tesla.Env.client(), Traccar.Model.Permission.t(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Unlink an Object from another Object
Parameters
- connection (Traccar.Connection): Connection to server
- body (Permission):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
permissions_post(Tesla.Env.client(), Traccar.Model.Permission.t(), keyword()) :: {:ok, Traccar.Model.Permission.t()} | {:error, Tesla.Env.t()}
Link an Object to another Object
Parameters
- connection (Traccar.Connection): Connection to server
- body (Permission):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Permission{}} on success {:error, info} on failure
positions_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.Position.t()]} | {:error, Tesla.Env.t()}
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
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :deviceid (integer()): _deviceId is optional, but requires the from and to parameters when used
- :from (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
- :to (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
- :id (integer()): To fetch one or more positions. Multiple params can be passed like `id=31&id=42`
Returns
{:ok, [%Position{}, …]} on success {:error, info} on failure
reports_events_get(Tesla.Env.client(), DateTime.t(), DateTime.t(), keyword()) :: {:ok, [Traccar.Model.Event.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Events within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Parameters
- connection (Traccar.Connection): Connection to server
- from (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
- to (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
opts (KeywordList): [optional] Optional parameters
- :device_id ([integer()]):
- :group_id ([integer()]):
- :type ([String.t]): % can be used to return events of all types
Returns
{:ok, [%Event{}, …]} on success {:error, info} on failure
reports_route_get(Tesla.Env.client(), DateTime.t(), DateTime.t(), keyword()) :: {:ok, [Traccar.Model.Position.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Positions within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Parameters
- connection (Traccar.Connection): Connection to server
- from (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
- to (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
opts (KeywordList): [optional] Optional parameters
- :device_id ([integer()]):
- :group_id ([integer()]):
Returns
{:ok, [%Position{}, …]} on success {:error, info} on failure
reports_stops_get(Tesla.Env.client(), DateTime.t(), DateTime.t(), keyword()) :: {:ok, [Traccar.Model.ReportStops.t()]} | {:error, Tesla.Env.t()}
Fetch a list of ReportStops within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Parameters
- connection (Traccar.Connection): Connection to server
- from (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
- to (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
opts (KeywordList): [optional] Optional parameters
- :device_id ([integer()]):
- :group_id ([integer()]):
Returns
{:ok, [%ReportStops{}, …]} on success {:error, info} on failure
reports_summary_get(Tesla.Env.client(), DateTime.t(), DateTime.t(), keyword()) :: {:ok, [Traccar.Model.ReportSummary.t()]} | {:error, Tesla.Env.t()}
Fetch a list of ReportSummary within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Parameters
- connection (Traccar.Connection): Connection to server
- from (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
- to (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
opts (KeywordList): [optional] Optional parameters
- :device_id ([integer()]):
- :group_id ([integer()]):
Returns
{:ok, [%ReportSummary{}, …]} on success {:error, info} on failure
reports_trips_get(Tesla.Env.client(), DateTime.t(), DateTime.t(), keyword()) :: {:ok, [Traccar.Model.ReportTrips.t()]} | {:error, Tesla.Env.t()}
Fetch a list of ReportTrips within the time period for the Devices or Groups At least one deviceId or one groupId must be passed
Parameters
- connection (Traccar.Connection): Connection to server
- from (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
- to (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
opts (KeywordList): [optional] Optional parameters
- :device_id ([integer()]):
- :group_id ([integer()]):
Returns
{:ok, [%ReportTrips{}, …]} on success {:error, info} on failure
server_get(Tesla.Env.client(), keyword()) :: {:ok, Traccar.Model.Server.t()} | {:error, Tesla.Env.t()}
Fetch Server information
Parameters
- connection (Traccar.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Server{}} on success {:error, info} on failure
server_put(Tesla.Env.client(), Traccar.Model.Server.t(), keyword()) :: {:ok, Traccar.Model.Server.t()} | {:error, Tesla.Env.t()}
Update Server information
Parameters
- connection (Traccar.Connection): Connection to server
- body (Server):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.Server{}} on success {:error, info} on failure
session_delete(Tesla.Env.client(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Close the Session
Parameters
- connection (Traccar.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
session_get(Tesla.Env.client(), keyword()) :: {:ok, Traccar.Model.User.t()} | {:error, Tesla.Env.t()}
Fetch Session information
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :token (String.t):
Returns
{:ok, %Traccar.Model.User{}} on success {:error, info} on failure
session_post(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, Traccar.Model.User.t()} | {:error, Tesla.Env.t()}
Create a new Session
Parameters
- connection (Traccar.Connection): Connection to server
- email (String.t):
- password (String.t):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.User{}} on success {:error, info} on failure
statistics_get(Tesla.Env.client(), DateTime.t(), DateTime.t(), keyword()) :: {:ok, [Traccar.Model.Statistics.t()]} | {:error, Tesla.Env.t()}
Fetch server Statistics
Parameters
- connection (Traccar.Connection): Connection to server
- from (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
- to (DateTime.t): in IS0 8601 format. eg. `1963-11-22T18:30:00Z`
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, [%Statistics{}, …]} on success {:error, info} on failure
users_get(Tesla.Env.client(), keyword()) :: {:ok, [Traccar.Model.User.t()]} | {:error, Tesla.Env.t()}
Fetch a list of Users
Parameters
- connection (Traccar.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :user_id (String.t): Can only be used by admin or manager users
Returns
{:ok, [%User{}, …]} on success {:error, info} on failure
users_id_delete(Tesla.Env.client(), integer(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t()}
Delete a User
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %{}} on success {:error, info} on failure
users_id_put(Tesla.Env.client(), integer(), Traccar.Model.User.t(), keyword()) :: {:ok, Traccar.Model.User.t()} | {:error, Tesla.Env.t()}
Update a User
Parameters
- connection (Traccar.Connection): Connection to server
- id (integer()):
- body (User):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.User{}} on success {:error, info} on failure
users_post(Tesla.Env.client(), Traccar.Model.User.t(), keyword()) :: {:ok, Traccar.Model.User.t()} | {:error, Tesla.Env.t()}
Create a User
Parameters
- connection (Traccar.Connection): Connection to server
- body (User):
- opts (KeywordList): [optional] Optional parameters
Returns
{:ok, %Traccar.Model.User{}} on success {:error, info} on failure