...
The RMA Path specifies a set of associations from a resource. The simplest form is a comma-separated list of association names. Association names are lower case and may be singular or plural depending on the type of association.
Code Blocknoformat |
---|
probes,organism,chromosome |
...
Indicate multiple levels of association with nested parentheses. Follow multiple associations from a model by using commas.
Code Blocknoformat |
---|
probes(orientation,predicted_sequence) |
...
Filter the resources that are included in the query results using square brackets following an association. Operators include equal ($eq), not equal ($ne), like ($li), greater than ($gt), less than ($lt), greater or equal ($ge) less or equal ($le) in ($in) and case-insensitive like ($il).
Code Blocknoformat |
---|
genes[acromym$eq'ABAT'] |
The left hand side of the filter is an attribute name. It may be qualified with a lower case plural table name to resolve ambiguity using the form table.attribute. At times the model name in a filter may not match the association name due to inheritance.
Code Blocknoformat |
---|
predicted_sequence[sequences.sequence_length$eq948] |
The right hand side may be a number, a string or a qualified attribute or association name. Strings should be enclosed in single quotes, but the quotes may be omitted when there is no ambiguity. The asterisk (*) is treated as a wildcard for the like and ilike string comparison operators.
Code Blocknoformat |
---|
genes[chromosome.name$eq'X'] ontologies[name$il'*human*'] |
A filter without an operator or a right hand side is treated as an existence test. It removes records with null values for an attribute. In many cases an _id attribute can be used to test whether any associated resources exist.
Code Blocknoformat |
---|
probes[orientation_id] |
Apply multiple filters to a set of resources using extra filter clauses in square brackets. The effect is a boolean 'and'.
Code Blocknoformat |
---|
chromosome[organism_id$eq1][name$ne'X'][name$ne'Y'] |
Use filters without any association at the start of the criteria field of a query URL to filter resources from the model in the URL.
Code Blocknoformat |
---|
http://api.brain-map.org/api/v2/data/Organism/query.xml?criteria=[name$il'*human*'][id$ne15] http://api.brain-map.org/api/v2/data/Gene/query.xml?criteria=[acronym$il'abat']&include=organism |
...
The model axis begins an API data query. The right hand side of a model step is a model name. Use the model axis is used in combination with steps along the attribute axis and filters to form a complete model stage.
Code Blocknoformat |
---|
model::Gene,probes(orientation,predicted_sequence) |
Use the rma axis to modify the RMA query. The right hand side of an rma step is the name of the option. An rma::criteria step will cause following attribute steps to specify what associations are used in retrieving the data. An rma::include step will cause following attribute steps to specify what associations are displayed in the message response body. Use an rma::options step to specify sorting, paging and ordering options.
Code Blocknoformat |
---|
model::Gene,rma::criteria,organism[name$il'Homo Sapiens'],rma::include,probes,chromosome,rma::options[num_rows$eq10] |
...