Skip to main content
Version: 2.2

Configuration

All TypeScript actions rely on a JSON configuration file that contains basic connection details for the various repository services, a section related to the mapping into repository objects and other settings. An example file is located in the config folder.

Configuration sections

The file contains the following sections:

  • Connection details for box
  • Connection details for Fedora 3 (if doing migrations)
  • Connection details for Fedora 6
  • Connection details for feeder
  • Share configuration to transfer data to box (used in the Replace Fedora instantiation action). This action does not send data directly to box but instead sends box the path to the file and the metadata required by the replace API, which usually reside in a folder in the feeder workbench. This folder needs to be accessible to the server where box installed. When transferring this path to box, the part of the path defined as absolutePath is replaced by the corresponding share name. A similar configuration in box.yml then replaces the name with the absolutePath valid from the box server to access the files.
  • Mapping table linking a given submission agreement to a Fedora 6 prefix (used in the Import Matterhorn RDF into Fedora action). The prefix indicates a top-level resource, to which the resources from a SIP are attached subsequently.
  • Connection details used in the Register URN with the German National Library action.

Here's an example of such a file:

{
"box": {
"baseUrl": "http://box:3001",
"token": "121fa45c74c1132c1f751b1e857c9368"
},
"fedora3": {
"baseUrl": "http://fedora3:8080/fedora",
"password": "fedoraAdmin",
"username": "fedoraAdmin"
},
"fedora6": {
"baseUrl": "http://fedora6:8080/fcrepo/rest",
"password": "fedoraAdmin",
"username": "fedoraAdmin"
},
"feeder": {
"baseUrl": "http://feeder:3000",
"token": "6snpah3Z8Ma2kAxWEJBVANzK"
},
"shares": [
{
"name": "box_development_volume",
"absolutePath": "/some/path/to/folder"
}
],
"submissionAgreementsToPrefixMapping": [
{
"submissionAgreementId": "sa_it-01_dss-01",
"fedora6Prefix": "org_it"
},
{
"submissionAgreementId": "sa_all-formats-01_dss-01",
"fedora6Prefix": "org_123"
}
],
"urnService": {
"apiBaseUrl": "https://api.nbn-resolving.org/sandbox/v2",
"credentials": [
{
"namespace": "urn:nbn:ch:bel1",
"username": "SLB31390",
"password": "xxxx"
},
{
"namespace": "urn:nbn:ch:bel2",
"username": "SLB31390",
"password": "xxxx"
}
]
}
}