Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

There appears to be some inconsistency in the way multiple ids are being handled, especially when a duplicate exists.

Duplicate ID is significant

For example, when requesting a timeline of multiple questions, a duplicate ID is not ignored, and duplicate data will be returned:

The result contains the timelines for the question 2892513 twice, and 2892509 once.

Reference: /questions/{id}/timeline API documentation

Duplicate ID is ignored

Meanwhile, when requesting multiple questions, the duplicate ID is ignored, and only the results of unique IDs are returned:

This result contains the question 2892513 and 2892509 once each.

Reference: /questions/{id} API documentation

Documentation

In both of the above cases, the documentation says the following about how to specify the id parameter:

id

  • A single primary key identifier or a vectorized, semicolon-delimited list of identifiers.
  • string

It does not specify the behavior of the method when duplicate IDs are given, and if anything, since it mentions that it is a list of identifiers, duplicate IDs should not be ignored.

What should be done?

What is needed is to provide a consistent behavior between methods when multiple IDs are specified.

If consistent behavior across the board would not be appropriate for all methods, the exception should be noted in the methods where the behavior is not consistent.

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

Methods now return only a single result for a given id, even if that id is found multiple times in the passed {id} field.

share|improve this answer
add comment

I completely agree: consistent behavior is needed.

Personally, I believe that ignoring duplicates is better, as I'm against such redundancy.

share|improve this answer
1  
redundancy: see redundancy. –  Sky Sanders Jun 3 '10 at 6:08
add comment

You must log in to answer this question.

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