APIs
The University of Bergen Library (opens in a new tab)'s API are a work-in-progress. It aims to provide JSON-formatted data as a REST-style service that allows developers to explore and integrate the library’s public data into their projects. This API is the same tool that will power our website and many other technologies in the library.
Quick Start
An API (opens in a new tab) is a structured way that one software application can talk to another.
The API is a RESTful API, which means that it uses HTTP requests to GET, PUT, POST and DELETE data. It uses standard HTTP response codes to indicate the success or failure of requests. In short, if you can do it in a browser, you can do it with our API.
OpenAPI
The API is documented using the OpenAPI (opens in a new tab) specification. Currently two APIs are documented.
- https://api-ub.vercel.app/spec (opens in a new tab)
- https://ordbokene.no/api/swagger-ui.html (opens in a new tab)
Example
You can access the /items listing endpoint in our API by visiting the following URL to see all the published artworks in our collection:
https://api-ub.vercel.app/items (opens in a new tab)
If you want to see data for just one items, you can use the /items/{id} detail endpoint. For example, here's a photograph by Jørgen Grinde:
https://api-ub.vercel.app/items/ubb-jg-n-0614-06 (opens in a new tab)
Any valid id or signature from these datasets will be resolved. Test some example manifests!
Sources
This API serves data from Marcus and The Norwegian archive for queer history.
Resources
- OpenAPI Spec (swagger) (opens in a new tab)
- JSONLD Context (opens in a new tab)
- UBBONT Ontology (opens in a new tab)
Other APIs at the University of Bergen Library
Example IIIF manifests
Items
https://api-ub.vercel.app/items/ubb-ms-0003
Manifest
https://api-ub.vercel.app/items/ubb-ms-0003?as=iiif
https://api-ub.vercel.app/items/ubb-ms-0003/manifest
RDF Object (defaults to JSON-LD)
https://api-ub.vercel.app/items/ubb-ms-0003?as=rdf
/items/{id}?as=rdf (ubb-ms-0003 as example). Default response format is JSON-LD, equalt to &format=json
.
RDF Object as turtle
https://api-ub.vercel.app/items/ubb-ms-0003?as=rdf&format=turtle
/items/{id}?as=rdf&format=turtle (ubb-ms-0003 as example).
RDF Object as XML
https://api-ub.vercel.app/items/ubb-ms-0003?as=rdf&format=xml
/items/{id}?as=rdf&format=xml (ubb-ms-0003 as example).
Events
https://api-ub.vercel.app/events
https://api-ub.vercel.app/events/06432057-3664-4600-b1e7-4a752413ddc7
IIIF Collection Manifest
https://api-ub.vercel.app/collections
https://api-ub.vercel.app/collections/billedsamlingen
https://api-ub.vercel.app/collections/search?id=ubb-kk-
https://api-ub.vercel.app/collections/search?id=ubb-kk-&page=2
Actors
https://api-ub.vercel.app/actors
https://api-ub.vercel.app/actors/03f5c6c6-ce72-41b2-9797-034658c7950c