# How to post deployment event for particular host?

**URL:** <https://community.dynatrace.com/t/how-to-post-deployment-event-for-particular-host/37412>\
**Category:** Dynatrace API\
**Tags:** hosts-classic, dynatrace-api\
**Created:** [November 22, 2022, 12:12pm UTC](https://community.dynatrace.com/t/how-to-post-deployment-event-for-particular-host/37412 "2022-11-22T12:12:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naveen](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/naveen/32/2570_2.png) [@Naveen](https://community.dynatrace.com/u/Naveen)\
**Post date:** [November 22, 2022, 12:12pm UTC](https://community.dynatrace.com/t/how-to-post-deployment-event-for-particular-host/37412/1 "2022-11-22T12:12:56Z")

</div>

Hi I want to post deployment events with some information for particular host (i.e. HOST A), could someone explain how to do that via API.

I am using [Events API v2 - POST an event — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/events-v2/post-event)

It’s not mentioned where and how to pass host information.

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [November 22, 2022, 4:11pm UTC](https://community.dynatrace.com/t/how-to-post-deployment-event-for-particular-host/37412/2 "2022-11-22T16:11:19Z")

</div>

You filter which entities an event should apply to via the entitySelector field where you enter an [entity selector](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector).

You could pass a single entityId or conditions that will match only that host.

---

<div class="post-metadata">

**Author:** ![mgome](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@mgome](https://community.dynatrace.com/u/mgome)\
**Post date:** [November 22, 2022, 6:17pm UTC](https://community.dynatrace.com/t/how-to-post-deployment-event-for-particular-host/37412/3 "2022-11-22T18:17:25Z")

</div>

There’s a sample payload in the “Push deployment events from Jenkins” section of the documentation

> **[Push deployment events from Jenkins](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/events-v1/push-deployment-events-from-jenkins)**
>
> Push Jenkins deployment events to Dynatrace.

{  
“eventType”: “CUSTOM\_DEPLOYMENT”,  
“attachRules”: {  
“tagRule”: {  
“meTypes”: “PROCESS\_GROUP\_INSTANCE”,  
“tags”: “Dev”  
}  
},  
“deploymentName”: “${JOB\_NAME}”,  
“deploymentVersion”: “1.1”,  
“deploymentProject”: “CustomBankingService”,  
“remediationAction”: “[http://revertMe](http://revertMe)”,  
“ciBackLink”: “${BUILD\_URL}”,  
“source”: “Jenkins”,  
“customProperties”: {  
“Jenkins Build Number”: “${BUILD\_ID}”,  
“Git commit”: “${GIT\_COMMIT}”  
}  
}

---

<div class="post-metadata">

**Author:** ![Naveen](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/naveen/32/2570_2.png) [@Naveen](https://community.dynatrace.com/u/Naveen)\
**Post date:** [November 23, 2022, 8:15am UTC](https://community.dynatrace.com/t/how-to-post-deployment-event-for-particular-host/37412/4 "2022-11-23T08:15:46Z")

</div>

Will we be able to inject the missing master data (machines , services), in case it doesn’t exists
