Create an asset update campaign by providing a name, a list of configurations, a list of assets, and / or a list of asset groups. There can be one or more configurations, and there must be at least when valid asset (either alone or in an asset group).

Supported Formats

json

Errors

Code Description
400 Various errors: the specific error is provided in the message field of the response
401 Token is invalid
401 You must authenticate to perform this request.
404 The requested resource was not found.

Examples

Create a campaign to update the configuation :
POST '/api/v2/campaigns' -d {
  "name" : "test campaign",
  "config_ids" : [414, 413],
  "asset_group_ids" : [],
  "targeted_asset_imeis" : ["357322044471026", "359858033385302"],
  "ignore_last_campaign" : false,
  "force_update" : false,    
  "reboot_mode": -1,
  "on_boot": false
} :
{
  "id":272,
  "name":"test campaign",
  "created_at":"April 28, 2014 15:37",
  "status":"Pending",
  "asset_configuration_list":[414, 413],
  "targeted_asset_count":2,
  "targeted_assets":["357322044471026", "359858033385302"],
  "asset_group_count":0,
  "asset_group_ids":[],
  "reboot_mode": -1,
  "on_boot": false
  "warnings":["The following assets are not compatible with the campaign's configurations : ",["357322044471026"]]
}
Create a campaign to update the software :
POST '/api/v2/campaigns' -d {
  "name" : "test campaign ota",
  "asset_software_update_id" : 28,
  "asset_group_ids" : [],
  "update_type" : 1,
  "targeted_asset_imeis" : ["357322044471026", "359858033385302"]
} :
{
  "id":242,
  "name":"test campaign ota",
  "created_at":"June 28, 2014 15:37",
  "status":"Pending",
  "asset_software_update_id":28,
  "targeted_asset_count":2,
  "targeted_assets":["357322044471026", "359858033385302"],
  "asset_group_count":0,
  "asset_group_ids":[],
  "warnings":[]
}

Params

Param name Description
_token
required

Validations:

  • Must be a String

name
required

Name of the campaign

Validations:

  • Must be a String

config_ids
required

List of the ids of the configurations to be applied

Validations:

  • Must be an array of any type

asset_software_update_id
required

Version Id targeted for the update

Validations:

  • Must be a Integer

update_type
optional

[default : 0] 0 - configuration update / 1 - software update

Validations:

  • Must be a Integer

targeted_asset_imeis
required

List of the imeis of the assets to which the campaign will be applied

Validations:

  • Must be an array of any type

asset_group_ids
required

List of the ids of the asset groups to which the campaign will be applied

Validations:

  • Must be an array of any type

ignore_last_campaign
optional

Ignore all campaigns in providingress for each asset (switch the status to ‘fail’ and never apply the configuration associated with the previous campaign), use with caution

Validations:

  • Must be one of: true, false.

force_update
optional

if true, Munic Manager will not wait until the devices reconnect to the cloud to send the campaign (same function as the update button on the asset page)

Validations:

  • Must be one of: true, false.

reboot_mode
optional

[default : -1] (-1) - Inherited from device version / 0 - no reboot / 1 - immediate reboot / 2 - override next idle

Validations:

  • Must be one of: -1, 0, 1, 2.

on_boot
optional

[default : null] if null, value will be inherited from device version, if true Save the configuration on the flash to be applied on the next boot

Validations:

  • Must be one of: true, false.