sebra.sws – persons and places exposed as XML via HTTP

person – look up information about a user

GET http://sebra.uib.no/sws/person?id={id}
id string user account id
user found
200 OK
Content-Type: text/xml
<person>
<id>...</id>
<name>...</name>
<surname>...</surname>
...
</person>
user not found
200 OK
Content-Type: text/plain
No data

This service looks up information about the persons of type staff and extern with the given user name. This service can't be used to look up information about persons of type student; if you try to get the user not found response.

If a person with the given user name exists then an XML document is returned. The root of the document will be the person and then there is a single textual element for each of the fields returned. The reported fields are:

  • id — this just echos the id passed in the request
  • name — the given name of the person (first name)
  • surname — the last name of the person
  • dateofbirth — the first 6 digits of the person's personnummer which usually corresponds to the date this person was born; DDMMYY. Unfortunately we will not tell you what century.
  • sex — either 'M' or 'F' or empty
  • address — street address of this person's office
  • postnr — the postal code for the street address above
  • postcode — the area name corresponding to postnr in upper case letters; typically the string "BERGEN"
  • land — the country name of the address; typically the string "Norge"
  • tlf — the office phone number (8 digits)
  • mobile — the mobile phone number (8 digits or empty)
  • epost — the UiB email address of this person

If no person with the given user name exists then a text/plain document is returned containing the string "\nNo data\n". The HTTP status code will be "200 OK" also in this case.

Additional information about his user can be obtained from staff, affiliated and student services. Only one of them will return addition information and you can not tell which one until you tried them.

Examples

GET http://sebra.uib.no/sws/person?id=gaa041 returns the following:

HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Fri, 18 Jun 2010 11:30:51 GMT
Server: Apache/2.2.11 (Unix) mod_python/3.3.1 Python/2.6.1 mod_ssl/2.2.11 OpenSSL/0.9.7d
Content-Type: text/xml
Keep-Alive: timeout=5, max=100

<?xml version="1.0" encoding="iso-8859-1"?>\40
<person>
    <id>gaa041</id>
    <name>Gisle</name>
    <surname>Aas</surname>
    <dateofbirth>160964</dateofbirth>
    <sex>M</sex>
    <address>Nyg\xE5rdsgt. 5</address>
    <postnr>5020</postnr>
    <postcode>BERGEN</postcode>
    <land>Norge</land>
    <tlf>55588996</tlf>
    <epost>Gisle.Aas@it.uib.no</epost>
</person>\n

GET http://sebra.uib.no/sws/person?id=none returns the following:

HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Fri, 18 Jun 2010 11:30:52 GMT
Server: Apache/2.2.11 (Unix) mod_python/3.3.1 Python/2.6.1 mod_ssl/2.2.11 OpenSSL/0.9.7d
Content-Type: text/plain
Keep-Alive: timeout=5, max=100


No data\n