# How to create problem via v2 API?

**URL:** <https://community.dynatrace.com/t/how-to-create-problem-via-v2-api/39064>\
**Category:** Dynatrace API\
**Tags:** problem-notification, dynatrace-api\
**Created:** [March 29, 2023, 8:31am UTC](https://community.dynatrace.com/t/how-to-create-problem-via-v2-api/39064 "2023-03-29T08:31:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![guihoon\_hwang](https://avatars.discourse-cdn.com/v4/letter/g/cc9497/32.png) [@guihoon\_hwang](https://community.dynatrace.com/u/guihoon_hwang)\
**Post date:** [March 29, 2023, 8:31am UTC](https://community.dynatrace.com/t/how-to-create-problem-via-v2-api/39064/1 "2023-03-29T08:31:26Z")

</div>

Hi,

Can I create a problem for the service using api with the name of the service?

thanks.

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [March 29, 2023, 8:49am UTC](https://community.dynatrace.com/t/how-to-create-problem-via-v2-api/39064/2 "2023-03-29T08:49:27Z")

</div>

Hello&nbsp;[@guihoon\_hwang](https://community.dynatrace.com/user/61314)

Would you mind elaborating on your requirements a little more?

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![guihoon\_hwang](https://avatars.discourse-cdn.com/v4/letter/g/cc9497/32.png) [@guihoon\_hwang](https://community.dynatrace.com/u/guihoon_hwang)\
**Post date:** [March 29, 2023, 8:53am UTC](https://community.dynatrace.com/t/how-to-create-problem-via-v2-api/39064/3 "2023-03-29T08:53:12Z")

</div>

hi&nbsp;Babar

I want to create a problem using dyatrace api

I wonder if I can use the name of the service that I want to create a problem with the key value of API.

thanks,

guihoon

---

<div class="post-metadata">

**Author:** ![MichalOlszewski](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@MichalOlszewski](https://community.dynatrace.com/u/MichalOlszewski)\
**Post date:** [March 29, 2023, 1:26pm UTC](https://community.dynatrace.com/t/how-to-create-problem-via-v2-api/39064/4 "2023-03-29T13:26:28Z")

</div>

Hi&nbsp;[@guihoon\_hwang](https://community.dynatrace.com/user/61314)

I’m guessing You would like to create EVENT via APIv2 that is one of the Opening Problem types (Error\_Event, Custom\_Alert or such). Details in link:[Events API v2 - POST an event — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/events-v2/post-event#parameters)

This way Dynatrace will open a Problem on related objects and will start analyzing surrounding components and impact.

As Event target can be chosen using EntitySelector, You can simply target them with name, id or even tags.

Still it’s worthy to check if You can’t do it without fetching/pushing external data.

Ex: Custom error detection, tuning AnomalyDetection or creating CustomEvents for Alerting using some internal metrics or data from RequestAttributes

Bests

Michal

---

<div class="post-metadata">

**Author:** ![MarcoCritti](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marcocritti/32/8974_2.png) [@MarcoCritti](https://community.dynatrace.com/u/MarcoCritti)\
**Post date:** [March 29, 2023, 1:53pm UTC](https://community.dynatrace.com/t/how-to-create-problem-via-v2-api/39064/5 "2023-03-29T13:53:24Z")

</div>

![Screenshot 2023-03-29 at 15.49.56.png](https://global.discourse-cdn.com/dynatrace/original/2X/5/59c4c3ff443bfd97259b73d5c6eaaf9340757844.png)  
As I understand it, you want to use the API and create a custom event that will then show up in your Dynatrace Problem overview.

Cheers  
Marco

---

<div class="post-metadata">

**Author:** ![guihoon\_hwang](https://avatars.discourse-cdn.com/v4/letter/g/cc9497/32.png) [@guihoon\_hwang](https://community.dynatrace.com/u/guihoon_hwang)\
**Post date:** [March 30, 2023, 12:34am UTC](https://community.dynatrace.com/t/how-to-create-problem-via-v2-api/39064/6 "2023-03-30T00:34:23Z")

</div>

hi Michal

Thank you for the good information.

guihoon

---

<div class="post-metadata">

**Author:** ![guihoon\_hwang](https://avatars.discourse-cdn.com/v4/letter/g/cc9497/32.png) [@guihoon\_hwang](https://community.dynatrace.com/u/guihoon_hwang)\
**Post date:** [March 30, 2023, 12:34am UTC](https://community.dynatrace.com/t/how-to-create-problem-via-v2-api/39064/7 "2023-03-30T00:34:34Z")

</div>

hi Marco

Thank you for the good information.

guihoon
