SoR Role Resource

SoR Role

The SoR Role resource as defined by the Open Registry is identified by the following URI:

/sor/{sorSourceId}/people/{sorPersonId}/roles/{sorRoleId}

Note: {sorSourceId} is something like Registrar, HR, etc.

Add SoR Role

HTTP POST /sor/{sorSourceId}/people/{sorPersonId}/roles
  • HTTP request headers:
    • Content-Type: application/xml
  • HTTP request entity body:
    • <open-registry-role> XML representation
  • HTTP response entity body:
    • empty (in case of 201)
  • HTTP status codes:
    • 201: the new role resource is successfully created
    • 404: URI identifies a nonexistent person or a predefined role type
    • 400: the role XML representation is malformed e.g. fails internal validation or the 'sor' URI query parameter is missing
    • 415: the request entity body is missing
    • 401/403: the authentication/authorization fails
    • 500: any other server error that occurs

Update SoR Role

HTTP PUT /sor/{sorSourceId}/people/{sorPersonId}/roles/{sorRoleId}
  • HTTP request headers:
    • Content-Type: application/xml
  • HTTP request entity body:
    • <open-registry-role> XML representation
  • HTTP response entity body:
    • empty (in case of 204)
  • HTTP status codes:
    • 204: the role resource is successfully updated
    • 404: the system of record person or role identified by this URI is not found
    • 400: the role XML representation is malformed e.g. fails internal validation or the 'sor' URI query parameter is missing
    • 415: the request entity body is missing
    • 401/403: the authentication/authorization fails
    • 500: any other server error that occurs

Delete SoR Role

HTTP DELETE /sor/{sorSourceId}/people/{sorPersonId}/roles/{sorRoleId}
HTTP DELETE /sor/{sorSourceId}/people/{sorPersonId}/roles/{sorRoleId}?mistake=true
  • HTTP response entity body:
    • empty (in case of 204)
  • HTTP status codes:
    • 204: the system of record role resource has been successfully deleted
    • 400: if one of the required arguments is missing
    • 404: the system of record person or role identified by this URI is not found
    • 401/403: the authentication/authorization fails
    • 500: any other server error that occurs

Representations

Request for: Add SoR Role and Update SoR Role

<open-registry-role> example representation
<?xml version="1.0" encoding="UTF-8"?>
<open-registry-role title="Associate Professor" affiliation="Faculty" start-date="2009-01-02" end-date="2011-05-22" percentage="100" sponsor-id="DCEO" sponsor-type="ORG_UNIT" organizational-unit="10110" system-of-record="TEST">
	<addresses>
		<address type="HOME">
			<line1>225 Main st.</line1>
			<line2>distr.</line2>
			<line3>xxx</line3>
			<city>Main City</city>
			<postal-code>70097</postal-code>
			<country-code>US</country-code>
			<region-code>NJ</region-code>
		</address>
		<address type="CAMPUS">
			<line1>5 Main ave</line1>
			<city>New Brunswick</city>
			<postal-code>08887</postal-code>
			<country-code>US</country-code>
			<region-code>NJ</region-code>
		</address>
	</addresses>

	<emails>
		<email type="HOME" address="jd@gmail.com"/>
		<email type="CAMPUS" address="jd@example.com"/>
	</emails>

	<urls>
		<url type="Home page" address="http://example.com/mypage"/>
		<url type="Twitter profile" address="http://twitter.com/myprofile"/>
	</urls>

	<phones>
		<phone type="LANDLINE" address-type="HOME" phone_line_order='1'>
			<country-code>1</country-code>
			<area-code>908</area-code>
			<number>787-7654</number>
		</phone>
		<phone type="LANDLINE" address-type="CAMPUS" phone_line_order='1'>
			<country-code>1</country-code>
			<area-code>908</area-code>
			<number>123-4567</number>
			<extension>556</extension>
		</phone>
	</phones>
</open-registry-role>