Forum Discussion

Lyubov's avatar
5 years ago

API v2: get alert detail Message

Hello,

I'm migrating from RPC API to REST and need to retrieve alerts with their full description (for processing in our own system).

Unfortunately, when I tried API v2, I could not get fieldset "detailMessage", even though it's mentioned on API v2 Swagger page. Also there I can't find any parameter like "needMessage" used in RPC API and REST API v1.

Is there any way to retrieve alert description (=subject in RPC, detailMessage.subject in REST v1) in alerts REST API v2? And do you plan to support such parameters/fields later?

  • To what UI field does this correspond? If you don't see the desired value in the UI, I'd think you cannot retrieve it from the API.

  • 23 hours ago, mhashemi said:

    To what UI field does this correspond? If you don't see the desired value in the UI, I'd think you cannot retrieve it from the API.

    I haven't worked with UI yet, but I guess field "detailedMessage.subject" (along with "detailedMessage.body") are configured as part of the event source, as described in docs.

  • Sorry, I don't know, to which field you are referring. Maybe you can post a screenshot?

  • 6 hours ago, mhashemi said:

    Sorry, I don't know, to which field you are referring. Maybe you can post a screenshot?

    I append image from docs with fields "alert subject" and "alert message" - I guess these fields are used in previous versions of API for 'detailMessage' fields; and also a result of calling REST API v1 where required fields are available.