Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (39 sloc) 2.57 KB

ursa major

A microservice to discover and store bags.

ursa major is part of Project Electron, an initiative to build sustainable, open and user-centered infrastructure for the archival management of digital records at the Rockefeller Archive Center.

Build Status


Install git and clone the repository

$ git clone

Install Docker and run docker-compose from the root directory

$ cd ursa_major
$ docker-compose up

Once the application starts successfully, you should be able to access the application in your browser at http://localhost:8005

When you're done, shut down docker-compose

$ docker-compose down

Or, if you want to remove all data

$ docker-compose down -v


ursa major has three services, all of which are exposed via HTTP endpoints (see Routes section below):

  • Store Accessions - validates incoming data, and saves an Accession object as well as a Bag object for each transfer identified in the transfers key of the data delivered.
  • Bag Discovery - the main service for this application, which consists of the following steps:
    • Checking to see if the files for the bag are in the landing directory.
    • "Unpacking" the bag files and saving the metadata to the Bag object.
    • Moving bag to the storage directory and updating the bag_path field.
    • Notifying another service that the bag is available for further processing via a POST request.
  • Cleanup - removes files from the destination directory.

Ursa Major diagram


Method URL Parameters Response Behavior
POST /accessions 200 Creates accession objects as well as associated bags
GET /bags 200 Returns a list of transfers
GET /bags/{id} 200 Returns data about an individual transfer
POST /bagdiscovery 200 Runs the BagDiscovery routine
POST /cleanup 200 Runs the Cleanup routine
GET /status 200 Return the status of the microservice
GET /schema.json 200 Returns the OpenAPI schema for this application


ursa major uses structlog to output structured JSON logs. Logging can be configured in ursa_major/


This code is released under an MIT License.