Get Device Audit History
Description
For a specified device, returns information about changes that occurred within a given time period as measured from today's date. You can request up to a year's worth of data (365 days).
Resource URL
GET rws/api/v{apiVersion}/devices/{iccid}/auditTrails
Request Parameters
Parameter | Description |
---|---|
apiVersion |
The version number for this API. The current version for all functions is 1. |
iccid | The ICCID of the device you want information about. |
daysOfHistory | (Optional) Specifies the audit history time period as measured from today. You can request up to a year's worth of data (no more than 365 days). If you do not specify the number of days, Control Center returns data from the past 30 days by default. |
pageSize |
(Optional) Specifies the number of records returned in each response page. The maximum value is 50. The value defaults to 50. See Pagination for details. |
pageNumber |
(Optional) Specifies the number of response pages to return. This value defaults to 1. See Pagination for details. |
Response Parameters
The function returns an array of audit history records, with the most recent listed first.
Return Value | Description |
---|---|
iccid | The ICCID of the device. |
timestamp | The time when the audit information was returned. The date format is yyyy-MM-ddTHH:mm:ss.SSSZ. See Date Formats for more details. |
pageNumber |
An integer specifying the number of the current page. See Pagination for details. |
lastPage |
A true or false value indicating whether the current page is the last in the series. See Pagination for details. |
deviceAuditTrails | An array of change records for the specified device. |
Fields within each change record | |
field | The name of the field whose value was changed. |
priorValue | The previous value of the field. No value indicates that this is the first time the field was set. |
value | The current value of the field. |
effectiveDate | The date and time the change occurred. The date format is yyyy-MM-ddT HH:mm:ss.SSSZ. See Date Formats for more details. |
status | The status of the change. Valid values include: Pending, Running, Executed, Error, Deleted, Cancelled, and WaitingRetry. |
userName | The name of the user who performed the change. |
delegatedUser | The name of the user, if any, who acted on behalf of the person who performed the change. This information will alert you if one user was mirroring another when the change occurred. |
ipAddress | The IP address of the machine used by the person who made the change. |
Request Example
Make sure to use your own user credentials. See Authentication for information about creating an authorization header.
Response Example
Code Samples
Make sure to use the Control Center sandbox URL and your own user credentials.
Errors
Error Code | HTTP Code | Error Message |
---|---|---|
10000001 | 401 |
Invalid credentials. Description: Control Center uses this error message when the API credentials are invalid or when the IP address is not within the allowed range. |
10000006 | 400 | Invalid pageSize. |
10000007 | 400 | Invalid pageNumber. |
10000024 | 400 | Invalid apiVersion. |
10000049 | 400 | The daysOfHistory must be less than or equal to 365. |
20000001 | 404 | Resource not found - Invalid ICCID. |
30000001 | 500 | Unknown server error. |