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

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

Fetch a list of Saved Commands Without params, it returns a list of Drivers the user has access to

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

Update the distance counter of the Device

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

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

Fetch a list of Groups Without any params, returns a list of the Groups the user belongs to

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

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

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

Fetch Session information

Fetch a list of Users

Link to this section Functions

Link to this function attributes_computed_get(connection, opts \\ [])
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

Link to this function attributes_computed_id_delete(connection, id, opts \\ [])
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

Link to this function attributes_computed_id_put(connection, id, body, opts \\ [])
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

Link to this function attributes_computed_post(connection, body, opts \\ [])
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

Link to this function calendars_get(connection, opts \\ [])
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

Link to this function calendars_id_delete(connection, id, opts \\ [])
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

Link to this function calendars_id_put(connection, id, body, opts \\ [])
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

Link to this function calendars_post(connection, body, opts \\ [])
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

Link to this function commands_get(connection, opts \\ [])
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

Link to this function commands_id_delete(connection, id, opts \\ [])
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

Link to this function commands_id_put(connection, id, body, opts \\ [])
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

Link to this function commands_post(connection, body, opts \\ [])
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

Link to this function commands_send_get(connection, opts \\ [])
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

Link to this function commands_send_post(connection, body, opts \\ [])
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

Link to this function commands_types_get(connection, opts \\ [])
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

Link to this function devices_get(connection, opts \\ [])
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

Link to this function devices_id_delete(connection, id, opts \\ [])
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

Link to this function devices_id_distance_put(connection, id, body, opts \\ [])
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

Link to this function devices_id_put(connection, id, body, opts \\ [])
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

Link to this function devices_post(connection, body, opts \\ [])
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

Link to this function drivers_get(connection, opts \\ [])
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

Link to this function drivers_id_delete(connection, id, opts \\ [])
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

Link to this function drivers_id_put(connection, id, body, opts \\ [])
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

Link to this function drivers_post(connection, body, opts \\ [])
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

Link to this function events_id_get(connection, id, opts \\ [])
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

Link to this function geofences_get(connection, opts \\ [])
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

Link to this function geofences_id_delete(connection, id, opts \\ [])
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

Link to this function geofences_id_put(connection, id, body, opts \\ [])
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

Link to this function geofences_post(connection, body, opts \\ [])
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

Link to this function groups_get(connection, opts \\ [])
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

Link to this function groups_id_delete(connection, id, opts \\ [])
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

Link to this function groups_id_put(connection, id, body, opts \\ [])
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

Link to this function groups_post(connection, body, opts \\ [])
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

Link to this function maintenances_get(connection, opts \\ [])
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

Link to this function maintenances_id_delete(connection, id, opts \\ [])
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

Link to this function maintenances_id_put(connection, id, body, opts \\ [])
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

Link to this function maintenances_post(connection, body, opts \\ [])
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

Link to this function notifications_get(connection, opts \\ [])
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

Link to this function notifications_id_delete(connection, id, opts \\ [])
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

Link to this function notifications_id_put(connection, id, body, opts \\ [])
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

Link to this function notifications_post(connection, body, opts \\ [])
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

Link to this function notifications_test_post(connection, opts \\ [])
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

Link to this function notifications_types_get(connection, opts \\ [])
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

Link to this function permissions_delete(connection, body, opts \\ [])
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

Link to this function permissions_post(connection, body, opts \\ [])
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

Link to this function positions_get(connection, opts \\ [])
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

Link to this function reports_events_get(connection, from, to, opts \\ [])
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

Link to this function reports_route_get(connection, from, to, opts \\ [])
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

Link to this function reports_stops_get(connection, from, to, opts \\ [])
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

Link to this function reports_summary_get(connection, from, to, opts \\ [])
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

Link to this function reports_trips_get(connection, from, to, opts \\ [])
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

Link to this function server_get(connection, opts \\ [])
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

Link to this function server_put(connection, body, opts \\ [])
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

Link to this function session_delete(connection, opts \\ [])
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

Link to this function session_get(connection, opts \\ [])
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

Link to this function session_post(connection, email, password, opts \\ [])
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

Link to this function statistics_get(connection, from, to, opts \\ [])
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

Link to this function users_get(connection, opts \\ [])
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

Link to this function users_id_delete(connection, id, opts \\ [])
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

Link to this function users_id_put(connection, id, body, opts \\ [])
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

Link to this function users_post(connection, body, opts \\ [])
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