foliolib.folio.api.fincConfig.FincConfigMetadataCollections

class foliolib.folio.api.fincConfig.FincConfigMetadataCollections(tenant: str)

Bases: foliolib.folio.FolioApi

mod-finc-config API

This documents the API calls that can be made to query and manage metadata collections for all tenants/isils

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

delete_metadataCollection(metadataCollectionsId)

Delete an metadata collection identified by id

get_metadataCollection(metadataCollectionsId)

Get one metadata collection identified by id

get_metadataCollections(**kwargs)

Get all metadata collections

modify_metadataCollection(...)

Put an metadata collection identified by id

set_metadataCollection(metadataCollection)

Post new metadata collection

delete_metadataCollection(metadataCollectionsId: str)

Delete an metadata collection identified by id

DELETE /finc-config/metadata-collections/{metadataCollectionsId}

Parameters

metadataCollectionsId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestFatalError – Server Error

get_metadataCollection(metadataCollectionsId: str)

Get one metadata collection identified by id

GET /finc-config/metadata-collections/{metadataCollectionsId}

Parameters

metadataCollectionsId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Metadata Collection Schema",
  "description": "Metadata collection in finc config",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "label": {
      "type": "string",
      "description": "A unique name for this metadata collection"
    },
    "description": {
      "type": "string",
      "description": "Description for this metadata collection"
    },
    "mdSource": {
      "type": "object",
      "description": "The metadata source this metadata collection belongs to",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of linked metadata source"
        },
        "name": {
          "type": "string",
          "description": "Name of linked metadata source"
        }
      },
      "required": [
        "id"
      ]
    },
    "metadataAvailable": {
      "type": "string",
      "description": "Indicates if metadata is available",
      "enum": [
        "yes",
        "no",
        "undetermined"
      ]
    },
    "usageRestricted": {
      "type": "string",
      "description": "Indicates if usage is restricted",
      "enum": [
        "yes",
        "no"
      ]
    },
    "permittedFor": {
      "type": "array",
      "description": "List of isils (libraries) this metadata collection is permitted for",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "freeContent": {
      "type": "string",
      "description": "Indicator is content is free",
      "enum": [
        "yes",
        "no",
        "undetermined"
      ]
    },
    "lod": {
      "type": "object",
      "description": "Indicator if LOD publication is permitted",
      "properties": {
        "publication": {
          "type": "string",
          "description": "Indicator if publication is permitted",
          "enum": [
            "yes",
            "no",
            "undetermined"
          ]
        },
        "note": {
          "type": "string",
          "description": "Note to LOD publication"
        }
      }
    },
    "collectionId": {
      "type": "string",
      "description": "Id of the collection"
    },
    "productIsil": {
      "type": "string",
      "description": "Isil of product"
    },
    "tickets": {
      "type": "array",
      "description": "List of links to corresponding tickets",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "contentFiles": {
      "type": "array",
      "description": "URL to linked content file",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "solrMegaCollections": {
      "type": "array",
      "description": "Link to solr mega collections",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "selectedBy": {
      "type": "array",
      "description": "List of isils which selected this metadata collection",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "generalNotes": {
      "type": "string",
      "description": "Some notes"
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "../raml-util/schemas/metadata.schema"
    }
  },
  "required": [
    "id",
    "collectionId",
    "label",
    "usageRestricted",
    "solrMegaCollections"
  ],
  "additionalProperties": false
}
get_metadataCollections(**kwargs)

Get all metadata collections

GET /finc-config/metadata-collections

Parameters

**kwargs (properties) – Keyword Arguments

Keyword Arguments
  • query (str) –

    A query expressed as a CQL string (see [dev.folio.org/reference/glossary#cql](https://dev.folio.org/reference/glossary#cql)) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.

    Example

    • (username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode

    • ((label=”Science*”) and metadataAvailable=(“yes” or “no”)) sortby label

  • orderBy (str) – Order by field: label, mdSource, metadataAvailable, usageRestricted, permittedFor, freeContent

  • order (str (desc|asc) – ): (default=desc) Order

  • offset (int) –

    (default=0) Skip over a number of elements by specifying an offset value for the query

    Example

    • 0

  • limit (int) –

    (default=10) Limit the number of elements returned in the response

    Example

    • 10

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Collection of metadata collections in finc config",
  "properties": {
    "fincConfigMetadataCollections": {
      "type": "array",
      "description": "List of metadata collections in finc config",
      "id": "fincConfigMetadataCollectionsData",
      "items": {
        "type": "object",
        "$ref": "fincConfigMetadataCollection.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "metadataCollections",
    "totalRecords"
  ]
}
modify_metadataCollection(metadataCollectionsId: str, metadataCollection: dict)

Put an metadata collection identified by id

PUT /finc-config/metadata-collections/{metadataCollectionsId}

Parameters
  • metadataCollectionsId (str) –

  • metadataCollection (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Metadata Collection Schema",
  "description": "Metadata collection in finc config",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "label": {
      "type": "string",
      "description": "A unique name for this metadata collection"
    },
    "description": {
      "type": "string",
      "description": "Description for this metadata collection"
    },
    "mdSource": {
      "type": "object",
      "description": "The metadata source this metadata collection belongs to",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of linked metadata source"
        },
        "name": {
          "type": "string",
          "description": "Name of linked metadata source"
        }
      },
      "required": [
        "id"
      ]
    },
    "metadataAvailable": {
      "type": "string",
      "description": "Indicates if metadata is available",
      "enum": [
        "yes",
        "no",
        "undetermined"
      ]
    },
    "usageRestricted": {
      "type": "string",
      "description": "Indicates if usage is restricted",
      "enum": [
        "yes",
        "no"
      ]
    },
    "permittedFor": {
      "type": "array",
      "description": "List of isils (libraries) this metadata collection is permitted for",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "freeContent": {
      "type": "string",
      "description": "Indicator is content is free",
      "enum": [
        "yes",
        "no",
        "undetermined"
      ]
    },
    "lod": {
      "type": "object",
      "description": "Indicator if LOD publication is permitted",
      "properties": {
        "publication": {
          "type": "string",
          "description": "Indicator if publication is permitted",
          "enum": [
            "yes",
            "no",
            "undetermined"
          ]
        },
        "note": {
          "type": "string",
          "description": "Note to LOD publication"
        }
      }
    },
    "collectionId": {
      "type": "string",
      "description": "Id of the collection"
    },
    "productIsil": {
      "type": "string",
      "description": "Isil of product"
    },
    "tickets": {
      "type": "array",
      "description": "List of links to corresponding tickets",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "contentFiles": {
      "type": "array",
      "description": "URL to linked content file",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "solrMegaCollections": {
      "type": "array",
      "description": "Link to solr mega collections",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "selectedBy": {
      "type": "array",
      "description": "List of isils which selected this metadata collection",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "generalNotes": {
      "type": "string",
      "description": "Some notes"
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "../raml-util/schemas/metadata.schema"
    }
  },
  "required": [
    "id",
    "collectionId",
    "label",
    "usageRestricted",
    "solrMegaCollections"
  ],
  "additionalProperties": false
}
set_metadataCollection(metadataCollection: dict)

Post new metadata collection

POST /finc-config/metadata-collections

Parameters

metadataCollection (dict) – See Schema below

Raises
  • OkapiRequestError – Bad Request

  • OkapiRequestUnauthorized – Authentication is required

  • OkapiRequestFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Headers

  • Location - URI to the created metadataCollection item

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Metadata Collection Schema",
  "description": "Metadata collection in finc config",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "label": {
      "type": "string",
      "description": "A unique name for this metadata collection"
    },
    "description": {
      "type": "string",
      "description": "Description for this metadata collection"
    },
    "mdSource": {
      "type": "object",
      "description": "The metadata source this metadata collection belongs to",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of linked metadata source"
        },
        "name": {
          "type": "string",
          "description": "Name of linked metadata source"
        }
      },
      "required": [
        "id"
      ]
    },
    "metadataAvailable": {
      "type": "string",
      "description": "Indicates if metadata is available",
      "enum": [
        "yes",
        "no",
        "undetermined"
      ]
    },
    "usageRestricted": {
      "type": "string",
      "description": "Indicates if usage is restricted",
      "enum": [
        "yes",
        "no"
      ]
    },
    "permittedFor": {
      "type": "array",
      "description": "List of isils (libraries) this metadata collection is permitted for",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "freeContent": {
      "type": "string",
      "description": "Indicator is content is free",
      "enum": [
        "yes",
        "no",
        "undetermined"
      ]
    },
    "lod": {
      "type": "object",
      "description": "Indicator if LOD publication is permitted",
      "properties": {
        "publication": {
          "type": "string",
          "description": "Indicator if publication is permitted",
          "enum": [
            "yes",
            "no",
            "undetermined"
          ]
        },
        "note": {
          "type": "string",
          "description": "Note to LOD publication"
        }
      }
    },
    "collectionId": {
      "type": "string",
      "description": "Id of the collection"
    },
    "productIsil": {
      "type": "string",
      "description": "Isil of product"
    },
    "tickets": {
      "type": "array",
      "description": "List of links to corresponding tickets",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "contentFiles": {
      "type": "array",
      "description": "URL to linked content file",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "solrMegaCollections": {
      "type": "array",
      "description": "Link to solr mega collections",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "selectedBy": {
      "type": "array",
      "description": "List of isils which selected this metadata collection",
      "minItems": 0,
      "items": {
        "type": "string"
      }
    },
    "generalNotes": {
      "type": "string",
      "description": "Some notes"
    },
    "metadata": {
      "description": "Metadata about creation and changes, provided by the server (client should not provide)",
      "type": "object",
      "$ref": "../raml-util/schemas/metadata.schema"
    }
  },
  "required": [
    "id",
    "collectionId",
    "label",
    "usageRestricted",
    "solrMegaCollections"
  ],
  "additionalProperties": false
}