Audit logs API - GET audit log entry
Fetches the specified entry of the audit log.
GET | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v2/auditlogs/{id} |
SaaS | https://{your-environment-id}.live.dynatrace.com/api/v2/auditlogs/{id} | |
Environment and Cluster ActiveGate (default port 9999) | https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/auditlogs/{id} |
Authentication
To execute this request, you need an access token with auditLogs.read
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
id | string | The ID of the required log entry. | path | required |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | AuditLogEntry | Success |
400 | ErrorEnvelope | Failed. Invalid ID format. |
404 | ErrorEnvelope | Failed. The requested resource doesn't exist. |
Response body objects
The AuditLogEntry
object
An entry of the audit log.
Element | Type | Description |
---|---|---|
category | string | The category of the recorded operation.
|
entityId | string | The ID of an entity from the category. For example, it can be config ID for the |
environmentId | string | The ID of the Dynatrace environment where the recorded operation occurred. |
eventType | string | The type of the recorded operation.
|
logId | string | The ID of the log entry. |
message | string | The logged message. |
patch | object | The patch of the recorded operation as the JSON representation. The format is an enhanced RFC 6902. The patch also carries the previous value in the oldValue field. |
success | boolean | The recorded operation is successful ( |
timestamp | integer | The timestamp of the record creation, in UTC milliseconds. |
user | string | The ID of the user who performed the recorded operation. |
userOrigin | string | The origin and the IP address of the user. |
userType | string | The type of the authentication of the user.
|
Response body JSON model
1{2 "category": "CONFIG",3 "entityId": "MOBILE_RUM: MOBILE_APPLICATION-752C223D59734CD2",4 "environmentId": "prod-env-13",5 "eventType": "UPDATE",6 "logId": "197425568800060000",7 "patch": [8 {9 "oldValue": 20000,10 "op": "replace",11 "path": "/refreshTimeIntervalMillis",12 "value": 3000013 }14 ],15 "success": true,16 "timestamp": 1974255688445,17 "user": "test.user@company.com",18 "userOrigin": "webui (192.168.0.2)",19 "userType": "USER_NAME"20}
Example
In this example, the request gets the audit log entry with the ID of 157607396300050000.
This entry stores information about a change to the configuration of the dashboard with the ID of 14b3bfe7-69d8-48bf-b08a-4f9a2ff3f703. The change is a repositioning and resizing of a tile done by the Dynatrace user with user ID 643541629.
The API token is passed in the Authorization header.
Curl
1curl -X GET \2 'https://mySampleEnv.live.dynatrace.com/api/v2/auditlogs/157607396300050000' \3 -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
Request URL
1https://mySampleEnv.live.dynatrace.com/api/v2/auditlogs/157607396300050000
Response body
1{2 "logId": "157607396300050000",3 "eventType": "UPDATE",4 "category": "CONFIG",5 "entityId": "DASHBOARDS_SETTINGS: 14b3bfe7-69d8-48bf-b08a-4f9a2ff3f703",6 "environmentId": "yasmuoujsw",7 "user": "Dynatrace user #643541629",8 "userType": "USER_NAME",9 "userOrigin": "webui (240.204.62.255)",10 "timestamp": 1576074315483,11 "success": true,12 "patch": [13 {14 "op": "replace",15 "path": "/tiles/24/top",16 "value": 304,17 "oldValue": 38018 },19 {20 "op": "replace",21 "path": "/tiles/24/left",22 "value": 304,23 "oldValue": 79824 },25 {26 "op": "replace",27 "path": "/tiles/24/width",28 "value": 608,29 "oldValue": 30430 },31 {32 "op": "replace",33 "path": "/tiles/24/height",34 "value": 608,35 "oldValue": 30436 }37 ]38}
Response code
200