# @dynatrace-sdk/client-notification-v2

[![npm](https://img.shields.io/badge/npm-v2.5.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-notification-v2/v/2.5.0)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Manage resource/event notifications with the Notification Service API.


## Installation

```bash
npm install @dynatrace-sdk/client-notification-v2
```


## Getting help

- Visit [SDK for Typescript](https://developer.dynatrace.com/reference/sdks/) guide in the [Dynatrace Developer](https://developer.dynatrace.com/)
- Ask a question in the [Dynatrace Community](https://community.dynatrace.com/)


## License

This SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see LICENSE for more information.


# API reference

Full API reference for the latest version of the SDK is also available at the [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-notification-v2/).

## eventNotificationsClient

```js
import { eventNotificationsClient } from '@dynatrace-sdk/client-notification-v2';
```


<a name="createeventnotification"></a>
### createEventNotification

<div class="padding-bottom--md">
<strong>eventNotificationsClient.createEventNotification(config): Promise&lt;<a href="#eventnotification">EventNotification</a>&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:write



</div>


#### Parameters

| Name | Type |
| --- | --- |
|config.body<sup>*required</sup>|<a href="#eventnotificationrequest" target="_blank" rel="noopener noreferrer">EventNotificationRequest</a>| 




#### Returns

| Return type | Status code | Description |
|---|---|---|
|[EventNotification](#eventnotification)|201||


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await eventNotificationsClient.createEventNotification({
    body: {
      resourceId: "...",
      notificationType: "...",
      triggerConfiguration: {
        type: "event",
        value: { query: "..." },
      },
    },
  });
```

</details>



</div>


<a name="deleteeventnotification"></a>
### deleteEventNotification

<div class="padding-bottom--md">
<strong>eventNotificationsClient.deleteEventNotification(config): Promise&lt;void&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:write



</div>


#### Parameters

| Name | Type | Description |
| --- | --- | --- |
|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A UUID string identifying this self notification. |




#### Returns

| Return type | Status code | Description |
|---|---|---|
|void|204|No response body|


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await eventNotificationsClient.deleteEventNotification({
    id: "...",
  });
```

</details>



</div>


<a name="geteventnotification"></a>
### getEventNotification

<div class="padding-bottom--md">
<strong>eventNotificationsClient.getEventNotification(config): Promise&lt;<a href="#eventnotification">EventNotification</a>&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:read



</div>


#### Parameters

| Name | Type | Description |
| --- | --- | --- |
|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A UUID string identifying this self notification. |




#### Returns

| Return type | Status code | Description |
|---|---|---|
|[EventNotification](#eventnotification)|200||


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await eventNotificationsClient.getEventNotification({
    id: "...",
  });
```

</details>



</div>


<a name="geteventnotifications"></a>
### getEventNotifications

<div class="padding-bottom--md">
<strong>eventNotificationsClient.getEventNotifications(config): Promise&lt;<a href="#paginatedeventnotificationlist" target="_blank" rel="noopener noreferrer">PaginatedEventNotificationList</a>&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:read



</div>


#### Parameters

| Name | Type | Description |
| --- | --- | --- |
|config.appId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. |
|config.limit|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Number of results to return per page. |
|config.notificationType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. |
|config.offset|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The initial index from which to return the results. |
|config.ordering|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Which field to use when ordering the results. |
|config.owner|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|config.resourceId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. |
|config.search|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A search term. |




#### Returns

| Return type | Status code | Description |
|---|---|---|
|[PaginatedEventNotificationList](#paginatedeventnotificationlist)|200||


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await eventNotificationsClient.getEventNotifications();
```

</details>



</div>


<a name="patcheventnotification"></a>
### patchEventNotification

<div class="padding-bottom--md">
<strong>eventNotificationsClient.patchEventNotification(config): Promise&lt;<a href="#eventnotification">EventNotification</a>&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:write



</div>


#### Parameters

| Name | Type | Description |
| --- | --- | --- |
|config.body<sup>*required</sup>|<a href="#eventnotificationupdate" target="_blank" rel="noopener noreferrer">EventNotificationUpdate</a>| |
|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A UUID string identifying this self notification. |




#### Returns

| Return type | Status code | Description |
|---|---|---|
|[EventNotification](#eventnotification)|200||


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await eventNotificationsClient.patchEventNotification({
    id: "...",
    body: {
      triggerConfiguration: {
        type: "event",
        value: { query: "..." },
      },
    },
  });
```

</details>



</div>


<a name="updateeventnotification"></a>
### updateEventNotification

<div class="padding-bottom--md">
<strong>eventNotificationsClient.updateEventNotification(config): Promise&lt;<a href="#eventnotification">EventNotification</a>&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:write



</div>


#### Parameters

| Name | Type | Description |
| --- | --- | --- |
|config.body<sup>*required</sup>|<a href="#eventnotificationupdate" target="_blank" rel="noopener noreferrer">EventNotificationUpdate</a>| |
|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A UUID string identifying this self notification. |




#### Returns

| Return type | Status code | Description |
|---|---|---|
|[EventNotification](#eventnotification)|200||


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { eventNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await eventNotificationsClient.updateEventNotification({
    id: "...",
    body: {
      triggerConfiguration: {
        type: "event",
        value: { query: "..." },
      },
    },
  });
```

</details>



</div>

## resourceNotificationsClient

```js
import { resourceNotificationsClient } from '@dynatrace-sdk/client-notification-v2';
```


<a name="createresourcenotification"></a>
### createResourceNotification

<div class="padding-bottom--md">
<strong>resourceNotificationsClient.createResourceNotification(config): Promise&lt;<a href="#resourcenotification">ResourceNotification</a>&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:write



</div>


#### Parameters

| Name | Type |
| --- | --- |
|config.body<sup>*required</sup>|<a href="#resourcenotificationrequest" target="_blank" rel="noopener noreferrer">ResourceNotificationRequest</a>| 




#### Returns

| Return type | Status code | Description |
|---|---|---|
|[ResourceNotification](#resourcenotification)|201||


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await resourceNotificationsClient.createResourceNotification(
    {
      body: { notificationType: "...", resourceId: "..." },
    },
  );
```

</details>



</div>


<a name="deleteresourcenotification"></a>
### deleteResourceNotification

<div class="padding-bottom--md">
<strong>resourceNotificationsClient.deleteResourceNotification(config): Promise&lt;void&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:write



</div>


#### Parameters

| Name | Type | Description |
| --- | --- | --- |
|config.appId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. |
|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A UUID string identifying this resource notification. |




#### Returns

| Return type | Status code | Description |
|---|---|---|
|void|204|No response body|


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await resourceNotificationsClient.deleteResourceNotification(
    { id: "..." },
  );
```

</details>



</div>


<a name="deleteresourcenotificationbytypeandresource"></a>
### deleteResourceNotificationByTypeAndResource

<div class="padding-bottom--md">
<strong>resourceNotificationsClient.deleteResourceNotificationByTypeAndResource(config): Promise&lt;void&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:write



</div>


#### Parameters

| Name | Type | Description |
| --- | --- | --- |
|config.appId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. |
|config.notificationType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. |
|config.resourceId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. |




#### Returns

| Return type | Status code | Description |
|---|---|---|
|void|204|No response body|


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await resourceNotificationsClient.deleteResourceNotificationByTypeAndResource(
    { notificationType: "...", resourceId: "..." },
  );
```

</details>



</div>


<a name="getresourcenotification"></a>
### getResourceNotification

<div class="padding-bottom--md">
<strong>resourceNotificationsClient.getResourceNotification(config): Promise&lt;<a href="#resourcenotification">ResourceNotification</a>&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:read



</div>


#### Parameters

| Name | Type | Description |
| --- | --- | --- |
|config.appId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. |
|config.id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A UUID string identifying this resource notification. |




#### Returns

| Return type | Status code | Description |
|---|---|---|
|[ResourceNotification](#resourcenotification)|200||


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await resourceNotificationsClient.getResourceNotification(
    { id: "..." },
  );
```

</details>



</div>


<a name="getresourcenotifications"></a>
### getResourceNotifications

<div class="padding-bottom--md">
<strong>resourceNotificationsClient.getResourceNotifications(config): Promise&lt;<a href="#paginatedresourcenotificationlist" target="_blank" rel="noopener noreferrer">PaginatedResourceNotificationList</a>&gt;</strong>

<div class="padding-left--md">

**Required scope:** notification:notifications:read



</div>


#### Parameters

| Name | Type | Description |
| --- | --- | --- |
|config.appId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Application id associated with the notification. Optional, by default automatically inferred from the request header. Only relevant for manual testing purposes via swagger. |
|config.limit|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Number of results to return per page. |
|config.notificationType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. |
|config.offset|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The initial index from which to return the results. |
|config.ordering|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Which field to use when ordering the results. |
|config.resourceId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. |
|config.search|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|A search term. |




#### Returns

| Return type | Status code | Description |
|---|---|---|
|[PaginatedResourceNotificationList](#paginatedresourcenotificationlist)|200||


#### Throws

| Error Type | Error Message |
|---|---|
|ErrorEnvelopeError||


<details>
<summary>
Code example
</summary>

```ts
import { resourceNotificationsClient } from "@dynatrace-sdk/client-notification-v2";

const data =
  await resourceNotificationsClient.getResourceNotifications();
```

</details>



</div>

## Types

### DavisEventConfig

| Name | Type | Description |
| --- | --- | --- |
|customFilter|null &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Additional DQL matcher expression to further filter events to match. <i>default:</i> <code>""</code>|
|entityTags|null &#124; <a href="#entitytags">EntityTags</a>| |
|entityTagsMatch|null &#124; "all" &#124; "any"| |
|maintenanceWindowTriggerBehavior|"always" &#124; "inside" &#124; "outside"| <i>default:</i> <code>"always"</code>|
|names|null &#124; Array&lt;<a href="#daviseventname" target="_blank" rel="noopener noreferrer">DavisEventName</a>&gt;| |
|~~onProblemClose~~<sup>**DEPRECATED**</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Trigger on Davis event open only or also on close. Deprecated — use triggerOn instead. <i>default:</i> <code>false</code>|
|triggerOn|null &#124; "open" &#124; "open-and-close" &#124; "close"|Event state to trigger on. &quot;open&quot; (active only), &quot;open-and-close&quot; (both phases), or &quot;close&quot; (closure only). When unset, falls back to onProblemClose for backward compatibility. |
|~~types~~<sup>**DEPRECATED**</sup>|null &#124; Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;| |

### DavisEventName

| Name | Type | Description |
| --- | --- | --- |
|match<sup>*required</sup>|"equals" &#124; "contains"|Davis event name must equal or contain the string provided. |
|name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |

### DavisEventTriggerConfig

| Name | Type |
| --- | --- |
|type<sup>*required</sup>|"davis-event"| 
|value<sup>*required</sup>|<a href="#daviseventconfig">DavisEventConfig</a>|

### DavisProblemCategories

| Name | Type | Default |
| --- | --- | --- |
|availability|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| <code>false</code>|
|custom|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| <code>false</code>|
|error|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| <code>false</code>|
|info|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| <code>false</code>|
|monitoringUnavailable|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| <code>false</code>|
|resource|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| <code>false</code>|
|slowdown|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| <code>false</code>|

### DavisProblemConfig

| Name | Type | Description |
| --- | --- | --- |
|analysisReady|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Run only after first root cause analysis run completed. <i>default:</i> <code>false</code>|
|categories<sup>*required</sup>|<a href="#davisproblemcategories" target="_blank" rel="noopener noreferrer">DavisProblemCategories</a>| |
|customFilter|null &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Additional DQL matcher expression to further filter events to match. <i>default:</i> <code>""</code>|
|entityTags|null &#124; <a href="#entitytags">EntityTags</a>| |
|entityTagsMatch|null &#124; "all" &#124; "any"| |
|~~onProblemClose~~<sup>**DEPRECATED**</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|Trigger on Davis problem open only or also on close. Deprecated — use triggerOn instead. <i>default:</i> <code>false</code>|
|problemOpenDuration|null &#124; 5 &#124; 10 &#124; 15 &#124; 30 &#124; 60 &#124; 120 &#124; 240 &#124; 1440 &#124; 10080|Minimum problem duration in minutes before the trigger fires. |
|severityThreshold|null &#124; [number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|Triggers only for problems whose severity is this value or more severe. Lower numbers are more severe (1 = critical, 5 = informational), so 3 matches severities 1, 2, and 3. |
|triggerOn|null &#124; "open" &#124; "open-and-close" &#124; "close"|Problem state to trigger on. &quot;open&quot; (active only), &quot;open-and-close&quot; (both phases), or &quot;close&quot; (closure only). When unset, falls back to onProblemClose for backward compatibility. |
|triggerOnUpdateFields|Array&lt;"dt.davis.affected_users_count" &#124; "dt.davis.impact_level" &#124; "event.category" &#124; "event.severity" &#124; "root_cause_entity_id" &#124; "smartscape.affected_entities"&gt;|Problem event fields tracked for value changes. Changes to any selected field cause re-triggering. |

### DavisProblemTriggerConfig

| Name | Type |
| --- | --- |
|type<sup>*required</sup>|"davis-problem"| 
|value<sup>*required</sup>|<a href="#davisproblemconfig" target="_blank" rel="noopener noreferrer">DavisProblemConfig</a>|

### EntityTags

Entity tags to match by key and (optional) values. For example \{&quot;foo&quot;: [], &quot;bar&quot;: [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]}

**type**: Record&lt;string, string | string[]&gt;

### Error

| Name | Type |
| --- | --- |
|code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| 
|details|<a href="#errordetails">ErrorDetails</a>| 
|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|

### ErrorDetails

| Name | Type |
| --- | --- |
|errorCode|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| 
|errorRef|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|

### ErrorEnvelope

| Name | Type |
| --- | --- |
|error<sup>*required</sup>|<a href="#error" target="_blank" rel="noopener noreferrer">Error</a>|

### EventNotification

| Name | Type | Description |
| --- | --- | --- |
|appId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. |
|id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|input|<a href="#eventnotificationinput">EventNotificationInput</a>|Input object consisting of subject and content. Supports automation expressions https://dt-url.net/workflows-expression-reference and markdown syntax. A template provided with an app (&#123;notification_type}.notification-template.json) will take precedence over the input provided here. |
|modificationInfo<sup>*required</sup>|<a href="#modificationinfo" target="_blank" rel="noopener noreferrer">ModificationInfo</a>| |
|notificationType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. |
|owner<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|resourceId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. |
|title|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|triggerConfiguration<sup>*required</sup>|EventTriggerConfig| |

### EventNotificationInput

| Name | Type |
| --- | --- |
|content|null &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)| 
|subject|null &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)|

### EventNotificationRequest

| Name | Type | Description |
| --- | --- | --- |
|appId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. |
|id|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|input|<a href="#eventnotificationinput">EventNotificationInput</a>|Input object consisting of subject and content. Supports automation expressions https://dt-url.net/workflows-expression-reference and markdown syntax. A template provided with an app (&#123;notification_type}.notification-template.json) will take precedence over the input provided here. |
|notificationType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. |
|resourceId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. |
|title|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|triggerConfiguration<sup>*required</sup>|EventTriggerConfig| |

### EventNotificationUpdate

| Name | Type | Description |
| --- | --- | --- |
|appId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. |
|input|<a href="#eventnotificationinput" target="_blank" rel="noopener noreferrer">EventNotificationInput</a>|Input object consisting of subject and content. Supports automation expressions https://dt-url.net/workflows-expression-reference and markdown syntax. A template provided with an app (&#123;notification_type}.notification-template.json) will take precedence over the input provided here. |
|notificationType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. |
|resourceId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. |
|title|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|triggerConfiguration|EventTriggerConfig| |

### EventQuery

| Name | Type | Description |
| --- | --- | --- |
|eventType|"events" &#124; "bizevents" &#124; "dt.system.events" &#124; "security.events"|Grail event type. |
|query<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|DQL matcher expression defining which events to match. |

### EventQueryTriggerConfig

| Name | Type |
| --- | --- |
|type<sup>*required</sup>|"event"| 
|value<sup>*required</sup>|<a href="#eventquery">EventQuery</a>|

### ModificationInfo

| Name | Type |
| --- | --- |
|createdBy<sup>*required</sup>|null &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)| 
|createdTime<sup>*required</sup>|Date| 
|lastModifiedBy<sup>*required</sup>|null &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)| 
|lastModifiedTime<sup>*required</sup>|Date|

### PaginatedEventNotificationList

| Name | Type |
| --- | --- |
|count<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| 
|results<sup>*required</sup>|Array&lt;<a href="#eventnotification" target="_blank" rel="noopener noreferrer">EventNotification</a>&gt;|

### PaginatedResourceNotificationList

| Name | Type |
| --- | --- |
|count<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| 
|results<sup>*required</sup>|Array&lt;<a href="#resourcenotification">ResourceNotification</a>&gt;|

### ResourceNotification

| Name | Type | Description |
| --- | --- | --- |
|appId|null &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)|App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. |
|id<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|modificationInfo<sup>*required</sup>|<a href="#modificationinfo" target="_blank" rel="noopener noreferrer">ModificationInfo</a>| |
|notificationType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. |
|owningUser<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
|resourceId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. |

### ResourceNotificationRequest

| Name | Type | Description |
| --- | --- | --- |
|appId|null &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)|App id for registered notification. Optional, by default automatically inferred from the request. Only relevant for manual testing purposes via swagger. |
|notificationType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|String that defines the type of a notification in context of an app. Allows to differentiate between multiple types of notifications in context of one app. |
|resourceId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Unique identifier of resource to notify on. Used to determine if there is a notification registered for a resource in context of the app and notification type for a user. |

### EventTriggerConfig

**type**: &lt;a href=&quot;#eventquerytriggerconfig&quot;&gt;EventQueryTriggerConfig&lt;/a&gt; | &lt;a href=&quot;#davisproblemtriggerconfig&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;DavisProblemTriggerConfig&lt;/a&gt; | &lt;a href=&quot;#daviseventtriggerconfig&quot;&gt;DavisEventTriggerConfig&lt;/a&gt;

## Enums

<a name="daviseventnamematch"></a>
### ~~DavisEventNameMatch~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">

Davis event name must equal or contain the string provided.

#### Enum keys

<div class="padding-left--md">

`Contains` | `Equals`

</div>


</div>

<a name="daviseventtriggerconfigtype"></a>
### ~~DavisEventTriggerConfigType~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">



#### Enum keys

<div class="padding-left--md">

`DavisEvent`

</div>


</div>

<a name="davisproblemconfigproblemopenduration"></a>
### ~~DavisProblemConfigProblemOpenDuration~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">

Minimum problem duration in minutes before the trigger fires.

#### Enum keys

<div class="padding-left--md">

`DavisProblemConfigProblemOpenDuration_10` | `DavisProblemConfigProblemOpenDuration_10080` | `DavisProblemConfigProblemOpenDuration_120` | `DavisProblemConfigProblemOpenDuration_1440` | `DavisProblemConfigProblemOpenDuration_15` | `DavisProblemConfigProblemOpenDuration_240` | `DavisProblemConfigProblemOpenDuration_30` | `DavisProblemConfigProblemOpenDuration_5` | `DavisProblemConfigProblemOpenDuration_60`

</div>


</div>

<a name="davisproblemtriggerconfigtype"></a>
### ~~DavisProblemTriggerConfigType~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">



#### Enum keys

<div class="padding-left--md">

`DavisProblem`

</div>


</div>

<a name="entitytagsmatch"></a>
### ~~EntityTagsMatch~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">

Event must match all or any of the entity tags.

#### Enum keys

<div class="padding-left--md">

`All` | `Any`

</div>


</div>

<a name="eventquerytriggerconfigtype"></a>
### ~~EventQueryTriggerConfigType~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">



#### Enum keys

<div class="padding-left--md">

`Event`

</div>


</div>

<a name="eventtype"></a>
### ~~EventType~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">

Grail event type.

#### Enum keys

<div class="padding-left--md">

`Bizevents` | `DtSystemEvents` | `Events` | `SecurityEvents`

</div>


</div>

<a name="maintenancewindowtriggerbehaviortype"></a>
### ~~MaintenanceWindowTriggerBehaviorType~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">

Specifies when to trigger based on maintenance window status.

#### Enum keys

<div class="padding-left--md">

`Always` | `Inside` | `Outside`

</div>


</div>

<a name="triggeron"></a>
### ~~TriggerOn~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">



#### Enum keys

<div class="padding-left--md">

`Close` | `Open` | `OpenAndClose`

</div>


</div>

<a name="triggeronupdatefields"></a>
### ~~TriggerOnUpdateFields~~

> ⚠️ **Deprecated**
> Use literal values.

<div class="padding-left--md">



#### Enum keys

<div class="padding-left--md">

`DtDavisAffectedUsersCount` | `DtDavisImpactLevel` | `EventCategory` | `EventSeverity` | `RootCauseEntityId` | `SmartscapeAffectedEntities`

</div>


</div>
