API Design Questions

Gervase Markham gerv at mozilla.org
Wed Sep 23 11:14:13 UTC 2009

Here are some things I've run into when designing the RESTful API. 
Perhaps people could tell me what they think the best option is.


The current design uses URLs of the form:

However, attachids are globally unique, not per-bug unique. And this URL 
form means you need to know the bug number before you can access the 
attachment, which seems unnecessary (or it would mean the API just 
ignored the bug number, which seems somewhat dumb too). If all you have 
is e.g. a standard attachment URL, you don't have the bug number.

So should I change it to use URLs simply of the form



A similar question arises with comments, where the comment IDs used on 
the interface are globally unique. Do you think people would prefer to 
access individual comments using URIs like:
(i.e. indexed by count in the bug, as you might get from 

or like


? I think the former (i.e. different from the attachments case), but I'd 
be interested in the opinions of others. But if we do use the former, 
what do we do with the globally-unique comment IDs? Suppress them 
because they'd cause confusion?


dev-apps-bugzilla mailing list
dev-apps-bugzilla at lists.mozilla.org

More information about the developers mailing list