Fields

Fields, as used in this documentation, are the resource schema columns.

A field is a name-value pair, where each field has a name identifier and may or may not have an associated value assigned. For example:

"chipBarcode": "AA0000000",
"chipType": "\"314R\"",
"date": "2013-05-07T17:48:53",

Field names are useful in the API for selecting resource elements and sorting results.

Select resources using field names

You can identify one or more resources by specifying the field name and the value to match on:

http://myhost/rundb/api/v1/location?format=json&name=myLab

In this example, all location resource elements whose name field is myLab are returned by the server.

See the Basic Filtering and Qualifying Filters sections of the Torrent Suite™ Software API Cookbook for a more detailed description of selecting resources using field names.

Sort resources by field names

You sort resources returned by the server using the order_by key word and assigning it a field name. All resource elements returned are sorted by the value of the specified field. The following example sorts experiment elements by date:

http://myhost/rundb/api/v1/experiment?format=json&order_by=date

See the Sort Response Output section of the Torrent Suite™ Software API Cookbook for more detailed information about using field names to sort results.

Table of contents

Previous topic

Key

Next topic

Filter Qualifiers

This Page