EarthChem REST Search Service Documentation
The EarthChem REST Search Service accepts GET string variables which determine search criteria.


The target URL for the EarthChem REST Search Service is:

http://ecp.iedadata.org/restsearchservice

Usage of GET Variables:


author
Author of reference citation.
title
Title of citation journal article.
journal
Name of citation journal.
doi
DOI of citation article. (Note: not all ciations have a DOI assigned.)
minpubyear
Minimum publication year of citation article. If minpubyear is provided, maxpubyear must also be provided.
maxpubyear
Maximum publication year of citation article. If maxpubyear is provided, minpubyear must also be provided.
exactpubyear
Exact publication year of citation article.
keyword
The keyword query searches a generic descriptor field contained in the EarthChem schema. This is a free-text field that allows the supported datasets to provide a descriptor of their own choosing. Most often, this field contains a short sample description describing the sample's location and composition. The keyword search also includes rock name in the queried results.
sampleid
Sample Identifier provided by source database.
polygon
This field allows a polygon to be provided in order to constrain results geographically. The polygon must be provided in a closed format of comma-delimited coordinate pairs.
Example:
-109.35 36.7875,-105.525 40.725,-104.5125 37.0125,-107.1 35.4375,-109.35 36.7875
north
Northern bound of a geographic envelope used to constrain results geographically.
If a northern bound is provided, an east, south, and west value must also be provided.
east
Eastern bound of a geographic envelope used to constrain results geographically.
If an eastern bound is provided, a south, west, and north value must also be provided.
south
Southern bound of a geographic envelope used to constrain results geographically.
If a southern bound is provided, a west, north, and east value must also be provided.
west
Western bound of a geographic envelope used to constrain results geographically.
If a western bound is provided, a north, east, and south value must also be provided.
level1
Material of the sample. This is an enumerated value. Possible values can be found in the EarthChem SOAP search schema.
level2
Rock type of the sample. This is an enumerated value. Possible values can be found in the EarthChem SOAP search schema.
level3
Composition of the sample. This is an enumerated value. Possible values can be found in the EarthChem SOAP search schema.
level4
Rock name provided by source database for the sample. This is an enumerated value. Possible values can be found in the EarthChem SOAP search schema.
minage
Minimum age of the sample. (Ma)
maxage
Maximum age of the sample. (Ma)
exactage
Exact age of the sample. (Ma)
geologicalage
Geological age of the sample. This is an enumerated value. Possible values can be found in the EarthChem SOAP search schema.
material
Material composition of the sample. This is an enumerated value. Possible values can be found in the EarthChem SOAP search schema.
searchtype
Desired type of search query. Possible values are "count", "rowdata", and "distinctitems"

count: returns count of results from query.
rowdata: returns table of results from query in the format of "outputtype" below. distinctitems: returns list of distinct items found within current query in the format of "outputtype" below.
outputtype
Desired output type from query. Possible values are "html", "csv", "xml", "json", "jsonp" and "staticmap".

html: returns HTML table of results from query.
csv: returns CSV table of results from query.
xml: returns XML document of results from query.
json: returns JSON document of results from query.
jsonp: returns JSON string wrapped in a Javascript function call defined by "jsonpfunction" below:
staticmap: returns map image of results from query.

Please note: When a searchtype of "count" is set, "html", "csv", and "staticmap" will return a plaintext integer count of samples from the query.
jsonfunction
Desired Javascript function to be wrapped around JSON in the event that "outputtype" is set to "jsonp"
outputlevel
Desired level of output from query. Possible values are "sample" and "method".

sample: returns one row per sample. If a sample has more than one material associated with it, a row will be returned for each material.

method: returns one row per method used to determine chemical values.
startrow/endrow
These values determine which rows of query will be displayed. The first row is always 0 and the last row is always the count value minus 1 (n-1).

Important: A maximum of 50 rows are allowed to be displayed at a time. Any start/end values that exceed a difference of 50 will result in the start value and start value + 50 values being displayed. If start/end values are not provided, rows 0-49 will be displayed.
standarditems
This element has a value of yes/no and determines if the standard chemical values should be displayed in the html,csv, or xml outputs. Using the standard items allows a consistent output from query to query for use in tables.

Standard items are:
SiO2, TiO2, Al2O3, Cr2O3, Fe2O3, Fe2O3 Total, FeO, FeO Total, NiO, MnO, MgO, CaO, Na2O, K2O, P2O5, LOI, H2O, H2O-, H2O+, S, Co2, F, Cl, Ag, As, Au, B, Ba, Be, Bi, Cd, Co, Cr, Cs, Cu, Ga, Hf, Hg, I, Ir, K, Li, Mn, Mo, Nb, Ni, Os, Pb, Pd, Pt, Rb, Re, S, Sb, Sc, Se, Sn, Sr, Ta, Te, Th, Ti, Tl, U, V, W, Y, Zn, Zr, La, Ce, Pr, Nd, Sm, Eu, Gd, Tb, Dy, Ho, Er, Tm, Yb, Lu, 87Sr / 86Sr, 143Nd / 144Nd, 206Pb / 204Pb, 207Pb / 204Pb, 208Pb / 204Pb, 176Hf / 177Hf, 176Lu / 177Hf, 187Os / 188Os, 10Be / Be, 3He / 4He, 87Rb/86Sr, 147Sm/144Nd, 238U/206Pb, 235U/207Pb, 232Th/208Pb
outputitems
Comma-separated list of items to be displayed. Items will be shown in html,csv, and xml output in order provided in the GET variable. This is an enumerated value. Possible values can be found in the EarthChem SOAP search schema.
showcolumnnames
Control display of column names in CSV and HTML output modes. Possible values are yes and no. Default value is no.
Example 1:
Show method level html output for samples matching author "smith". Include Sample ID, Source, Longitude, and Latitude.

HTTP Link:

http://ecp.iedadata.org/restsearchservice?author=smith&searchtype=rowdata&outputtype=html&showcolumnnames=yes&outputitems=sample_id,source,longitude,latitude
Example 3:
Show static map of samples between 55 and 56 Ma in the western United States.

HTTP Link:

http://ecp.iedadata.org/restsearchservice?north=49&east=-100&south=23&west=-124&minage=55&maxage=56&outputtype=staticmap