Get Campaign History

GET /reports/{acc}/campaigns?campaignStatus={status value}

Retrieve a list of campaigns for an account to determine if any have a specified campaign status.

Request Components

HTTP Request

GET https://thingspace.verizon.com/api/fota/v3/reports/{acc}/campaigns?campaignStatus={status value}

Resource Path and Query Parameters

Parameter Name Data Type Description
acc
required
string The account name. The account name is numeric and must include any leading zeros
campaignStatus
required (query)
string The status value. Valid values include:
  • CampaignRequestPending
  • CampaignRequestFailed
  • CampaignRequestQueued
  • CampaignCancelled
  • CampaignAborted
  • CampaignFailed
  • CampaignScheduled
  • CampaignEnded
lastSeenCampaignId
(query)
string Only return campaigns 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.

Parameter Name Data Type Description
Authorization
required
string HTTP Authorization request header containing a valid Bearer token.
VZ-M2M-Token
required
string A valid session token returned by a Connectivity Management POST /session/login request.
Content-Type
required
string Must be application/json.

Request Body

None.

Example Request

Get campaign history.

curl GET https://thingspace.verizon.com/api/fota/v2/reports/{acc}/campaigns?campaignStatus=CampaignEnded 
-H 'VZ-M2M-Token: {M2M token}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {bearer token}' \

Success Responses

Status 200

Parameter Name Data Type Description
hasMoreData boolean Indicates if more data is available in the report. Use the lastSeenCampaignId to retrieve more data.
lastSeenCampaignId string If hasMoreData=true in the response, use the lastSeenCampaignId value from the response in the next request.
campaignList array of Campaign objects List of campaign and campaign details.
    accountName string The account name.
    id string Upgrade identifier.
    campaignName string The campaign name.
    softwareName string The name of the upgrade software.
    distributionType string Valid values include:
  • LWM2M
  • OMD-DM
  • HTTP
    softwareFrom string The name of the old software on the device.
    softwareTo string The name of the new software to which you upgraded.
    make string Applicable make.
    model string Applicable model.
    status string

Software upgrade status. Valid values include:

  • CampaignRequestPending
  • CampaignRequestFailed
  • CampaignRequestQueued
  • CampaignCancelled
  • CampaignAborted
  • CampaignFailed
  • CampaignScheduled
  • CampaignEnded
    startDate string($date) Campaign start date.
    endDate string($date) Campaign end date.
    campaignTimeWindowList array Specifies the starting and ending points for a time range to install the update in
        startTime integer Start hour in range [0-23], current hour >= startTime.
        endTime integer End hour in range [1-24], current hour < endTime.

Example Success Response

{
  "hasMoreData": true,
  "lastSeenCampaignId": "60b5d639-ccdc-4db8-8824-069bd94c95bf",
  "campaignList": [
    {
      "accountName": "0000123456-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",
      "status": "CampaignEnded",
      "startDate": "2020-08-21",
      "endDate": "2020-08-22",
      "campaignTimeWindowList": [
        {
          "startTime": 20,
          "endTime": 21
        }
      ]    
    },
  ]
}

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.