Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Consortia

Sharing Endpoints

URL

Method

Request Body

Response Body

Comment

/consortia/<consortiumId>/sharing/instances

POST




Code Block
{
    "sourceTenantId": "college",
    "instanceIdentifier": "<UUID>",
    "targetTenantId": "mobius"
}





Code Block
{
    "id": "<UUID>",
    "sourceTenantId": "college",
    "instanceIdentifier": "<UUID>",
    "targetTenantId": "mobius",
    "status": "IN_PROGRESS",
    "metadata": {
      "createdDate": "<DateTime>",
      ...
    }
}


start a sharing action for an instance

/consortia/<consortiumId>/sharing/instances/<actionId>GET


Code Block
{
    "id": "<UUID>",
    "sourceTenantId": "college",
    "instanceIdentifier": "<UUID>",
    "targetTenantId": "mobius",
    "status": "IN_PROGRESS",
    "metadata": {
      "createdDate": "",
      ...
    }
}


get a sharing action by ID

/consortia/<consortiumId>/sharing/instances?query=sourceTenantId=college and instanceIdentifer=<UUID>

GET



Code Block
{
    "id": "<UUID>",
    "sourceTenantId": "college",
    "instanceIdentifier": "<UUID>",
    "targetTenantId": "mobius",
    "status": "IN_PROGRESS",
    "metadata": {
      "createdDate": "",
      ...
    }
}


get sharing actions by the criteria

Sharing Action Schema

Property

Description

Values

id

identifier of the action

UUID

sourceTenantId

tenant identifier of the instance to be shared

OKAPI tenant identifiers

instanceIdentifier

identifier of the instance to be shared

UUID

targetTenantId

tenant identifier of the instance’s destination after sharing is complete

OKAPI tenant identifiers

status

status of the sharing action

IN_PROGRESS, COMPLETE, ERROR

error

cause of the err’ing share action. Only present when sharing action has status of ERROR

String

metadata

extra items like createdDate, createdByUserId, updatedDate, updatedByUserId


There is a unique constraint on sourceTenantId, instanceIdentifier & targetTenantId. This means there will be a single sharing action present from a particular source to another target.

...

SRS records belonging to local instance should be taken out of play after the local instance is shared. There are larger discussions in FOLIO about record deletion that may take more drastic measures for dependency resolution for the pertinent source records. The approach will only “soft delete” SRS records. SRS records that are soft deleted will be not be available for retrieval, matching & permanently lose their versioning information.

URL

Method

Response

Description

/source-storage/records/<sourceRecordId>

DELETE

HTTP 204 No Content

Soft delete a source record

/source-storage/records/<sourceRecordId>/restore

POST

HTTP 200 OK

Restore a soft deleted source record

To soft delete, the latest version is saved into another table saving the identifier as well. While the record will be deleted from other tables: RECORDS_LB, MARC_RECORDS_LB, ERROR_RECORDS_LB, EDIFACT_RECORDS_LB.

...

The restore functionality will be developed at a later time.

...

Modify Shared Instance Instead Of Shadow Instance

There are import Data Import jobs that start in a member library tenant that should affect Shared Instances. But , but Shared Instance Instances live in the central tenant. Enhancements need to be made to Data Import to allow update of a shared instance Shared Instance in the central tenant while processing other records for the member library tenant.

...

During matching check the current tenant and the consortial tenant for results. This is because a shadow instance will not have a MARC reference in the member library tenant. The shared instance might have a Marc reference if it has source=MARC.

Shadow Instance

...

Creation

When a “Create Holding” action is required in a job profile and the Shadow Instance where the holding would live is not present, DI will initiate the consortium sharing process to create the Shadow Instance before creating the holding.

Kafka Topics

Name

Description

Event Schema

CONSORTIUM_INSTANCE_SHARING_INIT

Notify consumers that sharing should of an instance should occur.

sourceTenantId, instanceIdentifier, targetTenantId

CONSORTIUM_INSTANCE_SHARING_COMPLETE

Notify consumers that sharing of an instance is complete

sourceTenantId, instanceIdentifier, targetTenantId, error