/
MARC record validation rules - Overview and Field Configuration
  • Ready for review
  • 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)

    1. MARC validation - Logic to understand the types of field rules and what can be configured.

    2. GitHub README: https://github.com/folio-org/mod-record-specifications/blob/master/README.md

    3. API documentation: https://dev.folio.org/reference/api/#mod-record-specifications

    4. LOC standards: MARC bib | MARC authority

    5. 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

    1. To get the MARC bib and authority record specification ids, make the request: GET /specification-storage/specifications

      1. BIB specification id (example): 6eefa4c6-bbf7-4845-ad82-de7fc4abd0e3

      2. AUTHORITY specification id (example): a37d01ba-75c7-4a0c-997e-309823f1df3f

    2. 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

      1. Example: GET /specification-storage/specifications/6eefa4c6-bbf7-4845-ad82-de7fc4abd0e3

    3. 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

      1. Example: GET /specification-storage/specifications/a37d01ba-75c7-4a0c-997e-309823f1df3f


    Update a field tag

    1. 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

    2. A url must always start with https:// or http://

    035 example

    "id": "e68edd4f-41d7-4c0e-880e-207f1706ab27",
    "tag": "035",
    "label": "System Control Number",
    "url": "https://www.loc.gov/marc/bibliographic/bd035.html",
    "repeatable": true,
    "required": false,
    "deprecated": false,
    "scope": "standard"

    Please review API documentation - https://s3.amazonaws.com/foliodocs/api/mod-record-specifications/s/mod-record-specifications.html#tag/specification-storage/operation/getSpecification

    1. To update the field tag, use PUT /specification-storage/fields/<<fieldId>> and the body should include at minimum these fields: tag, label, and repeatable

    PUT /specification-storage/fields/e68edd4f-41d7-4c0e-880e-207f1706ab27

    {     "tag": "035",             "label": "System Control Number",             "url": "http://www.myuniversitystandards.edu",             "repeatable": true,             "required": false,             "deprecated": false,             "scope": "standard" }

    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.

    1. To create a local field, use the POST /specification-storage/specifications/{MARC bib/authority record validation specification id}/fields

    2. The POST body must include at minimum: field tag and label.

      1. Repeatable, required, and url values are optional to include in the body.

      2. If repeatable is not included in the response, then the default will be true (aka repeatable).

      3. If required is not included in the response, then the default will be false (aka not required).

      4. A url must always start with https:// or http://

    POST /specification-storage/specifications/6eefa4c6-bbf7-4845-ad82-de7fc4abd0e3/fields

    "tag": "019",     "label": "019  OCLC Control Number Cross-Reference",     "repeatable": false,     "required": false

    Delete a local field

    1. From the GET /specification-storage/specifications/{MARC bib/authority record validation specification id}?include=all, copy the field id.

    2. Use the endpoint DELETE /specification-storage/fields/{fieldId}

    MARC record validation rules - Subfield configuration | MARC record validation rules - Indicator configuration

    Related content