ew – Eksternwebben (www.uib.no)

The main(ish) web site for the university also provide some APIs that can be used to extract information.

areas – lists the areas

GET http://www.uib.no/api/areas.json
response
200 OK
Content-Type: application/json
{
  "areas": [
    {
      "id": 1,
      "sebra_id": 519,
      "ou": 112233,
      "type": "section",
      "parents": [ 1, 2, ],
      "name": {
        "nb": "...",
	"en": "...",
      }
    },
    ...
  ]
}

The web site is divided into areas representing organisational units, diciplines, or more general sections. This http://www.uib.no/api/areas.json lists information about these areas in a form that can be reused.

calendar – lists the most recent events

GET http://www.uib.no/api/calendar.json
response
200 OK
Content-Type: application/json
{
  "from_date": "2017-02-01T15:07:18+01:00",
  "events": [
    {
      "id": 104625,
      "type": "disputation",
      "title": "Tekstil i maleriets utvidede felt",
      "date_from": "2017-02-01 11:00:00Z",
      "date_to": "2017-02-01 16:00:00Z",
      "path": "kmd/104625/tekstil-i-maleriets-utvidede-felt",
      "language": "nb",
      "lead": "Hildur Bjarnadóttir disputerer 1. februar 2017",
      "location": "Auditoriet, Bergen Offentlige Bibliotek, Strømgaten 6"
    },
    ...
  ]
}

http://www.uib.no/api/calendar.json

driftsmeldinger – the most recent messages

GET http://www.uib.no/it/driftsmeldinger/siste.html
response
200 OK
Content-Type: text/html

<div class="w3-message">
....
</div>

The http://www.uib.no/it/driftsmeldinger/siste.html just returns a HTML fragment suitable for embedded in other pages that displays the most recent and relevant messages from the IT-department

msg – list most recent messages

GET http://www.uib.no/api/msg?...
language string = nb Language; either 'en' or 'nb'
msgid int Number
area int The area id
user string The UiB username
limit int = 10 How many messages to return
offset int Start listing messages at the given offset
tag string A tag name in English or Norwegian
response
200 OK
Content-Type: application/json
{
  "msg": [
    {
      "id": 9999,
      "text": "...",
      "link": "http://...",
      "tag": "Generelt",
      "area": "...",
      "area_link": "http://...",
      "posted": "2017-01-01T12:00:00",
      "posted_time": 1499999999,
    },
    ...
  ]
}

This endpoint returns selected messages ordered by most recent first. You need to provide either msgid, area or user parameter for messages to be selected.

Example: http://www.uib.no/api/msg?area=1 which will return the most recent messages posted to the Employee pages.

rss – data in RSS format

GET http://www.uib.no/{area}/meldinger.xml
tag string A tag name in Norwegian
response
200 OK
Content-Type: application/rss+xml
<?xml version="1.0" ?><rss version="2.0">
  ...
</rss>
GET http://www.uib.no/en/{area}/messages.xml
tag string A tag name in English
response
200 OK
Content-Type: application/rss+xml
<?xml version="1.0" ?><rss version="2.0">
  ...
</rss>

Examples

user – look up users by username

GET http://www.uib.no/user/uib/{username}
response
302 Found
Location: http://www.uib.no/nb/personer/Ola.Nordmann
...

Example

http://www.uib.no/user/uib/gaa041