Supported Formats

json

GET /api/v2/configurations
List of existing configurations

Returns the list of visible configurations with some general information.

Supported Formats

json

Errors

Code Description
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

GET '/api/v2/configurations':
 [
   {
     "id":409,"name":"test (Os Munic.io v2.1)",
     "version":"Munic.io v2.1",
     "description":""
   },
   {
     "id":408,"name":"Configuration #408",
     "version":"Munic.io v2.1",
     "description":null
   }
 ] 

Params

Param name Description
_token
required

Validations:

  • Must be a String


GET /api/v2/configurations/:id
Show details for a specific configuration

Returns detailed information about a configuration.

Supported Formats

json

Errors

Code Description
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

GET '/api/v2/configurations/409':
 {
   "id":409,
   "name":"test (Os Munic.io v2.1)",
   "version":"Munic.io v2.1",
   "description":"",
   "configuration":
     {
       "speed_provider":"obd",
       "monitored_over_speed":"true",
       "monitored_over_rpm":"true",
       "monitored_idling_state":"true",
       "monitored_tow_away_state":"true",
       "monitored_low_external_battery":"true",
       "monitored_malfunction_indicator_lamp":"true",
       "monitored_dtc_number":"false",
       "over_rpm_threshold":"3000",
       "power_delta_voltage_threshold":"1000",
       "idle_movement_timeout":"5",
       "overspeed_threshold":"110",
       "overspeed_duration_threshold":"5",
       "overspeed_reset_threshold":"5",
       "low_battery_threshold":"12000"
     }
 } 

Params

Param name Description
_token
required

Validations:

  • Must be a String


POST /api/v2/configurations
Create a new configuration

Supported Formats

json

Errors

Code Description
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

POST '/api/v2/configurations' -d {
   "name" : "test api - munic.io",
   "version" : 94,
   "data" : {
     "speed_provider" : "gps",
     "monitored_over_speed" : "true",
     "monitored_over_rpm" : "true",
     "monitored_idling_state" : "true",
     "monitored_tow_away_state" : "true",
     "monitored_low_external_battery" : "true",
     "monitored_malfunction_indicator_lamp" : "true",
     "monitored_dtc_number" : "true",
     "over_rpm_threshold" : "1500",
     "power_delta_voltage_threshold" : "1500",
     "idle_movement_timeout" : "10",
     "overspeed_threshold" : "115",
     "overspeed_duration_threshold" : "7",
     "overspeed_reset_threshold" : "10",
     "low_battery_threshold" : "11000"
   }
 } :
 {
   "id":410,
   "name":"test api - munic.io (Os Munic.io v2.1)",
   "version":"Munic.io v2.1",
   "description":"",
   "configuration":
     {
       "speed_provider":"gps",
       "monitored_over_speed":"true",
       "monitored_over_rpm":"true",
       "monitored_idling_state":"true",
       "monitored_tow_away_state":"true",
       "monitored_low_external_battery":"true",
       "monitored_malfunction_indicator_lamp":"true",
       "monitored_dtc_number":"true",
       "over_rpm_threshold":"1500",
       "power_delta_voltage_threshold":"1500",
       "idle_movement_timeout":"10",
       "overspeed_threshold":"115",
       "overspeed_duration_threshold":"7",
       "overspeed_reset_threshold":"10",
       "low_battery_threshold":"11000"
     }
 } 

Params

Param name Description
_token
required

Validations:

  • Must be a String

version
required

The id of the version

Validations:

  • Must be a Integer

name
required

The name for the configuration

Validations:

  • Must be a String

data
required

Parameters for the configuration. Available parameters can be obtained using the versions api

Validations:

  • Must be a Hash


PUT /api/v2/configurations/:id
Update existing configuration

Supported Formats

json

Errors

Code Description
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.
411 If this error occurs, either provide the `Content-type: 0` header or provide an empty data field (`{}` for example).

Examples

PUT '/api/v2/configurations/410' -d {
   "name" : "new name"
 } :
 {
   "id":410,
   "name":"new name (Os Munic.io v2.1)",
   "version":"Munic.io v2.1",
   "description":"",
   "configuration":
     {
       "speed_provider":"gps",
       "monitored_over_speed":"true",
       "monitored_over_rpm":"true",
       "monitored_idling_state":"true",
       "monitored_tow_away_state":"true",
       "monitored_low_external_battery":"true",
       "monitored_malfunction_indicator_lamp":"true",
       "monitored_dtc_number":"true",
       "over_rpm_threshold":"1500",
       "power_delta_voltage_threshold":"1500",
       "idle_movement_timeout":"10",
       "overspeed_threshold":"115",
       "overspeed_duration_threshold":"7",
       "overspeed_reset_threshold":"10",
       "low_battery_threshold":"11000"
     }
 } 

Params

Param name Description
_token
required

Validations:

  • Must be a String

name
optional

The name for the configuration

Validations:

  • Must be a String

data
optional

Parameters for the configuration. Available parameters can be obtained using the versions api

Validations:

  • Must be a Hash


GET /api/v2/configurations/:id/assets
List all assets linked to a specific configuration

Supported Formats

json

Errors

Code Description
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

GET '/api/v2/configurations/410/assets':
 [
   {
     "id": 1215,
     "asset": "359858012812890",
     "asset_group_id": null,
     "last_activity_at": "2014-05-20T14:41:20+02:00",
     "last_connection_at": "2014-05-20T14:41:41+02:00",
     "current_configuration": [
     ],
     "os_version_id": 94
   },
   {
     "id": 1232,
     "asset": "357322040071232",
     "asset_group_id": null,
     "last_activity_at": "2014-05-20T16:06:18+02:00",
     "last_connection_at": "2014-05-20T16:08:33+02:00",
     "current_configuration": [
     ],
     "os_version_id": 94
   }
 ] 

Params

Param name Description
_token
required

Validations:

  • Must be a String


GET /api/v2/configurations/:id/compatible_assets
List all assets compatible with a specific configuration

Supported Formats

json

Errors

Code Description
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

GET '/api/v2/configurations/410/compatible_assets':
 [
   {
     "id": 1215,
     "asset": "359858012812890",
     "asset_group_id": null,
     "last_activity_at": "2014-05-20T14:41:20+02:00",
     "last_connection_at": "2014-05-20T14:41:41+02:00",
     "current_configuration": [
     ],
     "os_version_id": 94
   },
   {
     "id": 1232,
     "asset": "357322040071232",
     "asset_group_id": null,
     "last_activity_at": "2014-05-20T16:06:18+02:00",
     "last_connection_at": "2014-05-20T16:08:33+02:00",
     "current_configuration": [
     ],
     "os_version_id": 94
   },
   {
     "id": 1269,
     "asset": "357322040088866",
     "asset_group_id": null,
     "last_activity_at": "2014-05-15T16:05:18+02:00",
     "last_connection_at": "2014-05-15T15:59:33+02:00",
     "current_configuration": [
     ],
     "os_version_id": 94
   }
 ] 

Params

Param name Description
_token
required

Validations:

  • Must be a String