Account confirmers, Anti-spam team, Confirmed users, Bureaucrats and Sysops emeriti
4,925
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
This page defines the URL parameter interface for searching for bugs using the HTTP API (/bug GET). At the moment, the search API call does also support the field names from the web interface, to make it easy to port URLs and other code across. But if supporting this becomes difficult, it might go away. | This page defines the URL parameter interface for searching for bugs using the HTTP API (/bug GET). At the moment, the search API call does also support the field names from the web interface, to make it easy to port URLs and other code across. But if supporting this becomes difficult, it might go away. | ||
==Single Value, Multiplicable== | |||
For '''any single-valued [[Bugzilla:REST_API:Objects#Bug|Bug]] field''' other than the ones specified below as being special, you can specify any number of individual discrete values as separate URL parameters with identical keys. Multiple values will be ORed together. This includes bug custom fields and (where it makes sense) also works for the field names given in the Boolean Charts section (attachments, comments, flags etc.). | |||
Fields: '''product, component, severity, priority, etc. etc. etc.''' | |||
E.g. component=XML&severity=critical&severity=blocker | |||
==Text Fields== | ==Text Fields== | ||
For the following fields, specify some text to search for | For the following fields, specify some text to search for. You may also specify a '''$FIELDNAME_type''' parameter with a value from the [[Bugzilla:REST_API:Search#Types|list of types]]. If you do not, the default is ''contains_all'' for keywords, and ''contains_all_words'' for everything else. | ||
Fields: '''comment, keywords, summary, url, whiteboard''' | Fields: '''comment, keywords, summary, url, whiteboard''' | ||
| Line 13: | Line 22: | ||
==Person Fields== | ==Person Fields== | ||
Specify up to two strings, as '''email1''' and '''email2''', and then specify the fields in which to search for those strings (booleans - set to 1 if wanted), and the type of search to do ('''emailN_type''') from the [[Bugzilla:REST_API:Search#Types|list of types]]. You can specify multiple email addresses, comma-separated. | Specify up to two strings, as '''email1''' and '''email2''', and then specify the fields in which to search for those strings (using booleans such as '''email1_reporter''' - set to 1 if wanted), and the type of search to do ('''emailN_type''') from the [[Bugzilla:REST_API:Search#Types|list of types]]. You can specify multiple email addresses, comma-separated. | ||
Fields: '''email1, email2, emailN_type, emailN_assigned_to, emailN_qa_contact, emailN_reporter, emailN_cc, emailN_comment_author''' | Fields: '''email1, email2, emailN_type, emailN_assigned_to, emailN_qa_contact, emailN_reporter, emailN_cc, emailN_comment_author''' | ||
| Line 41: | Line 50: | ||
E.g. changed_after=2008-08-08&changed_before=2009-09-09&changed_field=priority&changed_field_to=P1 | E.g. changed_after=2008-08-08&changed_before=2009-09-09&changed_field=priority&changed_field_to=P1 | ||
==Boolean Charts== | ==Boolean Charts== | ||
The Bugzilla "boolean charts" mechanism is the way to construct more complex queries, | The Bugzilla "boolean charts" mechanism is the way to construct more complex queries, e.g. ones where you want a search type other than a simple "equals". | ||
The parameters for each triple are '''fieldA-B-C''', '''typeA-B-C''' and '''valueA-B-C''', where A, B and C are integers beginning at 0. | The parameters for each triple are '''fieldA-B-C''', '''typeA-B-C''' and '''valueA-B-C''', where A, B and C are integers beginning at 0. | ||