3

I have run /me/notifications/unread. The response contains post_id and there is a link to it.

This link is wrong. The post is on Stack Apps but the link directs to Stack Overflow:

enter image description here

I have hovered my mouse over the link which is shown next to post_id.
This link is not present in responses of other API functions that give similar results like notifications in /notifications/unread

1 Answer 1

2

This is a very minor bug in the documentation page.
The online doc page adds a convenient hyperlink to the post (The link part is not in the API's JSON response). That's a good thing.

Most of the time this is rock solid, but notifications span all Stack exchange sites and the API doc pages normally only expect one site at a time.

When the page is making that optional convenience link, it keys off of the site parameter. :

user's screen shot as it should have been posted

This works fine on all other doc pages, but obviously fails for the few cross-site objects, like notifications.


As for the rest, the documentation clearly says:

post_id 2.1       integer, refers to a post, may be absent

(Emphasis added)

post_id is present only when the notification refers to a specific post. Like when it was edited, closed, etc.

3
  • How does that link point to correct post? The link to which post_id is pointing to is given in the bottom right side in chrome. Is that the correct link?
    – amit jha
    Aug 25, 2015 at 8:49
  • Only the first line in your answer was useful.
    – amit jha
    Aug 25, 2015 at 8:53
  • You're right; I did not read your question closely enough. Revamped my answer. Aug 25, 2015 at 9:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .