6

Hitting the following /questions route:

http://api.stackoverflow.com/1.0/questions/74?pagesize=1&page=1

the endpoint returns this JSON data:

{
  "total": 1,
  "page": 1,
  "pagesize": 1,
  "questions": [
    {
      "answer_count": 0,
      "favorite_count": 0,
      "question_timeline_url": "/questions/74/timeline",
      "question_comments_url": "/questions/74/comments",
      "question_answers_url": "/questions/74/answers",
      "question_id": 74,
      "creation_date": 1217598122,
      "last_activity_date": 1217598122,
      "up_vote_count": 0,
      "down_vote_count": 0,
      "view_count": 0,
      "score": 0,
      "community_owned": false
    }
  ]
}

Another example with question_id 2733:

{
  "total": 1,
  "page": 1,
  "pagesize": 1,
  "questions": [
    {
      "answer_count": 0,
      "favorite_count": 0,
      "question_timeline_url": "/questions/2733/timeline",
      "question_comments_url": "/questions/2733/comments",
      "question_answers_url": "/questions/2733/answers",
      "question_id": 2733,
      "owner": {
        "user_id": 429,
        "user_type": "registered",
        "display_name": "Patrick",
        "reputation": 6466,
        "email_hash": "05ce4158a6d636a028bd108bf52cd492"
      },
      "creation_date": 1217964389,
      "last_edit_date": 1217964765,
      "last_activity_date": 1217964765,
      "up_vote_count": 8,
      "down_vote_count": 1,
      "view_count": 0,
      "score": 7,
      "community_owned": true
    }
  ]
}

Title parameter is missing; so what kind of question are these?
I found them because tipically I expect something like this for question_id not found:

{

     total: 0
     page: 1
     pagesize: 0
     questions: [ ]

} 

EDIT:
Merging?
Related:
Merging/migration should be reflected by the API
https://meta.stackoverflow.com/questions/50761/when-a-question-is-merged-redirect-original-question-url-to-new-one-automaticall

1
1

Its because post id 74 is an answer, not a question.

This was an undiscovered bug in the API back when we froze it, but enough [app]s depend on it that we haven't "fixed" it.

Naturally, answers have no titles or tags.

4
  • I'm discovering a lot of ids with the same behaviour on my log, is it useful to report them or you do not have problem to query them all from db? Nov 26 '10 at 21:20
  • @systempuntoout - every answer id (all ~3 million of them) will exhibit the same behavior. Its basically [wont-fix] for v1, but will be resolved in a subsequent version. Nov 26 '10 at 21:22
  • so basically we get questions: [ ] just for question_id that does not have a question associated AND an answer with the same id? Nov 26 '10 at 21:27
  • 1
    @systempuntoout - questions and answers share an id sequence (note: implementation detail, don't depend on that if possible), so there will never be an id that is valid for both an answer and an id. You'll get [] back if the id hasn't been used (or was used, and the question/answer was deleted). Nov 26 '10 at 21:29

You must log in to answer this question.

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