Documentation
APIs

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.

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

Other APIs at the University of Bergen Library

Example IIIF manifests

SourceJSONManifestMirador
Marcus/collections/search?id=astrup-samlingen---open in new window (opens in a new tab)
Marcus/items/ubb-ms-0003/items/ubb-ms-0003?as=iiifopen in new window (opens in a new tab)
Marcus/items/ubb-jg-n-0614-06/items/ubb-jg-n-0614-06?as=iiifopen in new window (opens in a new tab)
Marcus/items/ubb-ms-0185-j-a-007/items/ubb-ms-0185-j-a-007?as=iiifopen in new window (opens in a new tab)
Marcus/items/ubb-wil-f-208/items/ubb-wil-f-208?as=iiifopen in new window (opens in a new tab)
Skeivt arkiv/items/ubb-ska-0001-f-01-01-02/items/ubb-ska-0001-f-01-01-02?as=iiifopen in new window (opens in a new tab)
Skeivt arkiv/items/ubb-ska-a0009-u-457/items/ubb-ska-a0009-u-457?as=iiifopen in new window (opens in a new tab)
Skeivt arkiv/items/ubb-ska-a0033-u-0002/items/ubb-ska-a0033-u-0002?as=iiifopen in new window (opens in a new tab)

Items

https://api-ub.vercel.app/items/ubb-ms-0003
/items{id} (ubb-ms-0003 as example)

Manifest

https://api-ub.vercel.app/items/ubb-ms-0003?as=iiif
https://api-ub.vercel.app/items/ubb-ms-0003/manifest
/items/{id}?as=iiif (ubb-ms-0003 as example)

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 
/collections

Actors

https://api-ub.vercel.app/actors
https://api-ub.vercel.app/actors/03f5c6c6-ce72-41b2-9797-034658c7950c