Returns the list of visible campaigns with some general information.
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. |
GET '/api/v2/campaigns': [ { "id":271,"name":"Campaign test 2", "created_at":"April 28, 2014 15:37", "status":"Pending", "targeted_asset_count":9, "asset_group_count":1, "warnings":"2 incompatible assets" }, { "id":270, "name":"Campaign test 1", "created_at":"April 25, 2014 13:28", "status":"Sent", "targeted_asset_count":1, "asset_group_count":1 } ]
Param name | Description |
---|---|
_token required |
Validations:
|
archived optional |
Include archived campaigns Validations:
|
Returns detailed information about a campaign.
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. |
GET '/api/v2/campaigns/271': { "id":271, "name":"Ze aPi TEst3", "created_at":"April 28, 2014 15:37", "status":"Pending", "asset_configuration_list":[390,397], "targeted_asset_count":1, "targeted_assets":[], "assets_status": [ { "imei": "XXX", "status": "" }] "asset_group_count":1, "asset_group_ids":[52], "warnings":["The following assets are not compatible with the campaign's configurations : ",["359858024444692"]] }
Param name | Description |
---|---|
_token required |
Validations:
|
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).
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. |
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":[] }
Param name | Description |
---|---|
_token required |
Validations:
|
name required |
Name of the campaign Validations:
|
config_ids required |
List of the ids of the configurations to be applied Validations:
|
asset_software_update_id required |
Version Id targeted for the update Validations:
|
update_type optional |
[default : 0] 0 - configuration update / 1 - software update Validations:
|
targeted_asset_imeis required |
List of the imeis of the assets to which the campaign will be applied Validations:
|
asset_group_ids required |
List of the ids of the asset groups to which the campaign will be applied Validations:
|
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:
|
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:
|
reboot_mode optional |
[default : -1] (-1) - Inherited from device version / 0 - no reboot / 1 - immediate reboot / 2 - override next idle Validations:
|
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:
|
Modify an assets name, provide a new list of assets or change configurations. You can not modify a campaign that has already been sent.
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. |
411 | If this error occurs, either provide the `Content-type: 0` header or provide an empty data field (`{}` for example). |
PUT '/api/v2/campaigns/272' -d { "name" : "test campaign renamed" } : { "id":272, "name":"test campaign renamed", "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":[], "warnings":["The following assets are not compatible with the campaign's configurations : ",["357322044471026"]] }
Param name | Description |
---|---|
_token required |
Validations:
|
name optional |
New name of the campaign Validations:
|
config_ids optional |
New list of configurations Validations:
|
targeted_asset_imeis optional |
New list of imeis Validations:
|
asset_group_ids optional |
New list of asset groups Validations:
|
ignore_last_campaign optional |
Ignore all campaigns in progress for each asset (switch the status to ‘fail’ and never apply the configuration associated with the previous campaign), use with caution Validations:
|
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:
|
Launch a campaign targeting all assets both compatible and not already being updated in another campaign.
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. |
411 | If this error occurs, either provide the `Content-type: 0` header or provide an empty data field (`{}` for example). |
PUT '/api/v2/campaigns/272/launch' -d {} : { "id":272, "name":"test campaign renamed", "created_at":"April 28, 2014 15:37", "status":"Sent", "asset_configuration_list":[414, 413], "targeted_asset_count":2, "targeted_assets":["357322044471026", "359858033385302"], "asset_group_count":0, "asset_group_ids":[], "warnings":["The following assets are not compatible with the campaign's configurations : ",["357322044471026"]] }
Param name | Description |
---|---|
_token required |
Validations:
|