# Dynatrace Managed Post Event API

**URL:** <https://community.dynatrace.com/t/dynatrace-managed-post-event-api/20192>\
**Category:** Dynatrace Managed\
**Tags:** dynatrace-managed, dynatrace-api\
**Created:** [August 31, 2020, 11:32am UTC](https://community.dynatrace.com/t/dynatrace-managed-post-event-api/20192 "2020-08-31T11:32:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_mohamed-s](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@Ahmed\_mohamed-s](https://community.dynatrace.com/u/Ahmed_mohamed-s)\
**Post date:** [August 31, 2020, 11:32am UTC](https://community.dynatrace.com/t/dynatrace-managed-post-event-api/20192/1 "2020-08-31T11:32:56Z")

</div>

Hi All,

I have an issue while post an event through Dynatrace API, and i have tried the proposed example and received the below issue.

**Request**

[https://myenvironment/e/1c73bd17-f3f1-4c29-af69-f2447189a9c3/api/v1/events](https://myenvironment/e/1c73bd17-f3f1-4c29-af69-f2447189a9c3/api/v1/events)&nbsp; \

-H ‘Authorization: Api-token mytoken’ \

-H ‘Content-Type: application/json’ \

-d '{

“eventType”: “ERROR\_EVENT”,

“title” : “Power outage”,

“description” : “UPS detected a power outage”,

“timeoutMinutes” : 60,

“attachRules”: {

“entityIds”:[],

“tagRule”:[{

“meTypes” : [“HOST”],

“tags” : [{ “context” : “CONTEXTLESS”, “key” : “clinic” }]}

]},

“source”:“UPS-123 (Datacenter South)”,

“customProperties”:{

“PowerLevel”: “20.000Ah”,

“Estimation”: “3 hours”,

“UPS-Model”: “APC Smart-UPS C 1000VA, USB”}

}

**Error received:**

“code”:400,“message”:“Invalid attachRules object provided. No MEIdentifier do match: Matching rule: PushEventAttachRules{entityIds=[], tagRules=[TagMatchRule{meTypes=[HOST], tags=[[CONTEXTLESS]clinic]}]}”}}

Thanks,

Ahmed

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [August 31, 2020, 1:20pm UTC](https://community.dynatrace.com/t/dynatrace-managed-post-event-api/20192/2 "2020-08-31T13:20:36Z")

</div>

That simply means that there is no entity of type HOST with that tag within your system. Use a different tag that exists on a host within in your system.

Best greetings,

Wolfgang

---

<div class="post-metadata">

**Author:** ![Ahmed\_mohamed-s](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@Ahmed\_mohamed-s](https://community.dynatrace.com/u/Ahmed_mohamed-s)\
**Post date:** [August 31, 2020, 1:31pm UTC](https://community.dynatrace.com/t/dynatrace-managed-post-event-api/20192/3 "2020-08-31T13:31:54Z")

</div>

Thank you it is solved 🙂

- I added new custom device and I used it’s entity ID inside the payload

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [August 31, 2020, 1:34pm UTC](https://community.dynatrace.com/t/dynatrace-managed-post-event-api/20192/4 "2020-08-31T13:34:53Z")

</div>

Cool, should work with tags of course as well but only with those that are really present in your environments
