20 Jun 2023 01:42 AM - last edited on 20 Jun 2023 08:12 AM by MaciejNeumann
Hey community,
I need your assistance with something:
I want to extract a list of acknowledged problems, that inside the list I will be able to see which user closed each problem.
Is it possible?
Thank you in advance!
Solved! Go to Solution.
20 Jun 2023 07:45 AM
Hi @YuvalKonstanti,
You can use Dynatrace problem api v2, where you can fetch problem list and loop through and filter based on your requirement apart from this you can directly pass query parameters get specific details.
Please check below documentation.
20 Jun 2023 12:03 PM
Try can use the API: https://www.dynatrace.com/support/help/dynatrace-api/environment-api/problems-v2/problems/get-proble...
Probably in the "Comment" field you should find info who changed the status of this issue.
Radek
20 Jun 2023 04:52 PM
Thank you for the reply guys.
I don't really get how to use it, I saw that there is an option to add:
authorName - which is the user who wrote the comment.
Can you please help me understand how I'm using it?
I'm using: "https://{environmentid}.live.dynatrace.com/api/v2/problems" but I don't get anything. Do I need to add this comment field to see the user?
Thank you in advance guys. I'm new to this and really appreciate your help!
21 Jun 2023 12:29 AM
Hello @YuvalKonstanti,
you can add the recentComment as a field to get the comments and you can use one of the following URLs
https://{environmentid}.apps.dynatrace.com/platform/classic/environment-api/v2/problems?fields=recentComments
as for the comment related to closing the problem you will find the context "dynatrace-problem-close"
"context":"dynatrace-problem-close"
21 Jun 2023 08:12 AM
This is how it should work
21 Jun 2023 10:00 AM
Hi @YuvalKonstanti,
You can use recentComments in query parameters.
21 Jun 2023 10:04 AM
See that's what @Mohamed_Hamdy wrote about it;)
21 Jun 2023 10:13 AM
Sorry @radek_jasinski my bad.
22 Jun 2023 04:48 PM
Hey Guys! many thanks for the help!
So right now I managed to extract the data, but I encountered two problems:
"recentComments" will add the comments to the problems, but can I see only the manually closed problems? (status = closed will not do the job because it's putting together manually closed and automatically closed problems).
Second thing is this:
"Page size can't be larger than 10 if the fields parameter is set".
Someone had any luck with finding a good solution for that? Because my goal is to extract a lot more than that, for example, the whole problems for a one day.
Thank you all!!