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: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