Events API - GET an event

Lists parameters of the specified event.

The request produces an application/json payload.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/events/{eventId}
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v1/events/{eventId}

Parameters

Parameter Type Description In Required
eventId string

The ID of the required event.

path required

Response format

The EventRestEntry object

Set of parameters of the event.

Apart from the general properties mentioned here, which each event has, an actual event has a set of metadata that varies depending on the event type.

Element Type Description
eventId integer

The ID of the event.

This field is provided for compatibility reasons. You should use the id field instead.

startTime integer

The timestamp of the event detection, in UTC milliseconds.

endTime integer

The timestamp of the event closure, in UTC milliseconds

entityId string

The ID of the affected Dynatrace entity.

entityName string

The name of the affected Dynatrace entity.

severityLevel string

The severity of the event.

impactLevel string

The impact level of the event. It shows what is affected by the problem: infrastructure, service, or application.

eventType string

The type of the event.

resourceId string

The id of the resource the event occurred on.

resourceName string

The name of the resource the event occurred on.

eventStatus string

The state of the event: open or closed.

tags TagInfo[]

Tags of the Dynatrace entity that raised the event.

id string

The encoded ID of the event. The format is eventID_startTime.

You should use the value from this field when you need an event ID.

The TagInfo object

Tag of a Dynatrace entity.

Element Type Description
context string

The origin of the tag, such as AWS or Cloud Foundry.

Custom tags use the CONTEXTLESS value.

key string

The key of the tag.

Custom tags have the tag value here.

value string

The value of the tag.

Not applicable to custom tags.

Example

In this example, the request queries the parameters of the event with the ID 4166694657638834567_1533134704285.

This is the CUSTOM_DEPLOYMENT event-affected service and is marked with the deploy custom tag.

The API token is passed in the Authorization header.

Curl

curl -X GET \
  https://mySampleEnv.live.dynatrace.com/api/v1/events/4166694657638834567_1533134704285 \
  -H 'Authorization: Api-token abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v1/events/4166694657638834567_1533134704285

Response content

{
  "eventId": 4166694657638834567,
  "startTime": 1533134704285,
  "endTime": 1533134704285,
  "entityId": "SERVICE-0F579DCA105F190C",
  "entityName": "wmqiTestingWeb",
  "severityLevel": null,
  "impactLevel": "SERVICE",
  "eventType": "CUSTOM_DEPLOYMENT",
  "eventStatus": "CLOSED",
  "tags": [
    {
      "context": "CONTEXTLESS",
      "key": "deploy"
    }
  ],
  "id": "4166694657638834567_1533134704285",
  "customProperties": {
    "Build Number": "1.223.23432",
    "Owner": "Jason Miller (jason.miller@easytravel.com)",
    "Approver": "Alice McBright (alice.mcbright@easytravel.com)",
    "Git commit": "e5afbftc7eb"
  },
  "deploymentProject": "easyTravel service",
  "remediationAction": "http://tower.local/job/RemediateJob/38/",
  "deploymentVersion": "1.23.321",
  "deploymentName": "easyTravel service deployment",
  "source": "ServiceNow",
  "ciBackLink": "http://tower.local/job/DeployJob/38/artifact/build/Deployment-v1.23.321.zip"
}

Response code

200