Bugzilla:BzAPI:Search: Difference between revisions

Updated links to subpages from REST_API to BzAPI
m (Edmorley moved page Bugzilla:REST API:Search to Bugzilla:BzAPI:Search: Native REST)
(Updated links to subpages from REST_API to BzAPI)
Line 5: Line 5:
==Single Value, Multiplicable==
==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.).
For '''any single-valued [[Bugzilla:BzAPI: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.'''
Fields: '''product, component, severity, priority, etc. etc. etc.'''
Line 19: Line 19:
==Text Fields==
==Text Fields==


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.
For the following fields, specify some text to search for. You may also specify a '''$FIELDNAME_type''' parameter with a value from the [[Bugzilla:BzAPI: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 29: Line 29:
==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 (using booleans such as '''email1_creator''' - 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_creator''' - set to 1 if wanted), and the type of search to do ('''emailN_type''') from the [[Bugzilla:BzAPI: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_creator, emailN_cc, emailN_comment_creator'''
Fields: '''email1, email2, emailN_type, emailN_assigned_to, emailN_qa_contact, emailN_creator, emailN_cc, emailN_comment_creator'''
Line 73: Line 73:
Note that you can't construct a Boolean Chart where the "value" is the empty string. One way to get around this is to use a regex match for "^$".
Note that you can't construct a Boolean Chart where the "value" is the empty string. One way to get around this is to use a regex match for "^$".


You may search many [[Bugzilla:REST_API:Objects#Attachment|attachment fields]] by specifying a field of "attachment.<fieldname>". The exceptions are  creation_time, encoding, the ids, the refs, size and token. Flags on either attachments or bugs are searched for using the same fields below. Additional field values you can use are:
You may search many [[Bugzilla:BzAPI:Objects#Attachment|attachment fields]] by specifying a field of "attachment.<fieldname>". The exceptions are  creation_time, encoding, the ids, the refs, size and token. Flags on either attachments or bugs are searched for using the same fields below. Additional field values you can use are:


{| border="1"
{| border="1"
Confirmed users
1,927

edits