Premium APIsSoftware ManagementSoftware Management V2API Reference V2

Get campaign history

GET /reports/{accountName}/campaigns

Retrieve a list of campaigns for an account that have a specified campaign status.

HTTP Request

GET https://thingspace.verizon.com/api/fota/v2/reports/{accountName}/campaigns

Resource Path and Query Parameters

Parameter NameData TypeDescription
accountName
required
stringThe account name.
campaignStatus
required query
stringThe campaign status. Valid values include: CampaignRequestPending, CampaignRequestFailed, CampaignRequestQueued, CampaignCancelled, CampaignAborted, CampaignFailed, CampaignScheduled, CampaignEnded
lastSeenCampaignId
query
stringOnly return campaign IDs larger than this value. Use 0 for the first request. If hasMoreData=true in the response, use the lastSeenCampaignId value from the response in the next request.

Header Parameters

The request header must contain a current ThingSpace authorization token and a current VZ-M2M session token. For more details on how to get these tokens, visit Getting Started.

Parameter NameData TypeDescription
Authorization
required
stringHTTP Authorization bearer token:
Authorization: Bearer {token}
VZ-M2M-Token
required
stringA valid session token:
VZ-M2M-Token: {M2Mtoken}

Request Body

None.

Example Request

Get campaign history.

curl https://thingspace.verizon.com/api/fota/v2/reports/$ACC/campaigns?campaignStatus=CampaignEnded -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN' -H

Success Responses

Status 200

Parameter NameData TypeDescription
hasMoreDatabooleanIndicates if more data is available in the report. Use the lastSeenCampaignId to retrieve more data.
lastSeenCampaignIdstringIf hasMoreData=true in the response, use the lastSeenCampaignId value from the response in the next request.
campaignListarrayList of campaigns and campaign details.
campaignList.accountNamestringThe account name.
campaignList.idstringUpgrade identifier.
campaignList.campaignNamestringThe campaign name.
campaignList.softwareNamestringThe name of the upgrade software.
campaignList.distributionTypestringValid values include: LWM2M, OMD-DM, HTTP
campaignList.softwareFromstringThe name of the old software on the device.
campaignList.softwareTostringThe name of the new software to which you upgraded.
campaignList.makestringApplicable make.
campaignList.modelstringApplicable model.
campaignList.startDatestring($date)Campaign start date.
campaignList.endDatestring($date)Campaign end date.
campaignList.downloadAfterDatestring($date)Specifies the starting date you downloaded the package.
campaignList.downloadTimeWindowListarray of startTime and endTime objectsList of allowed download time windows.
campaignList.downloadTimeWindowList.startTimeintegerStart hour in range [0-23], current hour >= startTime.
campaignList.downloadTimeWindowList.endTimeintegerEnd hour in range [1-24], current hour < endTime.
campaignList.installAfterDatestring($date)The date after which you installed the package.
campaignList.installTimeWindowListarray of startTime and endTime objectsList of allowed install time windows.
campaignList.installTimeWindowList.startTimeintegerStart hour in range [0-23], current hour >= startTime.
campaignList.installTimeWindowList.endTimeintegerEnd hour in range [1-24], current hour < endTime.
campaignList.statusstringSoftware upgrade status. Valid values include: CampaignRequestPending, CampaignRequestFailed, CampaignRequestQueued, CampaignCancelled, CampaignAborted, CampaignFailed, CampaignScheduled, CampaignEnded

Example Success Response

{
    "hasMoreData": true,
    "lastSeenCampaignId": "60b5d639-ccdc-4db8-8824-069bd94c95bf",
    "campaignList": [
        {
          "accountName": "0402196254-00001",
          "id": "60b5d639-ccdc-4db8-8824-069bd94c95bf",
          "campaignName": "FOTA_Verizon_Upgrade",
          "softwareName": "FOTA_Verizon_Model-A_02To03_HF",
          "distributionType": "HTTP",
          "softwareFrom": "FOTA_Verizon_Model-A_00To01_HF",
          "softwareTo": "FOTA_Verizon_Model-A_02To03_HF",
          "make": "Verizon",
          "model": "Model-A",
          "startDate": "2020-08-21",
          "endDate": "2020-08-22",
          "downloadAfterDate": "2020-08-21",
          "downloadTimeWindowList": [
            {
              "startTime": 20,
              "endTime": 21
            }
          ],
          "installAfterDate": "2020-08-21",
          "installTimeWindowList": [
            {
              "startTime": 22,
              "endTime": 23
            }
          ],
          "status": "CampaignEnded"
        }
    ]
}

Failure Responses

Status 400

All error messages are returned in this format:

{
    "errorCode": "error code string",
    "errorMessage": "error message string"
}

Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.

On this page