Premium APIsSoftware ManagementSoftware Management V2API Reference V2

Enable logging for a device

Enable Logging for a Specific Device

PUT /logging/{accountName}/devices/{deviceId}

Enables logging for a specific device.

Note: Verbose Logging is available as long as the device OEM supports it.

Uses and Requirements

If a pilot campaign is not successful, you can enable and fetch logs for the device. Logging turns off automatically after seven days to avoid unnecessary device resource usage. When the device checks in after that setting is enabled, the device starts collecting logs. The device periodically uploads those logs to ThingSpace and purges them from the device. After at least 24 hours, you can call the Verbose Logging API again to fetch the logs for analysis or can view the check-in history as reported by the FOTA server. (Note that Check-in history is independent of enabled or disabled logging.) After 30 days, the logs are purged from ThingSpace.

HTTP Request

PUT https://thingspace.verizon.com/api/fota/v2/logging/{accountName}/devices/{deviceId}

Resource Path Parameters

You must include the account name and the deviceId in the path.

Parameter NameData TypeDescription
accountName
required
required stringThe name of the account for which you want enable device logging. An account name is usually numeric, and must include any leading zeros.
deviceId
required
required stringThe device IMEI identifier.

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

Enable logging for a device:

curl -X PUT https://thingspace.verizon.com/api/fota/v2/logging/$ACC/devices/$DEVICEID  -H 'Authorization: Bearer $AUTH_TOKEN' -H 'VZ-M2M-Token: $M2M_TOKEN'

Success Responses

Status 200

A success response contains the account name and an array of deviceId objects.

Parameter NameData TypeDescription
deviceIdstringThe IMEI of the device.
expiryDatestring($date)The date when device logging expires.

Example Success Response

{
    "deviceId": "990013907835573",
    "expiryDate": "2020-10-19"
}

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