Skip to end of metadata
Go to start of metadata

 

Parties Collection Resource

Search for parties.
Party is the superclass of Organization and Person and this collection resource provides generic search across all directory entities.

Query Form

https://my.usgs.gov/directory/parties/queryForm

Query Parameters

namevaluesdescription
modequick, agent

Search using the 'quick' or 'agent' search modes instead of the default mode.

quick mode is designed to support autocomplete inputs in ScienceBase. The normal full text search parameter, q, is used to search the beginnings of words in a few key party properties in additional to usual whole words elsewhere.

agent mode is designed to support the directory matching features in catalog

   
q(text)full text search
activetrue, false (boolean)limit results to only parties with the active flag set to true or false
emailemail addresssearch by email address
   
 
max(integer)maximimun number of records to return
offset(integer)skip the first N records, use this in combination with max page through results
formatjson, html, ....specify the output format to be JSON or HTML. This can also be accomplished with an 'Accepts' header.
sortname, displayName, ...the name of the field to sort by. When not specified, the results are sort by search score. Sorting by fields other than search score can negatively impact performance.
orderasc, descsort in ascending or descending order

Query Examples

 

GET: Search for Parties

https://www.sciencebase.gov/directory/parties?q=<keywords>



Request

GET directory/parties?q=bio HTTP/1.1
HOST: www.sciencebase.gov
Accept: application/json

   Alternative GET request using query param instead Accept header

Response

 

JSON Response
{
   "total":184,
   "selflink":{
      "rel":"self",
      "url":"https://www.sciencebase.gov/directory/parties?q=bio&format=JSON&max=10"
   },
   "nextlink":{
      "rel":"next",
      "url":"https://www.sciencebase.gov/directory/parties?q=bio&format=JSON&max=10&offset=10"
   },
   "parties":[
      {
         "type":"person",
         "id":50135,
         "name":"Bio, Kealii",
         "displayName":"Kealii Bio",
         "displayText":"Kealii Bio",
         "email":"kealii_bio@usgs.gov",
         "url":null,
         "description":"Record created from BASIS+ data.",
         "richDescriptionHtml":null,
         "note":"phone=|fax=mail=",
         "aliases":[

         ],
         "active":false,
         "firstName":"Kealii",
         "lastName":"Bio",
         "organization":{
            "id":18139,
            "displayText":"U.S. Geological Survey"
         },
         "permissions":{
            "read":{
               "acl":[
                  "ROLE:ScienceBase_DataAdmin",
                  "ROLE:PlotDataAdmin"
               ]
            },
            "write":{
               "acl":[
                  "ROLE:ScienceBase_DataAdmin",
                  "ROLE:PlotDataAdmin"
               ]
            }
         }
      },
      {
         "type":"organization",
         "id":59605,
         "name":"Biological Carbon Sequestration",
         "displayName":null,
         "displayText":"Biological Carbon Sequestration",
         "email":null,
         "url":null,
         "description":null,
         "richDescriptionHtml":null,
         "note":null,
         "aliases":[
            "Carbon Sequest - Bio"
         ],
         "active":true,
         "fbmsCodes":[
            {
               "id":383,
               "code":"GGHCGR0700",
               "annotation":"Old FBMS Code"
            }
         ],
         "permissions":{
            "read":{
               "acl":[
                  "ROLE:ScienceBase_DataAdmin",
                  "ROLE:PlotDataAdmin"
               ]
            },
            "write":{
               "acl":[
                  "ROLE:ScienceBase_DataAdmin",
                  "ROLE:PlotDataAdmin"
               ]
            }
         }
      },
      
      ...
   ]
}
  • No labels