Get IGSN(s) for a specific user code and a sample name (NEW)
GET API
Request Headers
  • Accept: application/xml, application/json, text/xml, text/json
    Request Headers
    limit={limit}: maximum IGSN number for each page. If it is not specified, it will default to 100.
    page_no={page_no}: page number. If it is not specified, it will default to 1.
    hide_private={1 or 0 or none}: default to 0. If 1, it will not return IGSNs whose sample metadata are not publicly accessible.
    
    Response Body

    HTTP status codes:

  • 400 Bad Request - User Code is not valid.
  • 404 Not Found - No IGSNs associated with the given user code.
  • 200 Successful. It will return a list of IGSN(s) as follows.

Output format when the request is successful ( status code = 200 ) XML format:

<samples>
  <sample> 
    <igsn>NHB001B2E</igsn> 
    <url>http://igsn.org/NHB001B2E</url> 
  </sample>
</samples>
<total_countst>1</total_counts>

Example

curl -v -X GET -H "accept:application/xml" "https://app.geosamples.org/samples/user_code/NHB?sample_name=NMNH+148841-
00+(MIN)";

JSON format:

{ "igsn_list": [ "NHB001B2E"], "total_counts":1 }

Example:

curl -v -X GET -H "accept:application/json" "https://app.geosamples.org/samples/user_code/NHB?sample_name=NMNH+148841-
00+(MIN)";