• Home
  • Dynatrace API
  • Environment
  • Audit logs
  • GET audit log entry

Audit logs API - GET audit log entry

Fetches the specified entry of the audit log.

GETManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v2/auditlogs/{id}
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/auditlogs/{id}
Environment ActiveGatehttps://{your-activegate-domain}/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

ParameterTypeDescriptionInRequired
idstring

The ID of the required log entry.

pathrequired

Response

Response codes

CodeTypeDescription
200AuditLogEntry

Success

400ErrorEnvelope

Failed. Invalid ID format.

404ErrorEnvelope

Failed. The requested resource doesn't exist.

Response body objects

The AuditLogEntry object

An entry of the audit log.

ElementTypeDescription
logIdstring

The ID of the log entry.

eventTypestring

The type of the recorded operation.

The element can hold these values
  • CREATE
  • DELETE
  • GENERAL
  • GET
  • LOGIN
  • LOGOUT
  • PATCH
  • POST
  • PUT
  • READ
  • REMOTE_CONFIGURATION_MANAGEMENT
  • REVOKE
  • TAG_ADD
  • TAG_REMOVE
  • TAG_UPDATE
  • UPDATE
categorystring

The category of the recorded operation.

The element can hold these values
  • ACTIVE_GATE
  • AGENT
  • CONFIG
  • DEBUG_UI
  • MANUAL_TAGGING_SERVICE
  • TOKEN
  • WEB_UI
entityIdstring

The ID of an entity from the category.

For example, it can be config ID for the CONFIG category or token ID for the TOKEN category.

environmentIdstring

The ID of the Dynatrace environment where the recorded operation occurred.

userstring

The ID of the user who performed the recorded operation.

userTypestring

The type of the authentication of the user.

The element can hold these values
  • PUBLIC_TOKEN_IDENTIFIER
  • REQUEST_ID
  • SERVICE_NAME
  • TOKEN_HASH
  • USER_NAME
userOriginstring

The origin and the IP address of the user.

timestampinteger

The timestamp of the record creation, in UTC milliseconds.

successboolean

The recorded operation is successful (true) or failed (false).

messagestring

The logged message.

patchobject

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.

Response body JSON model

json
{ "logId": "197425568800060000", "eventType": "UPDATE", "category": "CONFIG", "entityId": "MOBILE_RUM: MOBILE_APPLICATION-752C223D59734CD2", "environmentId": "prod-env-13", "user": "test.user@company.com", "userType": "USER_NAME", "userOrigin": "webui (192.168.0.2)", "timestamp": 1974255688445, "success": true, "patch": [ { "op": "replace", "path": "/refreshTimeIntervalMillis", "value": 30000, "oldValue": 20000 } ] }

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

bash
curl -X GET \ 'https://mySampleEnv.live.dynatrace.com/api/v2/auditlogs/157607396300050000' \ -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'

Request URL

plaintext
https://mySampleEnv.live.dynatrace.com/api/v2/auditlogs/157607396300050000

Response body

json
{ "logId": "157607396300050000", "eventType": "UPDATE", "category": "CONFIG", "entityId": "DASHBOARDS_SETTINGS: 14b3bfe7-69d8-48bf-b08a-4f9a2ff3f703", "environmentId": "yasmuoujsw", "user": "Dynatrace user #643541629", "userType": "USER_NAME", "userOrigin": "webui (240.204.62.255)", "timestamp": 1576074315483, "success": true, "patch": [ { "op": "replace", "path": "/tiles/24/top", "value": 304, "oldValue": 380 }, { "op": "replace", "path": "/tiles/24/left", "value": 304, "oldValue": 798 }, { "op": "replace", "path": "/tiles/24/width", "value": 608, "oldValue": 304 }, { "op": "replace", "path": "/tiles/24/height", "value": 608, "oldValue": 304 } ] }

Response code

200

Related topics
  • Manage audit logs

    Learn why audit logs are important for the data privacy and security of your application.