Neotoma Developer Center

Remote programmatic access to the Neotoma Database

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
use [2013/02/21 16:17]
brian [Response Structure]
use [2016/02/29 16:55]
brian [Substring Searches in Parameters]
Line 23: Line 23:
   * Some parameters support wildcards (see below)   * Some parameters support wildcards (see below)
 ===== Substring Searches in Parameters ===== ===== Substring Searches in Parameters =====
-Spaces and the wildcard are supported in search strings. Spaces are useful for separating whole words and word components. For example, taxa search results for "%pinus" include alpinus, carpinus, lupinus, etc. Searching instead for "pinus" will narrow the results to just the word pinus. ​ The following table illustrates several ways that the wildcard can be used to more finely control how your search string is matched.+Spaces and the wildcard are supported in search strings. Spaces are useful for separating whole words and word components. For example, taxa search results for "*pinus" include alpinus, carpinus, lupinus, etc. Searching instead for "pinus" will narrow the results to just the word pinus. ​ The following table illustrates several ways that the wildcard can be used to more finely control how your search string is matched.
  
 ^Desired Result^Example ^ ^Desired Result^Example ^
-|contains |sitename=%cotton+|contains |sitename=*cotton
-|begins with |sitename=Cotton+|begins with |sitename=Cotton
-|ends with |sitename=%Lake |+|ends with |sitename=*Lake |
 |is exactly |sitename=Cottonwood Lake | |is exactly |sitename=Cottonwood Lake |
  
Line 35: Line 35:
 <​file>​http://​api.neotomadb.org/​v1/​dbtables/​AgeTypes?​format=xml</​file>​ <​file>​http://​api.neotomadb.org/​v1/​dbtables/​AgeTypes?​format=xml</​file>​
 ===== Response Structure ===== ===== Response Structure =====
-Server errors excluded (e.g. HTTP 404), all JSON-formatted responses are structured as a single JSON object with two name:value pairs. ​ The first pair handles request status and the second handles either data, or a status message. The name of the first pair is always "​success;"​ it returns 1 if true, and 0 if false (error). If a request is successful, the second pair name is "​data"​ and its value is an array of data objects. Otherwise, if a request fails, the second pair name is "​message"​ and its value is a string containing a description of the error. XML-formatted responses are structured equivalently using nodes/tags instead of JSON objects; the root tag is <​Results>​.+Server errors excluded (e.g. HTTP 404), all JSON-formatted responses are structured as a single JSON object with two name:value pairs. ​ The first pair handles request status and the second handles either data, or a status message. The name of the first pair is always "​success;"​ it returns 1 if true, and 0 if false (error). If a request is successful, the second pair name is "​data"​ and its value is an array of data objects. Otherwise, if a request fails, the second pair name is "​message"​ and its value is a string containing a description of the error. 
 + 
 +XML-formatted responses are structured equivalently using nodes/tags instead of JSON objects; the root tag is <​Results>​.
  
 <​file>​ <​file>​

Page Tools