REST Api list incidents or get incident does not have correct description


(Eric Fontana) #1

It seems that when I create a ‘test’ incident via the website, the title of the incident and description of the incident are different. However, when reading this incident via the REST API, both title and description are the ‘title’ value. Seems like the ‘description’ field is returning the title when using the REST API.

For example:
this is a test alert.
a test alert created by eric - please don’t do anything to acknowledge or resolve.

both the ‘title’ and ‘description’ fields return ‘this is a test alert’

(Thomas Roach) #2

Are you following out REST API Reference Sheet? The title of the incident is listed as “title”, but the description of the incident (i.e. the incident contents) are listed as “details” under “body”. If you still have trouble after checking out the URL I linked, could you post the API payload you’re sending so I can take a look at what you’re attempting?

(Eric Fontana) #3

It is not returning the data,

curl -X GET --header ‘Accept: application/vnd.pagerduty+json;version=2’ --header 'Authorization: Token token=‘redacted’ ‘

I am not POSTIng an incident, I’m trying to ‘GET’ one. And it always returns the title and description as the ‘title’

(geeth) #4

This definitely looks a little wonky.

I don’t believe the REST API should be providing the description in the incident to begin with. You would normally need to use the log entry of the incident where the type is trigger_log_entry to view the description under the event_details but this also showed the title in the location the description should be.

Thanks for letting us know and I apologize for the inconvenience. I’ve submitted a bug to our engineering team regarding this.

(Eric Fontana) #5

I disagree, i want the title and description fields, i think the only bug here is that the description is being returned as the title. Thanks for letting the dev team know.

(geeth) #6

I’ll confirm if this is expected as well. I do not see description for the incident listed under the response schema of the documentation for GET /incidents except in the service’s description which is why I don’t believe it is expected except in the GET /log_entries.

(system) #7

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.