foliolib.folio.api.fincConfig.FincSelectMetadataCollections

class foliolib.folio.api.fincConfig.FincSelectMetadataCollections(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)

Bases: foliolib.folio.FolioApi

mod-finc-config API

This documents the API calls that can be made to query and manage metadata collections for the current tenant/isil

Parameters
  • tenant (str) – Tenant id

  • okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.

Methods

delete_select(metadataCollectionsId)

Delete select item with given {selectId}

get_metadataCollection(metadataCollectionsId)

Get one metadata collection identified by id

get_metadataCollections(**kwargs)

Get all metadata collections

get_select(metadataCollectionsId)

Retrieve select item with given {selectId}

modify_select(metadataCollectionsId, select)

Put, if this metadata collection is selected resp.

delete_select(metadataCollectionsId: str)

Delete select item with given {selectId}

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

Parameters

metadataCollectionsId (str) –

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

get_metadataCollection(metadataCollectionsId: str)

Get one metadata collection identified by id

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

Parameters

metadataCollectionsId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestUnauthorized – Authentication is required

  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Metadata Collection Schema",
  "description": "Metadata collection in finc select",
  "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"
      ]
    },
    "permitted": {
      "type": "string",
      "description": "Indicates if metadata collection is permitted for current tenant/isil",
      "enum": [
        "yes",
        "no"
      ]
    },
    "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"
      }
    },
    "selected": {
      "type": "string",
      "description": "Indicates if this metadata collection is selected by current tenant/isil",
      "enum": [
        "yes",
        "no"
      ]
    },
    "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",
    "label",
    "usageRestricted",
    "solrMegaCollections"
  ],
  "additionalProperties": false
}
get_metadataCollections(**kwargs)

Get all metadata collections

GET /finc-select/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 permitted=”yes” and selected=”no”) sortby label

  • orderBy (str) – Order by field: label, mdSource, permitted, filters, 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

  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Collection of metadata collections in finc select",
  "properties": {
    "fincSelectMetadataCollections": {
      "type": "array",
      "id": "fincSelectMetadataCollectionData",
      "description": "List of metadata collections for finc select",
      "items": {
        "type": "object",
        "$ref": "fincSelectMetadataCollection.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "sources",
    "totalRecords"
  ]
}
get_select(metadataCollectionsId: str)

Retrieve select item with given {selectId}

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

Parameters

metadataCollectionsId (str) –

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Object to select resp. deselect metadata sources or collections",
  "type": "object",
  "title": "Select",
  "properties": {
    "select": {
      "type": "boolean",
      "description": "Boolean which describes if entity shall be selected resp. deselected"
    }
  },
  "required": [
    "select"
  ]
}
modify_select(metadataCollectionsId: str, select: dict)

Put, if this metadata collection is selected resp. deselected

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

Parameters
  • metadataCollectionsId (str) –

  • select (dict) – See Schema below

Raises
  • OkapiRequestNotFound – Not Found

  • OkapiRequestError – Bad Request

  • OkapiFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Object to select resp. deselect metadata sources or collections",
  "type": "object",
  "title": "Select",
  "properties": {
    "select": {
      "type": "boolean",
      "description": "Boolean which describes if entity shall be selected resp. deselected"
    }
  },
  "required": [
    "select"
  ]
}