foliolib.folio.api.fincConfig.FincSelectMetadataSources
- class foliolib.folio.api.fincConfig.FincSelectMetadataSources(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApimod-finc-config API
This documents the API calls that can be made to query and manage metadata sources for the current tenant/isil
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_metadataSource(metadataSourcesId)Delete metadataSource item with given {metadataSourceId}
delete_selectAll(metadataSourcesId)Delete selectAll item with given {selectAllId}
Get metadata collections assigned to this metadata source
get_metadataSource(metadataSourcesId)Get one metadata source identified by id
get_metadataSources(**kwargs)Get all metadata sources
get_selectAll(metadataSourcesId)Retrieve selectAll item with given {selectAllId}
modify_metadataSource(metadataSourcesId, ...)Put, if all metadata collections of this source are selected resp.
modify_selectAll(metadataSourcesId, selectAll)Put, if all metadata collections of this source are selected resp.
set_metadataSource(metadataSource)Create a new metadataSource item.
- delete_metadataSource(metadataSourcesId: str)
Delete metadataSource item with given {metadataSourceId}
DELETE /finc-select/metadata-sources/{metadataSourcesId}- Parameters
metadataSourcesId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
- delete_selectAll(metadataSourcesId: str)
Delete selectAll item with given {selectAllId}
DELETE /finc-select/metadata-sources/{metadataSourcesId}/collections/select-all- Parameters
metadataSourcesId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
- get_collections_by_metadataSource(metadataSourcesId: str)
Get metadata collections assigned to this metadata source
GET /finc-select/metadata-sources/{metadataSourcesId}/collections- Parameters
metadataSourcesId (str) –
- get_metadataSource(metadataSourcesId: str)
Get one metadata source identified by id
GET /finc-select/metadata-sources/{metadataSourcesId}- Parameters
metadataSourcesId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Metadata Source Schema", "description": "Metadata source in finc select", "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string", "description": "A unique name for this metadata source" }, "description": { "type": "string", "description": "A globally unique (UUID) identifier" }, "status": { "type": "string", "description": "Current status of metadata source", "enum": [ "active", "closed", "impossible", "implementation", "request" ] }, "organization": { "type": "object", "description": "The organization delivering content of this metadata source", "properties": { "id": { "type": "string", "description": "Id of the the sources content\u2019s organization, linked via uuid from organizations app." }, "name": { "type": "string", "description": "Organization's name. If not given, it will be determined by backend module." } } }, "contacts": { "type": "array", "description": "List of contacts", "minItems": 0, "items": { "type": "object", "$ref": "contact.json" } }, "indexingLevel": { "type": "string", "description": "Level used for indexing (e.g. bibliographic)" }, "generalNotes": { "type": "string", "description": "General notes not fitting into the other fields" }, "lastProcessed": { "type": "string", "format": "date-time", "description": "Date of last processing" }, "tickets": { "type": "array", "description": "Links to internal tickets corresponding to this metadata source", "minItems": 0, "items": { "type": "string" } }, "accessUrl": { "type": "string", "description": "URL to access metadata source" }, "sourceId": { "type": "integer", "description": "The source id" }, "solrShard": { "type": "string", "description": "Used solr shard", "enum": [ "SLUB DBoD", "SLUB dswarm", "UBL ai", "UBL DNB", "UBL main" ] }, "deliveryMethods": { "type": "array", "description": "Available delivery methods (e.g. API download)", "minItems": 0, "items": { "type": "string" } }, "formats": { "type": "array", "description": "Available formats (e.g. MARC)", "minItems": 0, "items": { "type": "string" } }, "updateRhythm": { "type": "string", "description": "Metadata source's update rhythm" }, "inferiorTo": { "type": "array", "description": "Link to other metadata sources", "minItems": 0, "items": { "type": "string" } }, "selected": { "type": "string", "description": "Indicator if current tenant/library has selected this metadata source", "enum": [ "all", "some", "none" ] }, "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", "status", "sourceId" ], "additionalProperties": false }
- get_metadataSources(**kwargs)
Get all metadata sources
GET /finc-select/metadata-sources- 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=”Journals*”) and status=(“active” or “technical implementation”) and selected=”none”) sortby label
orderBy (str) – Order by field: label, sourceId, status, lastProcessed
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
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Collection of metadata sources in finc select", "properties": { "fincSelectMetadataSources": { "type": "array", "id": "fincSelectMetadataSourcesData", "description": "List of metadata sources for finc select", "items": { "type": "object", "$ref": "fincSelectMetadataSource.json" } }, "totalRecords": { "type": "integer" } }, "required": [ "sources", "totalRecords" ] }
- get_selectAll(metadataSourcesId: str)
Retrieve selectAll item with given {selectAllId}
GET /finc-select/metadata-sources/{metadataSourcesId}/collections/select-all- Parameters
metadataSourcesId (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_metadataSource(metadataSourcesId: str, metadataSource: dict)
Put, if all metadata collections of this source are selected resp. deselected
PUT /finc-select/metadata-sources/{metadataSourcesId}- Parameters
metadataSourcesId (str) –
metadataSource (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Metadata Source Schema", "description": "Metadata source in finc select", "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string", "description": "A unique name for this metadata source" }, "description": { "type": "string", "description": "A globally unique (UUID) identifier" }, "status": { "type": "string", "description": "Current status of metadata source", "enum": [ "active", "closed", "impossible", "implementation", "request" ] }, "organization": { "type": "object", "description": "The organization delivering content of this metadata source", "properties": { "id": { "type": "string", "description": "Id of the the sources content\u2019s organization, linked via uuid from organizations app." }, "name": { "type": "string", "description": "Organization's name. If not given, it will be determined by backend module." } } }, "contacts": { "type": "array", "description": "List of contacts", "minItems": 0, "items": { "type": "object", "$ref": "contact.json" } }, "indexingLevel": { "type": "string", "description": "Level used for indexing (e.g. bibliographic)" }, "generalNotes": { "type": "string", "description": "General notes not fitting into the other fields" }, "lastProcessed": { "type": "string", "format": "date-time", "description": "Date of last processing" }, "tickets": { "type": "array", "description": "Links to internal tickets corresponding to this metadata source", "minItems": 0, "items": { "type": "string" } }, "accessUrl": { "type": "string", "description": "URL to access metadata source" }, "sourceId": { "type": "integer", "description": "The source id" }, "solrShard": { "type": "string", "description": "Used solr shard", "enum": [ "SLUB DBoD", "SLUB dswarm", "UBL ai", "UBL DNB", "UBL main" ] }, "deliveryMethods": { "type": "array", "description": "Available delivery methods (e.g. API download)", "minItems": 0, "items": { "type": "string" } }, "formats": { "type": "array", "description": "Available formats (e.g. MARC)", "minItems": 0, "items": { "type": "string" } }, "updateRhythm": { "type": "string", "description": "Metadata source's update rhythm" }, "inferiorTo": { "type": "array", "description": "Link to other metadata sources", "minItems": 0, "items": { "type": "string" } }, "selected": { "type": "string", "description": "Indicator if current tenant/library has selected this metadata source", "enum": [ "all", "some", "none" ] }, "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", "status", "sourceId" ], "additionalProperties": false }
- modify_selectAll(metadataSourcesId: str, selectAll: dict)
Put, if all metadata collections of this source are selected resp. deselected
PUT /finc-select/metadata-sources/{metadataSourcesId}/collections/select-all- Parameters
metadataSourcesId (str) –
selectAll (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" ] }
- set_metadataSource(metadataSource: dict)
Create a new metadataSource item.
POST /finc-select/metadata-sources- Parameters
metadataSource (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
Headers
Location - URI to the created metadataSource item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Metadata Source Schema", "description": "Metadata source in finc select", "type": "object", "properties": { "id": { "type": "string" }, "label": { "type": "string", "description": "A unique name for this metadata source" }, "description": { "type": "string", "description": "A globally unique (UUID) identifier" }, "status": { "type": "string", "description": "Current status of metadata source", "enum": [ "active", "closed", "impossible", "implementation", "request" ] }, "organization": { "type": "object", "description": "The organization delivering content of this metadata source", "properties": { "id": { "type": "string", "description": "Id of the the sources content\u2019s organization, linked via uuid from organizations app." }, "name": { "type": "string", "description": "Organization's name. If not given, it will be determined by backend module." } } }, "contacts": { "type": "array", "description": "List of contacts", "minItems": 0, "items": { "type": "object", "$ref": "contact.json" } }, "indexingLevel": { "type": "string", "description": "Level used for indexing (e.g. bibliographic)" }, "generalNotes": { "type": "string", "description": "General notes not fitting into the other fields" }, "lastProcessed": { "type": "string", "format": "date-time", "description": "Date of last processing" }, "tickets": { "type": "array", "description": "Links to internal tickets corresponding to this metadata source", "minItems": 0, "items": { "type": "string" } }, "accessUrl": { "type": "string", "description": "URL to access metadata source" }, "sourceId": { "type": "integer", "description": "The source id" }, "solrShard": { "type": "string", "description": "Used solr shard", "enum": [ "SLUB DBoD", "SLUB dswarm", "UBL ai", "UBL DNB", "UBL main" ] }, "deliveryMethods": { "type": "array", "description": "Available delivery methods (e.g. API download)", "minItems": 0, "items": { "type": "string" } }, "formats": { "type": "array", "description": "Available formats (e.g. MARC)", "minItems": 0, "items": { "type": "string" } }, "updateRhythm": { "type": "string", "description": "Metadata source's update rhythm" }, "inferiorTo": { "type": "array", "description": "Link to other metadata sources", "minItems": 0, "items": { "type": "string" } }, "selected": { "type": "string", "description": "Indicator if current tenant/library has selected this metadata source", "enum": [ "all", "some", "none" ] }, "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", "status", "sourceId" ], "additionalProperties": false }