An API for a foundation's online museum
Opening the museum's database to partners and to the future website.
Andrew · Founder, project directorA foundation publishes an online museum. It holds exhibitions, photos, sound recordings and archive films, and thousands of biographical records. An app also lists places of remembrance, plaques, steles and monuments, with their position on a map.
Early this year, the foundation is preparing a redesign of the website. The site has aged, the app can no longer be downloaded on Android, and all the content is in a single database, accessible only through the current website.
What we proposed
In March, we proposed an API: a documented and protected way into the database, which the new website, the app and the museum’s partners could each use on their own side. The old website keeps running in the meantime, on the same database.

The database as it is
The database was not designed to be read from the outside. It grew with the website. It describes people, events, places organised by town, département, region and country, media, photo albums, exhibitions and their tabs, partners, and bibliographic resources.
These elements depend on each other. A media item refers to a type, to rights, to a place and to the person who added it. An exhibition has its media, its themes and its partners. To create an event, the category and the town must already exist.
We kept this model as it was. Each type of content has its own address in the API, and you move from one to another through the links that already exist in the database: from a person to their documents, from a media item to the exhibitions that show it, from an exhibition to its partners.
The choices
- REST and JSON, written in TypeScript, connected to the existing MySQL database.
- One account per user, with two levels of rights: reading and writing content, or managing accounts.
- Paged lists, with the total number of results.
- Light links included in the response, such as the place of an event; heavy links given by their identifier, to be loaded afterwards if needed.
- A global search engine, with filter criteria.
The documentation is interactive: each address can be tried directly in the browser, with its parameters and sample responses. We also wrote a guide describing the content, its links, and the order in which to create elements that depend on each other.
Where we are
The API has been in production since 30 June.