Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Table of Contents

Individual Party Resources

GET (Retrieve), POST (Create), PUT (Update), and DELETE individual Party records

 

GET: An individual Party record

Request

Code Block
text
text
GET /directory/party/123
HOST: www.sciencebase.gov
Accept: application/json

    Alternative example using query param instead of Accept header

Response

Code Block
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8

{
   "link":{
      "rel":"self",
      "url":"https://www.sciencebase.gov/directory/person/1193"
   },
   "id":1193,
   "name":"Sky Bristol/RGIO/USGS/DOI",
   "displayName":"Sky Bristol",
   "displayText":"Sky Bristol",
   "url":"https://my.usgs.gov/catalog/Global/catalogParty/show/1193",
   "email":"sbristol@usgs.gov",
   "description":"Sky Bristol currently manages the Applied Earth Systems Informatics Research branch in the Core Science Analytics and Synthesis program of the Core Science Systems Mission Area. He strives to develop innovative technology solutions for USGS science.",
   "richDescriptionHtml":"<p>\n\tSky Bristol currently manages the Applied Earth Systems Informatics Research branch in the Core Science Analytics and Synthesis program of the Core Science Systems Mission Area. He strives to develop innovative technology solutions for USGS science.<\/p>",
   "aliases":[
      {
         "id":1,
         "alias":"R. Sky Bristol",
         "annotation":"publishing alias"
      },
      {
         "id":2,
         "alias":"Robert Schuyler Bristol",
         "annotation":"full legal name"
      },
      {
         "id":4,
         "alias":"Bristol, RS",
         "annotation":"publishing alias"
      },
      {
         "id":3,
         "alias":"Bristol, R. Sky",
         "annotation":"publishing alias"
      }
   ],
   "active":true,
   "primaryLocation":{
      "id":1866,
      "name":"Sky Bristol/RGIO/USGS/DOI - Primary Location",
      "building":"DFC Bldg 810",
      "buildingCode":"KBT",
      "officePhone":"303-202-4181",
      "faxPhone":"303-202-4710",
      "mailAddress":{
         "line1":"Box 25046, Denver Federal Center, Mail Stop 306",
         "mailStopCode":"306",
         "city":"Denver",
         "state":"CO",
         "zip":"80225-0046",
         "country":"USA"
      },
      "streetAddress":{
         "line1":"West 6th Ave. & Kipling St., DFC Bldg. 810",
         "city":"Lakewood",
         "state":"CO",
         "zip":"80225-0046",
         "country":"US"
      },
      "longitude":-105.1247994,
      "latitude2":null
   },
   "partyLocations":[
      {
         "link":{
            "rel":"self",
            "href":"https://www.sciencebase.gov/directory/location/1866/get"
         },
         "locationId":1866,
         "displayName":"Sky Bristol/RGIO/USGS/DOI - Primary Location",
         "primary":true,
         "sort":1
      }
   ],
   "permissions":{
      "read":{
         "acl":[
            "PUBLIC"
         ]
      },
      "write":{
         "acl":[
            "USER:sbristol@usgs.gov",
            "ROLE:PlotDataAdmin",
            "ROLE:ScienceBase_DataAdmin"
         ]
      }
   }
}

 

Party Properties

 

ID

Unique identifier, an integer.  This is used in the URI to identify the record for GET, POST, PUT and DELETE.

Code Block
"id":123

Name

A unique name for the record.  This property is required for a Party.

Code Block
"name":"John Doe/DOI/USGS"

DisplayName

An optional label to display instead of the record name.

Code Block
"displayName": "John Doe"

DisplayText

A read-only property add for convenience.

Code Block
"displayText": "John Doe"

URL

A web address for a page about the party.

Code Block
"url": "http://example.gov/homePageOf/jdoe"

Email

Code Block
"email": "jdoe@usgs.gov"

Description

Code Block
"description": "The happy employee who works on stuff."

Rich Description HTML

Code Block
"richDescriptionHtml": "The <b>happy</b> employe who &ldquo;works&rdquo; on <i>stuff</i>."

Aliases

Code Block
aliases: 
[
	{
		id: 3,
		alias: "Doe, John",
		annotation: "publishing alias"
    },

	{
		id: 4,
		alias: "Doe, J",
		annotation: "publishing alias"
    }
]

Active

A boolean flag to indicate the record is active.

Code Block
"active": true

Primary Location

Code Block
primaryLocation: 
{
id: 1866,

name: "Sky Bristol/RGIO/USGS/DOI - Primary Location",

building: "DFC Bldg 810",

buildingCode: "KBT",

officePhone: "303-202-4181",

faxPhone: "303-202-4229",

mailAddress: {line1: "Box 25046, Denver Federal Center, Mail Stop 306",

mailStopCode: "306",

city: "Denver",

state: "CO",

zip: "80225-0046",

country: "USA"


},

streetAddress: {line1: "West 6th Ave. & Kipling St., DFC Bldg. 810",

city: "Lakewood",

state: "CO",

zip: "80225-0046",

country: "US"


},

latitude2: null


},