MARC record validation rules - Overview and Field Configuration
About this document: MARC record validation rules can only be configured via APIs affectionally called Mr. Specs. We hope that after setting up these rules that you will continue to affectionally call these APIs… Mr. Specs.
Documentation (please review first)
MARC validation - Logic to understand the types of field rules and what can be configured.
GitHub README: https://github.com/folio-org/mod-record-specifications/blob/master/README.md
API documentation: https://dev.folio.org/reference/api/#mod-record-specifications
LOC standards: MARC bib | MARC authority
Additional information - MARC Validation - Ramsons requirements
Permissions
OKAPI: Look for permissions that start with specification-storage
Eureka: Application: app-platform-complete > Capability Set: Specification-Storage
About the APIs
API collection:
The APIs do not support batch creates/updates/deletes.
APIs support CRUD of one type. For example, you can only update a field but you cannot update subfield or indicator with one API call.
Values
If repeatable = true then the field/indicator/subfield value is repeatable. If repeatable = false then the field/indicator/subfield value is nonrepeatable.
If required = true then the field/indicator/subfield value is required. If required = false then the field/indicator/subfield value is not required.
There is an API that allows you to turn off some rules globally and thus MARC validation is very similar to pre-Ramsons release. See Global MARC Validation Rules Updates
ECS support
If your ECS setup has local bib or authority records, then configuration should be set up per tenant.
Otherwise if these records will be shared then setting up configuration rules on the central tenant should be enough.
How to get a list of MARC bib/authority record validation rules
To get the MARC bib and authority record specification ids, make the request: GET /specification-storage/specifications
BIB specification id (example):
6eefa4c6-bbf7-4845-ad82-de7fc4abd0e3
AUTHORITY specification id (example):
a37d01ba-75c7-4a0c-997e-309823f1df3f
To get the list of MARC bib record validation rules, make the request: GET /specification-storage/specifications/{MARC bib record validation specification id}?include=all
Example: GET /specification-storage/specifications/
6eefa4c6-bbf7-4845-ad82-de7fc4abd0e3
To get the list of MARC authority record validation rules, make the request: GET /specification-storage/specifications/{MARC authority record validation specification id}?include=all
Example: GET /specification-storage/specifications/
a37d01ba-75c7-4a0c-997e-309823f1df3f
Update a field tag
From the GET /specification-storage/specifications/{MARC bib/authority record validation specification id}?include=all, copy the following values in that response for the field tag you want to update: id, tag, label, url, repeatable, required
A url must always start with https:// or http://
To update the field tag, use PUT /specification-storage/fields/<<fieldId>> and the body should include at minimum these fields: tag, label, and repeatable
Create a local field
A local field is a field that is not a part of the MARC bib/authority standard outlined by Library of Congress. This includes all field tags with a 9.
To create a local field, use the POST /specification-storage/specifications/{MARC bib/authority record validation specification id}/fields
The POST body must include at minimum: field tag and label.
Repeatable, required, and url values are optional to include in the body.
If repeatable is not included in the response, then the default will be true (aka repeatable).
If required is not included in the response, then the default will be false (aka not required).
A url must always start with https:// or http://
Delete a local field
From the GET /specification-storage/specifications/{MARC bib/authority record validation specification id}?include=all, copy the field id.
Use the endpoint DELETE /specification-storage/fields/{fieldId}
MARC record validation rules - Subfield configuration | MARC record validation rules - Indicator configuration