Supported Formats

json

GET /api/v2/assets_groups
List of existing asset groups

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_groups':
 [
   {
     "id": 53,
     "name": "kaki",
     "assets": ["359858024351692", "359858021918949"]
   },
   {
     "id": 52,
     "name": "Group 52",
     "assets": ["359858024351692"]
   }
 ] 

Params

Param name Description
_token
required

Validations:

  • Must be a String

assets_filter
optional

List of Imei separate by ,

Validations:

  • Must be a String

name_filter
optional

Full or partial name of an assets group

Validations:

  • Must be a String


GET /api/v2/assets_groups/:id
Show details for a specific asset group

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_groups/53':
 {
   "id": 53,
   "name": "kaki",
   "assets": ["359858024351692", "359858021918949"]
 } 

Params

Param name Description
_token
required

Validations:

  • Must be a String


POST /api/v2/assets_groups
Create a new asset group

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/assets_groups' -d {
   "assets_group": {
     "name": "test group",
     "asset_imeis": ["359858024351692", "359858021918949"]
   }
 } :
 {
   "id": 54,
   "name": "test group",
   "assets": ["359858021918949","359858024351692"]
 } 

Params

Param name Description
_token
required

Validations:

  • Must be a String

asset_imeis
required

List of imeis

Validations:

  • Must be an array of any type

name
optional

Name of the asset group (default is “Group #{group id}”)

Validations:

  • Must be a String


PUT /api/v2/assets_groups/: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/assets_groups/54' -d {
   "assets_group": {
     "name": "test group renamed",
     "asset_imeis": ["359858024351692"]
   }
 } :
 {
   "id": 54,
   "name": "test group renamed",
   "assets": ["359858024351692"]
 } 

Params

Param name Description
_token
required

Validations:

  • Must be a String

asset_imeis
optional

List of new imeis

Validations:

  • Must be an array of any type

name
optional

New name of the asset group

Validations:

  • Must be a String


PUT /api/v2/assets_groups/:id/add_asset
Update existing configuration by adding an asset to the group

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/assets_groups/54/add_asset' -d {
   "assets_group": {
     "asset_imei": "357778024355687"
   }
 } :
 {
   "id": 54,
   "name": "test group",
   "assets": [359858021918949","359858024351692","357778024355687"]
 } 

Params

Param name Description
_token
required

Validations:

  • Must be a String

asset_imei
optional

IMEI of the asset to add

Validations:

  • Must be a String


PUT /api/v2/assets_groups/:id/remove_asset
Update existing configuration by removing an asset to the group

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/assets_groups/54/remove_asset' -d {
   "assets_group": {
     "asset_imei": "357778024355687"
   }
 } :
 {
   "id": 54,
   "name": "test group",
   "assets": [359858021918949","359858024351692"]
 } 

Params

Param name Description
_token
required

Validations:

  • Must be a String

asset_imei
optional

IMEI of the asset to remove

Validations:

  • Must be a String