3

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.

2 Answers 2

2

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

1

I completely agree: consistent behavior is needed.

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

1
  • 1
    redundancy: see redundancy. Jun 3, 2010 at 6:08

You must log in to answer this question.

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