Filtering List Resources

When submitting a GET request to certain REST API resources (also known as list resources), the system returns a list of records. For example, submitting a GET request to the samples resource returns a list of all submitted samples stored in the system. Depending on the resource being used, use various query parameters to filter the records based on certain criteria. For more information about the parameters that are available, refer to the reference documentation for the desired resource.

To filter a list, the resource and parameter must be separated with a question mark (?). The parameter and the value you want to base the query on must be separated with an equal sign (=).

When filtering a list of artifacts, combine parameters within the same query statement. You can also repeat certain parameters, specifying a new value with each occurrence of the parameter.

The first parameter must be preceded with a question mark (?). Add additional parameters by separating each parameter with an ampersand (&).

Repeating a parameter with new values:

Combining parameters:

When combining or repeating parameters, each record returned matches one of the parameter values, or all the parameter values, depending on the usage:

If the query statement contains multiple values for the same parameter, the ampersands are treated as an OR.
If the query statement contains values for multiple parameters, the ampersands are treated as an AND.

For example, if a project LIMS ID and a process type are provided as parameters, the system returns only the files that match both the project LIMS ID and the process type. To see the files that match the project LIMS ID or the process type, issue two separate GET requests and combine the results.

/api/v2/processes—This URI returns all processes run in the system.
/api/v2/processes?type=MALDI—This URI returns all MALDI processes run in the system.
/api/v2/processes?type=Sample Prepandtype=MALDI—This URI returns all MALDI or Sample Prep processes run in the system.
/api/v2/containers—This URI returns all containers in the system.
/api/v2/containers?type=Tube—This URI returns all tubes in the system.
/api/v2/containers?type=Tubeandname=27-111andname=27-112—This URI returns the tubes in the system that are named 27-111 OR 27-112.