api:log:changelog:get
Table of Contents
API : Change Log Get
Introduction
This request will return a single change log.
Request
| URL | https://api.telecomx.dk/log/changelog/ID | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER or OWNER if looking up for own customer RESELLER if customer belongs to the reseller or a subreseller ADMIN for any customer and system wide sections |
|
| Params | ITEM_ID | ID of a specific change log |
Query examples
https://api.telecomx.dk/log/changelog/1234567890ABCDEF12345678
Response
| Log object (JSON) - if version=2 | ||
|---|---|---|
| _id | Id | Unique event id. |
| employee | Id | Id of the employee who caused the event, null if caused by the system. Only included if the the consumer has access to see who caused the change. |
| employeeName | String | Name of the employee who caused the event. If the system made the event, this value will be 'System'. |
| when | Date | Date and time the event took place. |
| where | String | Name of the section where the event happened. See list above of valid section names |
| what | String | Type of event: CREATE, UPDATE, DELETE or OTHER. |
| description | String | Optional description of what happened, human-readable English language. |
| hasComparison | boolean | Whether this change log can be compared to another log, to see differences between the two. |
| changes | Change[] | The changes made when this log was written, compared to how it was previously. Even if there is nothing to compare to, this list will have all relevant values, for showing an easily human-readable format. |
| changes[].key | String | Name of key, e.g ratePlan, name, notes. |
| changes[].oldValue | any | Old value, before update |
| changes[].oldDisplayValue | any | Old display value, e.g the name of the rate plan being changed, and not just an ID. |
| changes[].newValue | any | New value, after update |
| changes[].newDisplayValue | any | Old display value, e.g the name of the rate plan being changed, and not just an ID. |
| data | Object | If includeData query argument is set, then the data object is included. This is the item as it looked like at creation (if what=CREATE) or how the item looked like before it was updated or deleted (what=UPDATE or DELETE). |
| impersonatedBy | ObjectId | Id of impersonator, if user was impersonated. |
| impersonatedBySystem | Boolean | If the user was impersonated by the system, e.g a scheduled job is performed on the user's behalf. |
Note that properties holding no value may be omitted from the object.
Example
{ _id: '1234567890ABCDEF12345678', employee: '1234574890ABCDEF12345678', when: IsoDate('2014-01-01T12:34:56.123Z'), where: 'Employees', what: 'UPDATE', description: 'Password has been reset', data: { ... not included here ... }, changes: [] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | not_found | Not found |
api/log/changelog/get.txt · Last modified: 2024/11/27 14:01 by Joakim Andersen