foliolib.folio.api.entitiesLinks.Entitieslinks
- class foliolib.folio.api.entitiesLinks.Entitieslinks(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiEntities Links API
Entity Links API
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
countlinksbyauthorityids(uuidCollection)Retrieve number of links by authority IDs
getauthoritylinksstats(**kwargs)Retrieve authority updates (related to links) statistics
Retrieve instance-authority linking rule by ID
Retrieve instance-authority linking rules
getinstancelinks(instanceId)Get links collection related to Instance
getlinkedbibupdatestats(**kwargs)Retrieve linked bib update statistics
Retrieve links suggestions for marc records
updateinstancelinks(instanceId, ...)Update links collection related to Instance
- countlinksbyauthorityids(uuidCollection)
Retrieve number of links by authority IDs
POST /links/authorities/bulk/count- Parameters
uuidCollection (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Validation errors.
OkapiFatalError – Internal server error.
Schema
{ "type": "object", "title": "Collection of UUIDs", "description": "Collection of UUIDs", "properties": { "ids": { "type": "array", "items": { "$ref": "#/components/schemas/uuid" } } }, "required": [ "ids" ] }
{ "type": "object", "title": "Collection of links count map for authorities", "description": "Collection of links count map for authorities", "properties": { "links": { "type": "array", "items": { "$ref": "#/components/schemas/linksCountDto" } } }, "required": [ "links" ] }
- getauthoritylinksstats(**kwargs)
Retrieve authority updates (related to links) statistics
GET /links/stats/authority- Keyword Arguments
fromDate (str) – Start date to seek from (format: date-time)
toDate (str) – End date to seek from (format: date-time)
action (str) – Action to filter by
limit (int) – Max number of items in collection (minimum: 1, default: 100)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Validation errors.
OkapiFatalError – Internal server error.
Schema
{ "description": "Collection of authority changes statistic", "type": "object", "properties": { "stats": { "description": "Authority changes statistic", "type": "array", "items": { "$ref": "schemas/authority/control/authorityStatsDto.json" } }, "next": { "description": "Next response item date to seek by", "type": "string", "format": "date-time" } } }
- getinstanceauthoritylinkingrulebyid(ruleId)
Retrieve instance-authority linking rule by ID
GET /linking-rules/instance-authority/{ruleId}- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Validation errors.
OkapiRequestNotFound – Validation error for the request.
OkapiFatalError – Internal server error.
Schema
{ "type": "object", "title": "Field to filed linking rule", "description": "Field to filed linking rule", "properties": { "id": { "type": "integer" }, "bibField": { "type": "string" }, "authorityField": { "type": "string" }, "authoritySubfields": { "type": "array", "items": { "$ref": "#/components/schemas/charString" } }, "subfieldModifications": { "type": "array", "items": { "$ref": "#/components/schemas/subfieldModification" } }, "validation": { "$ref": "#/components/schemas/subfieldValidation" }, "autoLinkingEnabled": { "type": "boolean" } } }
- getinstanceauthoritylinkingrules()
Retrieve instance-authority linking rules
GET /linking-rules/instance-authority- Raises
OkapiRequestError – Validation errors.
OkapiFatalError – Internal server error.
- getinstancelinks(instanceId)
Get links collection related to Instance
GET /links/instances/{instanceId}- Parameters
instanceId (str) – UUID of the Instance that is related to the MARC record (format: uuid)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Validation errors.
OkapiFatalError – Internal server error.
Schema
{ "type": "object", "title": "Collection of instance links", "description": "Collection of instance links", "properties": { "links": { "type": "array", "items": { "$ref": "#/components/schemas/instanceLinkDto" } }, "totalRecords": { "type": "integer", "readOnly": true, "description": "Total amount of notes" } }, "required": [ "links" ] }
- getlinkedbibupdatestats(**kwargs)
Retrieve linked bib update statistics
GET /links/stats/instance- Keyword Arguments
fromDate (str) – Start date to seek from (format: date-time)
toDate (str) – End date to seek to (format: date-time)
status (str) – Status to filter by
limit (int) – Max number of items in collection (minimum: 1, default: 100)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Validation errors.
OkapiFatalError – Internal server error.
Schema
{ "description": "Collection of changes statistic", "type": "object", "properties": { "stats": { "description": "Changes statistic", "type": "array", "items": { "$ref": "schemas/authority/control/bibStatsDto.json" } }, "next": { "description": "Next response item date to seek by", "type": "string", "format": "date-time" } } }
- suggestlinksformarcrecord(parsedRecordContentCollection)
Retrieve links suggestions for marc records
POST /links-suggestions/marc- Parameters
parsedRecordContentCollection (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Validation errors.
OkapiFatalError – Internal server error.
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Collection of SRS records content", "type": "object", "properties": { "records": { "description": "List of records content", "type": "array", "items": { "description": "Parsed record content, e.g. MARC record", "$ref": "parsedRecordContent.json" } } } }
- updateinstancelinks(instanceId, instanceLinkDtoCollection)
Update links collection related to Instance
PUT /links/instances/{instanceId}- Parameters
instanceId (str) – UUID of the Instance that is related to the MARC record (format: uuid)
instanceLinkDtoCollection (dict) – See Schema below.
- Raises
OkapiRequestError – Validation errors.
OkapiRequestUnprocessableEntity – Validation error for the request.
OkapiFatalError – Internal server error.
Schema
{ "type": "object", "title": "Collection of instance links", "description": "Collection of instance links", "properties": { "links": { "type": "array", "items": { "$ref": "#/components/schemas/instanceLinkDto" } }, "totalRecords": { "type": "integer", "readOnly": true, "description": "Total amount of notes" } }, "required": [ "links" ] }