foliolib.folio.api.quickMarc.Marcspecifications

class foliolib.folio.api.quickMarc.Marcspecifications(tenant: str)

Bases: foliolib.folio.FolioApi

quickMARC MARC Specifications

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

getmarcspecification(recordType, fieldTag)

Get MARC specification by recordType and fieldTag

getmarcspecification(recordType, fieldTag)

Get MARC specification by recordType and fieldTag

GET /marc-specifications/{recordType}/{fieldTag}

Parameters
  • recordType (str) – Record type (enum: [‘bibliographic’, ‘holdings’, ‘authority’], example: bibliographic)

  • fieldTag (str) – Field’s tag (pattern: ^[0-9]{3}$, example: 008)

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestError – Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

  • OkapiRequestNotFound – MARC specification with a given recordType and fieldTag not found

  • OkapiRequestFatalError – Internal server error, e.g. due to misconfiguration

Schema

{
    "type": "object",
    "description": "MARC specification definition",
    "properties": {
        "tag": {
            "description": "Field's tag",
            "type": "string",
            "pattern": "^[0-9]{3}$",
            "example": "008"
        },
        "format": {
            "description": "MARC format",
            "$ref": "#/marcFormat"
        },
        "label": {
            "description": "Label of the specification",
            "type": "string"
        },
        "url": {
            "description": "Url to details about field spec",
            "type": "string",
            "format": "uri"
        },
        "repeatable": {
            "description": "If this field can appear multiple time in MARC record",
            "type": "boolean"
        },
        "required": {
            "description": "If this field is required in MARC record",
            "type": "boolean"
        },
        "spec": {
            "type": "object",
            "description": "Details of the specification",
            "properties": {
                "types": {
                    "description": "Array of types",
                    "type": "array",
                    "items": {
                        "$ref": "#/marcSpecificationType"
                    }
                }
            },
            "required": [
                "types"
            ]
        }
    },
    "required": [
        "tag",
        "format",
        "label",
        "url",
        "repeatable",
        "required",
        "spec"
    ]
}