Assets are the virtual representation of all physical devices that can connect to the CloudConnect platform. These APIs allow you to display the list of assets visible to the user, as well as more detailed information about a specific asset.

Supported Formats

json

GET /api/v2/assets
List of visible assets

Returns the list of visible assets 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/assets?filter=1289':
 [
   {
     "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": 93,
     "module_version_ids": [18]
   },
   {
     "id": 1232,
     "asset": "357322040071289",
     "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,
     "module_version_ids": []
   }
 ] 
GET '/api/v2/assets?filter=1289&os_version_id=93':
 [
   {
     "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": 93,
     "module_version_ids": [14,15,16,19]
   }
 ] 

Params

Param name Description
_token
required

Validations:

  • Must be a String

activity
optional
“today”   “yesterday”   “the_day_before_yesterday” - return assets active since …
“30_days”   “60_days” - return assets inactive for at least …    

Validations:

  • Must be a String

os_version_id
optional

Return assets with the corresponding os

Validations:

  • Must be a Integer

filter
optional

Return assets with an imei, an asset group, or an asset configuration like the provided fragment.

Validations:

  • Must be a String


GET /api/v2/assets/:imei
Get a specific asset

Returns detailed information about an asset.

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/assets/359858012812890':
 {
   "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": 93,
   "module_version_ids": [14,15,16,19],
   "pending_configuration" : [
   ]
 } 

Params

Param name Description
_token
required

Validations:

  • Must be a String

pending_configuration
optional

List of pending Configuration ID. It can be is empty [] if no campaign is in waiting status

Validations:

  • Must be an array of any type


GET /api/v2/assets/:imei/current_configuration
Get the current configuration

Retrieve the current configuration for a specific asset and return the configuration for the OS version and for each module that could be configured. If id and name and description are not present the configuration does not exist and we return the default configuration for the Os or module

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/assets/359858012812890/current_configuration':
 {
   "os" : {
     "id":123,
     "name":"test (Os Munic.io v2.1)",
     "version":"Munic.io v2.1",
     "version_id": 42,
     "description":"",
     "configuration":
     {
       "speed_provider":"obd",
       "monitored_over_speed":"true",
     }
   },
   "modules": [
     {
         "id":456,
         "name": "App test (Test v1.1)",
         "version": "Test v1.1",
         "version_id" : 12,
         "description": "",
         "configuration":
         {
           "low_battery_threshold":"12000",
           "idle_movement_timeout":"5",
           "overspeed_threshold":"110"
         }
       }
   ]
 }
 

Params

Param name Description
_token
required

Validations:

  • Must be a String


GET /api/v2/assets/:imei/applied_configuration
Get the applied configuration

Retrieve the applied configuration for a specific asset and return the configuration for the OS version and for each module that is currently applied. Show only applied configurations: do not show versions with default_configuration if no custom configuration has been applied for this version. The synced flag returns whether the cloud configuration and the asset configuration are in sync.

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/assets/359858012812890/applied_configuration':
 {
   "synced": true,
   "os" : {
     "id":123,
     "name":"test (Os Munic.io v2.1)",
     "version":"Munic.io v2.1",
     "version_id": 42,
     "description":"",
     "configuration":
     {
       "speed_provider":"obd",
       "monitored_over_speed":"true",
     }
   },
   "modules": [
     {
         "id":456,
         "name": "App test (Test v1.1)",
         "version": "Test v1.1",
         "version_id" : 12,
         "description": "",
         "configuration":
         {
           "low_battery_threshold":"12000",
           "idle_movement_timeout":"5",
           "overspeed_threshold":"110"
         }
       }
   ]
 }
 

Params

Param name Description
_token
required

Validations:

  • Must be a String


PUT /api/v2/assets/:imei/force_default_configuration
Force default configuration application on the device

Create a new campaign with default OS and Apps configurations. The created campaign will not start unless the parameter launch is provided with a true value

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

PUT '/api/v2/assets/359858012812890/force_default_configuration':
 {
   "launch": true
 }
 

Params

Param name Description
_token
required

Validations:

  • Must be a String


PUT /api/v2/assets/:imei/restore_configuration
Force all current configurations reapplication on the device

Create a new campaign with all device current configurations. The created campaign will not start unless the parameter launch is provided with a true value

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

PUT '/api/v2/assets/359858012812890/restore_configuration':
 {
   "launch": true
 }
 

Params

Param name Description
_token
required

Validations:

  • Must be a String